[Vm-dev] VM Maker: Cog-eem.219.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Nov 19 18:08:13 UTC 2014

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

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

Name: Cog-eem.219
Author: eem
Time: 19 November 2014, 10:07:57.957 am
UUID: 99545a1e-d2a6-4793-9a7a-32c0d702320d
Ancestors: Cog-eem.218

Spur 32- to 64-bit bootstrap.  Get the tests for
acceptable 64-bit integers right and add asserts to
check the conversions are correct.

=============== Diff against Cog-eem.218 ===============

Item was changed:
  ----- Method: SpurBootstrap32to64>>cloneObjects (in category 'bootstrap image') -----
  	"Clone all normal objects.  Of hidden objects only clone the freeLists object and
  	 the classTableRoot and class table pages. In particular, dont clone objStacks.
  	 The refs to the objStacks are nilled out in fillInHeap."
  	| freeListsObject |
  	freeListsObject := heap32 freeListsObject.
  	heap32 allOldSpaceObjectsDo:
  		[:obj32| | classIndex value |
  		classIndex := heap32 classIndexOf: obj32.
  		obj32 = freeListsObject
  				[self cloneFreeLists: obj32]
  				[(heap32 isValidObjStackPage: obj32) ifFalse:
  					[((classIndex between: ClassLargeNegativeIntegerCompactIndex and: ClassLargePositiveIntegerCompactIndex)
  					  and: [interpreter32 initPrimCall.
+ 						value := interpreter32 signed64BitValueOf: obj32.
- 						value := heap32 positive64BitValueOf: obj32.
  						interpreter32 failed not
  					  and: [heap64 isIntegerValue: value]]) ifFalse:
  						[self clone: obj32]]]]!

Item was changed:
  ----- Method: SpurBootstrap32to64>>fillInCompiledMethod:from: (in category 'bootstrap image') -----
  fillInCompiledMethod: obj64 from: obj32
  	| offset |
+ 	"interpreter32 printOop: oop32"
+ 	"interpreter64 printOop: oop64"
  	0 to: (heap32 numPointerSlotsOf: obj32) - 1 do:
+ 		[:i| | oop32 oop64 |
+ 		 oop32 := heap32 fetchPointer: i ofObject: obj32.
+ 		 oop64 := self map32BitOop: oop32.
- 		[:i|
  			storePointerUnchecked: i
  			ofObject: obj64
+ 			withValue: oop64.
+ 		 (heap64 isIntegerObject: oop64) ifTrue:
+ 			[interpreter32 initPrimCall.
+ 			 self assert: (interpreter32 signed64BitValueOf: oop32) = (heap64 integerValueOf: oop64)]].
- 			withValue: (self map32BitOop: (heap32 fetchPointer: i ofObject: obj32))].
  	offset := (interpreter64 startPCOfMethod: obj64)
  			- (interpreter32 startPCOfMethod: obj32).
  	(interpreter32 startPCOfMethod: obj32)
  		to: (heap32 numBytesOf: obj32) - 1
+ 		do: [:j|
- 		do: [:i|
+ 				storeByte: offset + j 
- 				storeByte: offset + i 
  				ofObject: obj64
+ 				withValue: (heap32 fetchByte: j ofObject: obj32)]!
- 				withValue: (heap32 fetchByte: i ofObject: obj32)]!

Item was changed:
  ----- Method: SpurBootstrap32to64>>map32BitOop: (in category 'bootstrap image') -----
  map32BitOop: oop32
+ 	"interpreter32 printOop: oop32"
  		at: oop32
  			[(heap32 isImmediate: oop32)
  					[(heap32 isImmediateCharacter: oop32)
  						ifTrue: [heap64 characterObjectOf: (heap32 characterValueOf: oop32)]
  						ifFalse: [heap64 integerObjectOf: (heap32 integerValueOf: oop32)]]
  					[| value |
  					 self assert: (self isUnmappedObject: oop32).
  					 interpreter32 initPrimCall.
+ 					 value := interpreter32 signed64BitValueOf: oop32.
- 					 value := heap32 positive64BitValueOf: oop32.
  					 self deny: interpreter32 failed.
  					 heap64 integerObjectOf: value]]!

More information about the Vm-dev mailing list