[Vm-dev] VM Maker: VMMaker.oscog-cb.1929.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Sep 1 15:27:15 UTC 2016


ClementBera uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1929.mcz

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

Name: VMMaker.oscog-cb.1929
Author: cb
Time: 1 September 2016, 5:24:44.893576 pm
UUID: 201ac61a-7b23-4bb6-a0bc-840ee3e8e89a
Ancestors: VMMaker.oscog-cb.1928

When a loop is taken enough time to trigger jit compilation, it needs in the SistaV1 bytecode set to check if the activation is a full block and call the correct JIT compiler method if this is the case.

=============== Diff against VMMaker.oscog-cb.1928 ===============

Item was changed:
  ----- Method: CoInterpreter>>attemptToSwitchToMachineCode: (in category 'jump bytecodes') -----
  attemptToSwitchToMachineCode: bcpc
  	"Attempt to convert the current interpreted activation into a machine code
  	 activation, and if this is popssible, jump into machine code.  bcpc is the
  	 0-relative pc of the backward branch bytecode (not any preceding extension)."
+ 	| cogMethod pc cls |
- 	| cogMethod pc |
  	<inline: false>
  	<var: #cogMethod type: #'CogMethod *'>
+ 	(self methodHasCogMethod: method)
+ 		ifFalse: 
+ 			[SistaV1BytecodeSet
+ 				ifTrue: 
+ 					[ ((self iframeIsBlockActivation: framePointer) 
+ 					   and: [(self isVanillaBlockClosure: (cls := self frameStackedReceiver: framePointer numArgs: (self frameNumArgs: framePointer))) not ])
+ 						ifTrue: 
+ 							["Compiled block / full closure"
+ 							 cogit cogFullBlockMethod: method numCopied: (objectMemory numPointerSlotsOf: cls) - FullClosureFirstCopiedValueIndex]
+ 						ifFalse: 
+ 							["Compiled method"
+ 							cogit cog: method selector: objectMemory nilObject] ]
+ 				ifFalse: 
+ 					[cogit cog: method selector: objectMemory nilObject] ].
- 	(self methodHasCogMethod: method) ifFalse:
- 		[cogit cog: method selector: objectMemory nilObject].
  	(self methodHasCogMethod: method) ifTrue:
  		[cogMethod := self cogMethodOf: method.
  		 pc := self convertToMachineCodeFrame: cogMethod bcpc: bcpc.
  		 self assertValidMachineCodeFrame: pc.
  		 self push: pc.
  		 self push: objectMemory nilObject.
  		 cogit ceEnterCogCodePopReceiverReg]!



More information about the Vm-dev mailing list