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

commits at source.squeak.org commits at source.squeak.org
Mon Jun 29 13:00:55 UTC 2015


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

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

Name: VMMaker.oscog-cb.1399
Author: cb
Time: 29 June 2015, 2:59:03.143 pm
UUID: 288a6e76-6729-4327-9507-23659247129e
Ancestors: VMMaker.oscog-cb.1398

Moved down the return because slang doesn't translate correctly returns on conditions resolved at compile time.

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

Item was changed:
  ----- Method: StackToRegisterMappingCogit>>genExtPushClosureBytecode (in category 'bytecode generators') -----
  genExtPushClosureBytecode
  	"Block compilation.  At this point in the method create the block.  Note its start
  	 and defer generating code for it until after the method and any other preceeding
  	 blocks.  The block's actual code will be compiled later."
  	"253		11111101 eei i i kkk	jjjjjjjj		Push Closure Num Copied iii (+ Ext A // 16 * 8) Num Args kkk (+ Ext A \\ 16 * 8) BlockSize jjjjjjjj (+ Ext B * 256). ee = num extensions"
  	| startpc numArgs numCopied |
  	self assert: needsFrame.
  	startpc := bytecodePC + (self generatorAt: byte0) numBytes.
  	self addBlockStartAt: startpc "0 relative"
  		numArgs: (numArgs := (byte1 bitAnd: 16r7) + (extA \\ 16 * 8))
  		numCopied: (numCopied := ((byte1 >> 3) bitAnd: 7) + (extA // 16 * 8))
  		span: byte2 + (extB << 8).
  	extA := extB := 0.
  
+ 	objectRepresentation createsClosuresInline
- 	^ objectRepresentation createsClosuresInline
  		ifTrue: [ self genInlineClosure: startpc numArgs: numArgs numCopied: numCopied ]
+ 		ifFalse: [ self genOutlineClosure: startpc numArgs: numArgs numCopied: numCopied ].
+ 		
+ 	^ 0!
- 		ifFalse: [ self genOutlineClosure: startpc numArgs: numArgs numCopied: numCopied ]!

Item was changed:
  ----- Method: StackToRegisterMappingCogit>>genInlineClosure:numArgs:numCopied: (in category 'bytecode generator support') -----
  genInlineClosure: startpc numArgs: numArgs numCopied: numCopied
  	<inline: true>
  	self assert: objectRepresentation getActiveContextAllocatesInMachineCode.
  	 optStatus isReceiverResultRegLive: false.
  	 self ssAllocateCallReg: ReceiverResultReg
  		and: SendNumArgsReg
  		and: ClassReg.
  	 objectRepresentation
  		genNoPopCreateClosureAt: startpc + 1 "1 relative"
  		numArgs: numArgs
  		numCopied: numCopied
  		contextNumArgs: methodOrBlockNumArgs
  		large: (coInterpreter methodNeedsLargeContext: methodObj)
  		inBlock: inBlock.
  	 1 to: numCopied do:
  		[:i| | reg |
  		 reg := self ssStorePop: true toPreferredReg: TempReg.
  		 objectRepresentation
  			genStoreSourceReg: reg
  			slotIndex: ClosureFirstCopiedValueIndex + numCopied - i
  			intoNewObjectInDestReg: ReceiverResultReg].
+ 	 self ssPushRegister: ReceiverResultReg
- 	 ^self ssPushRegister: ReceiverResultReg
  !

Item was changed:
  ----- Method: StackToRegisterMappingCogit>>genOutlineClosure:numArgs:numCopied: (in category 'bytecode generator support') -----
  genOutlineClosure: startpc numArgs: numArgs numCopied: numCopied
  	<inline: true>
  	numCopied > 0 ifTrue:
  		[self ssFlushTo: simStackPtr].
  	optStatus isReceiverResultRegLive: false.
  	objectRepresentation getActiveContextAllocatesInMachineCode
  		ifTrue: [self ssAllocateCallReg: ReceiverResultReg
  					and: SendNumArgsReg
  					and: ClassReg]
  		ifFalse: [self ssAllocateCallReg: SendNumArgsReg
  					and: ReceiverResultReg].
  	objectRepresentation
  		genCreateClosureAt: startpc + 1 "1 relative"
  		numArgs: numArgs
  		numCopied: numCopied
  		contextNumArgs: methodOrBlockNumArgs
  		large: (coInterpreter methodNeedsLargeContext: methodObj)
  		inBlock: inBlock.
  	numCopied > 0 ifTrue:
  		[self ssPop: numCopied].
+ 	self ssPushRegister: ReceiverResultReg
- 	^self ssPushRegister: ReceiverResultReg
  !

Item was changed:
  ----- Method: StackToRegisterMappingCogit>>genPushClosureCopyCopiedValuesBytecode (in category 'bytecode generators') -----
  genPushClosureCopyCopiedValuesBytecode
  	"Block compilation.  At this point in the method create the block.  Note its start
  	 and defer generating code for it until after the method and any other preceeding
  	 blocks.  The block's actual code will be compiled later."
  	"143   10001111 llllkkkk jjjjjjjj iiiiiiii	Push Closure Num Copied llll Num Args kkkk BlockSize jjjjjjjjiiiiiiii"
  	| startpc numArgs numCopied |
  	self assert: needsFrame.
  	startpc := bytecodePC + (self generatorAt: byte0) numBytes.
  	self addBlockStartAt: startpc "0 relative"
  		numArgs: (numArgs := byte1 bitAnd: 16rF)
  		numCopied: (numCopied := byte1 >> 4)
  		span: (byte2 << 8) + byte3.
  
+ 	objectRepresentation createsClosuresInline 
- 	^ objectRepresentation createsClosuresInline 
  		ifTrue: [ self genInlineClosure: startpc numArgs: numArgs numCopied: numCopied ]
+ 		ifFalse: [ self genOutlineClosure: startpc numArgs: numArgs numCopied: numCopied ].
+ 		
+ 	^ 0
- 		ifFalse: [ self genOutlineClosure: startpc numArgs: numArgs numCopied: numCopied ]
  
  	!



More information about the Vm-dev mailing list