[Vm-dev] VM Maker: VMMaker.oscogSPC-eem.2125.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 9 01:31:43 UTC 2017

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

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

Name: VMMaker.oscogSPC-eem.2125
Author: eem
Time: 8 February 2017, 5:30:53.044288 pm
UUID: c99756cb-c65f-480e-86bb-408657e31e7c
Ancestors: VMMaker.oscogSPC-eem.2124, VMMaker.oscog-cb.2117

Merge with VMMaker.oscog-cb.2117.
Better code for RegisterAllocatingCogit popStoreTemp of a constant.

=============== Diff against VMMaker.oscogSPC-eem.2124 ===============

Item was changed:
  ----- Method: CoInterpreter>>ceCannotAssignTo:withIndex:valueToAssign: (in category 'trampolines') -----
  ceCannotAssignTo: immutableObject withIndex: index valueToAssign: valueToAssign
+ 	"index is unboxed and 0-based. The call-back expects 1-based value (to perform the operation with instVarAt:put:"
- 	"index is unboxed."
  	<option: #IMMUTABILITY>
  	instructionPointer := self popStack.
  	self push: immutableObject.
  	self push: valueToAssign.
+ 	self push: (objectMemory integerObjectOf: index + 1).
- 	self push: (objectMemory integerObjectOf: index).
  	self push: instructionPointer.
  	^ self
  		ceSendAbort: (objectMemory splObj: SelectorAttemptToAssign)
  		to: immutableObject
  		numArgs: 2!

Item was changed:
  ----- Method: RegisterAllocatingCogit>>genStorePop:TemporaryVariable: (in category 'bytecode generator support') -----
  genStorePop: popBoolean TemporaryVariable: tempIndex
  	<inline: false>
  	| srcRegOrNone destReg |
  	self ssFlushUpThroughTemporaryVariable: tempIndex.
  	"To avoid a stall writing through destReg, remember srcReg before the potential ssPop: 1 in ssStorePop:toReg:"
  	srcRegOrNone := self ssTop registerOrNone.
  	"ssStorePop:toPreferredReg: will allocate a register, and indeed may allocate ReceiverResultReg
  	 if, for example, the ssEntry to be popped is already in ReceiverResultReg (as the result of a send).
  	 ReceiverResultReg is not a good choice for a temporary variable; it has other uses.  So if the ssEntry
  	 at top of stack has ReceiverResultReg as its live variable, try and allocate an alternative."
+ 	((self ssTop type = SSConstant
+ 	  or: [self ssTop registerMaskOrNone anyMask: self registerMaskUndesirableForTempVars])
- 	((self ssTop registerMaskOrNone anyMask: self registerMaskUndesirableForTempVars)
  	 and: [(destReg := self availableRegOrNoneNotConflictingWith: (self registerMaskUndesirableForTempVars bitOr: self liveRegisters)) ~= NoReg])
  		ifTrue: [self ssStorePop: popBoolean toReg: destReg]
  		ifFalse: [destReg := self ssStorePop: popBoolean toPreferredReg: TempReg].
  	self MoveR: (srcRegOrNone ~= NoReg ifTrue: [srcRegOrNone] ifFalse: [destReg])
  		Mw: (self frameOffsetOfTemporary: tempIndex)
  		r: FPReg.
  	destReg ~= TempReg ifTrue:
  		[(self simStackAt: tempIndex) liveRegister: destReg.
  		 self copyLiveRegisterToCopiesOf: (self simStackAt: tempIndex)].

More information about the Vm-dev mailing list