[Vm-dev] VM Maker: VMMaker.oscog-eem.740.mcz

commits at source.squeak.org commits at source.squeak.org
Sat May 31 17:27:35 UTC 2014


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

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

Name: VMMaker.oscog-eem.740
Author: eem
Time: 31 May 2014, 10:24:45.76 am
UUID: 59d8582f-ae8e-4851-bf86-061851905203
Ancestors: VMMaker.oscog-eem.739

Fix slip initialized and: size > 0 => initialized and: [size > 0].

=============== Diff against VMMaker.oscog-eem.739 ===============

Item was changed:
  ----- Method: CogObjectRepresentationFor32BitSpur>>genNewArrayOfSize:initialized: (in category 'bytecode generator support') -----
  genNewArrayOfSize: size initialized: initialized
  	"Generate a call to code that allocates a new Array of size.
  	 The Array should be initialized with nils iff initialized is true.
  	 The size arg is passed in SendNumArgsReg, the result
  	 must come back in ReceiverResultReg."
  	| header headerLow headerHigh byteSize skip |
  	<var: #skip type: #'AbstractInstruction *'>
  	self assert: size < objectMemory numSlotsMask.
  	header := objectMemory
  					headerForSlots: size
  					format: objectMemory arrayFormat
  					classIndex: ClassArrayCompactIndex.
  	headerLow := self cCoerceSimple: header to: #usqInt.
  	headerHigh := header >> 32.
  	byteSize := (size max: 1) + 3 >> 1 * 8. "round up to 8 bytes and add 8 bytes of header"
  	self flag: #endianness.
  	cogit
  		MoveAw: objectMemory freeStartAddress R: ReceiverResultReg;
  		MoveCq: headerLow R: TempReg;
  		MoveR: TempReg Mw: 0 r: ReceiverResultReg;
  		MoveCq: headerHigh R: TempReg;
  		MoveR: TempReg Mw: 4 r: ReceiverResultReg.
+ 	(initialized and: [size > 0]) ifTrue:
- 	(initialized and: size > 0) ifTrue:
  		[cogit MoveCw: objectMemory nilObject R: TempReg.
  		 1 to: size do:
  			[:i| cogit MoveR: TempReg Mw: i * 4 + 4 r: ReceiverResultReg]].
  	cogit
  		MoveR: ReceiverResultReg R: TempReg;
  		AddCq: byteSize R: TempReg;
  		MoveR: TempReg Aw: objectMemory freeStartAddress;
  		CmpCq: objectMemory getScavengeThreshold R: TempReg.
  	skip := cogit JumpLess: 0.
  	cogit CallRT: ceSheduleScavengeTrampoline.
  	skip jmpTarget: cogit Label.
  	^0!



More information about the Vm-dev mailing list