Chris Muller uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel.spur-nice.923.mcz==================== Summary ====================
Name: Kernel.spur-nice.923
Author: eem
Time: 12 May 2015, 3:32:07.667 pm
UUID: ed46ad2e-c619-4d7b-9dbc-7ed9afea1c15
Ancestors: Kernel-nice.923, Kernel.spur-nice.922
Kernel-nice.923 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.267
Use an intermediate abstract Float representation (sign, exponent, significand) in order to convert single precision bits to double precision bits rather than attempting the conversion by direct bit manipulations.
This lead to simpler code, because it is like a semantic bit manipulation rather than a raw bit manipulation.
And this also lead to faster code on 32 bits interpreter/COG/Spur VM thanks to avoidance of LargeInteger
(was Kernel-nice.893 / 24 December 2014)
=============== Diff against Kernel.spur-topa.920 ===============
Item was changed:
----- Method: ContextPart>>asMessage (in category 'converting') -----
asMessage
+ | selector args |
- | sender selector args |
- sender := self sender.
selector := sender method selector.
args := Array new: selector numArgs.
1 to: selector numArgs do: [ :i | args at: i put: (sender tempAt: i)].
^ Message selector: selector arguments: args.!
Item was added:
+ ----- Method: Fraction>>floorLog: (in category 'mathematical functions') -----
+ floorLog: radix
+ "Unlike super, this version is exact when radix is integer"
+
+ | d n |
+ radix isInteger ifFalse: [^super floorLog: 10].
+ n := numerator floorLog: radix.
+ d := denominator floorLog: radix.
+ ^(numerator * (radix raisedTo: d))
+ < (denominator * (radix raisedTo: n))
+ ifTrue: [n - d - 1]
+ ifFalse: [n - d]!
Item was added:
+ ----- Method: InstructionClient>>callPrimitive: (in category '*Scorch') -----
+ callPrimitive: pimIndex
+ "V3PlusClosures: 139 10001011 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)
+ NewsqueakV4: 249 11111001 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)
+ SistaV1: 248 11111000 iiiiiiii mjjjjjjj Call Primitive #iiiiiiii + ( jjjjjjj * 256)
+ m=1 means inlined primitive, no hard return after execution."!
Item was added:
+ ----- Method: Integer>>floorLog: (in category 'mathematical functions') -----
+ floorLog: radix
+ "Unlike super, this version is exact when radix is integer"
+
+ radix isInteger ifFalse: [^super floorLog: 10].
+ self <= 0 ifTrue: [^DomainError signal: 'floorLog: is only defined for x > 0.0'].
+ ^(self numberOfDigitsInBase: radix) - 1!
Item was added:
+ ----- Method: ScaledDecimal>>floorLog: (in category 'mathematical functions') -----
+ floorLog: radix
+ "Unlike super, this version is exact when radix is integer"
+
+ ^self asFraction floorLog: radix!