[Vm-dev] VM Maker: VMMaker.oscog-tfel.1706.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Mar 3 16:25:16 UTC 2016
Tim Felgentreff uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-tfel.1706.mcz
==================== Summary ====================
Name: VMMaker.oscog-tfel.1706
Author: tfel
Time: 3 March 2016, 5:23:32.478036 pm
UUID: 43520f08-911f-47a8-b749-db236fb636f8
Ancestors: VMMaker.oscog-eem.1705
* Don't query Smalltalk globals for the BalloonEngineSimulation - it's always there
* Simulate all primitives through BitBlt>>simulatePrimitive:args:
* Add a test to make sure that simulating primitiveDisplayString through the InterpreterProxy works
* Update InterpreterProxy>>showDisplayBits:Left:Top:Right:Bottom: to honor deferDisplayUpdates (like the generated VM code does) before forcing it to the screen. Needs Graphics-tfel.328
=============== Diff against VMMaker.oscog-eem.1705 ===============
Item was changed:
----- Method: BalloonEngine>>simulatePrimitive:args: (in category '*VMMaker-InterpreterSimulation') -----
simulatePrimitive: aString args: args
"simulate primitives in RSqueak"
| proxy bb |
+ proxy := InterpreterProxy new.
+ proxy synthesizeStackFor: self with: args.
+ bb := BalloonEngineSimulation simulatorClass new.
+ bb setInterpreter: proxy.
+ bb initialiseModule.
+ "rendering state is loaded in the primitive implementations"
+ bb perform: aString asSymbol.
+ ^ proxy stackValue: 0!
- Smalltalk
- at: #BalloonEngineSimulation
- ifPresent: [:be |
- proxy := InterpreterProxy new.
- proxy synthesizeStackFor: self with: args.
- bb := be simulatorClass new.
- bb setInterpreter: proxy.
- bb initialiseModule.
- "rendering state is loaded in the primitive implementations"
- bb perform: aString asSymbol.
- ^ proxy stackValue: 0].!
Item was changed:
----- Method: BitBlt>>simulatePrimitive:args: (in category '*VMMaker-Interpreter') -----
simulatePrimitive: aString args: args
"simulate primitives in RSqueak"
+ | proxy bb |
+ proxy := InterpreterProxy new.
+ proxy synthesizeStackFor: self with: args.
+ bb := BitBltSimulation simulatorClass new.
+ bb setInterpreter: proxy.
+ bb initialiseModule.
+ "rendering state is loaded in the primitive implementations"
+ bb perform: aString asSymbol.
+ ^ proxy stackValue: 0
- aString = 'primitiveCopyBits'
- ifTrue: [
- args size = 1
- ifTrue: [^ self copyBitsSimulated: (args at: 1)]
- ifFalse: [^ self copyBitsSimulated]].
- aString = 'primitiveWarpBits'
- ifTrue: [^ self
- warpBitsSimulated: (args at: 1)
- sourceMap: (args at: 2)].
- ^ InterpreterProxy new primitiveFailFor: 255
!
Item was added:
+ ----- Method: BitBltSimulationTest>>testDisplayStringSimulated (in category 'tests') -----
+ testDisplayStringSimulated
+ "self run: #testAlphaCompositingSimulated"
+
+ | bb f1 font |
+ f1 := Form extent: 1 at 1 depth: 32.
+ bb := BitBlt toForm: f1.
+ bb combinationRule: 15.
+ bb destX: 1.
+ bb destY: 1.
+ bb sourceX: 100.
+ bb width: 100.
+ font := TextStyle default fontOfSize: 21.
+ bb simulatePrimitive: 'primitiveDisplayString' args: {'hello'. 1. 4. font characterToGlyphMap. font xTable. 1}.
+ !
Item was added:
+ ----- Method: InterpreterProxy>>byteAtPointer: (in category 'private') -----
+ byteAtPointer: accessor
+ ^ self byteAt: accessor!
Item was changed:
----- Method: InterpreterProxy>>showDisplayBits:Left:Top:Right:Bottom: (in category 'other') -----
showDisplayBits: aForm Left: l Top: t Right: r Bottom: b
aForm == Display ifTrue:[
+ Display class isDeferringUpdates ifTrue: [^ nil].
Display forceToScreen: (Rectangle left: l right: r top: t bottom: b)].!
More information about the Vm-dev
mailing list