The Inbox: VMMaker-tfel.360.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: VMMaker-tfel.360.mcz

commits-2
A new version of VMMaker was added to project The Inbox:
http://source.squeak.org/inbox/VMMaker-tfel.360.mcz

==================== Summary ====================

Name: VMMaker-tfel.360
Author: tfel
Time: 12 March 2015, 9:29:26.525 am
UUID: b5b5b3ee-1918-194c-b462-b7347d08f929
Ancestors: VMMaker-tfel.359

Add methods to simulate B2DPlugin primitives easily

=============== Diff against VMMaker-tfel.359 ===============

Item was added:
+ ----- Method: BalloonEngine>>simulateBalloonPrimitive:args: (in category '*VMMaker-InterpreterSimulation') -----
+ simulateBalloonPrimitive: aString args: args
+ ^ Smalltalk at: #BalloonEngineSimulation ifPresent: [:be |
+ be simulatePrimitive: aString receiver: self args: args]!

Item was added:
+ ----- Method: BalloonEngineSimulation class>>simulatePrimitive:receiver:args: (in category 'simulation') -----
+ simulatePrimitive: aString receiver: rcvr args: args
+
+ | proxy bb |
+ proxy := InterpreterProxy new.
+ proxy synthesizeStackFor: rcvr with: args.
+ bb := self simulatorClass new.
+ bb setInterpreter: proxy.
+ bb initialiseModule.
+ "rendering state is loaded in the primitive implementations"
+ [bb perform: aString asSymbol] on: Exception do: [:ex|
+ RSqueak log: 'got an error trying to simulate ', aString.
+ RSqueak log: ex messageText.
+ RSqueak log: ex signalerContext shortStack].
+ ^ proxy stackValue: 0
+ !

Item was added:
+ ----- Method: InterpreterProxy>>synthesizeStackFor:with: (in category 'initialize') -----
+ synthesizeStackFor: receiver with: args
+ self push: receiver.
+ argumentCount := args size.
+ 1 to: argumentCount do: [:i | self push: (args at: i)].!