[squeak-dev] The Inbox: VMMaker-tfel.360.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 12 13:29:57 UTC 2015


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)].!



More information about the Squeak-dev mailing list