A new version of VMMaker was added to project The Inbox:
http://source.squeak.org/inbox/VMMaker-bak.363.mcz==================== Summary ====================
Name: VMMaker-bak.363
Author: bak
Time: 24 June 2015, 4:41:04.078 pm
UUID: cb665589-a34f-4b63-b52e-f4fec2b3da29
Ancestors: VMMaker-bak.362
fix BalloonEngineSimulation for TTF (used in About Squeak)
=============== Diff against VMMaker-bak.362 ===============
Item was changed:
----- Method: BalloonEngineSimulation>>loadPointShortAt:from: (in category 'simulation') -----
+ loadPointShortAt: index from: intArray
- loadPointShortAt: index from: intArray
"Load the short value from the given index in intArray"
-
| long |
long := intArray at: index // 2.
+ long isPoint
+ ifTrue: [^ (index bitAnd: 1)
+ = 0
+ ifTrue: [long x]
+ ifFalse: [long y]].
+ ^ ((index bitAnd: 1)
+ = 0
+ ifTrue: [interpreterProxy halfWordHighInLong32: long]
+ ifFalse: [interpreterProxy halfWordLowInLong32: long]) signedIntFromShort
- ^ ((index bitAnd: 1) = 0
- ifTrue:[interpreterProxy halfWordHighInLong32: long]
- ifFalse:[interpreterProxy halfWordLowInLong32: long])
- signedIntFromShort
!
Item was changed:
+ ----- Method: BalloonEngineSimulation>>loadWordTransformFrom:into:length: (in category 'simulation') -----
+ loadWordTransformFrom: transformOop into: destPtr length: n
- ----- Method: BalloonEngineSimulation>>loadWordTransformFrom:into:length: (in category 'initialize') -----
- loadWordTransformFrom: transformOop into: destPtr length: n
"Load a float array transformation from the given oop"
-
| srcPtr wordDestPtr |
+ false
+ ifTrue: [^ super
+ loadWordTransformFrom: transformOop
+ into: destPtr
+ length: n].
-
- false ifTrue:
- [^super loadWordTransformFrom: transformOop into: destPtr length: n].
-
srcPtr := interpreterProxy firstIndexableField: transformOop.
+ wordDestPtr := destPtr as: CArrayAccessor.
+ "Remove float conversion shell"
+ 0 to: n - 1
+ do: [:i | wordDestPtr at: i put: (srcPtr floatAt: i) asIEEE32BitWord]
+ !
- wordDestPtr := destPtr as: CArrayAccessor. "Remove float conversion shell"
- 0 to: n-1 do: [:i | wordDestPtr at: i put: (srcPtr floatAt: i)]!
Item was added:
+ ----- Method: CArrayAccessor>>floatAt: (in category 'accessing') -----
+ floatAt: index
+ ^ (self at: index) isFloat
+ ifTrue: [self at: index]
+ ifFalse: [Float
+ fromIEEE32Bit: (self at: index)]
+ !