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

commits at source.squeak.org commits at source.squeak.org
Wed Nov 19 00:27:20 UTC 2014


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

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

Name: Cog-eem.216
Author: eem
Time: 18 November 2014, 4:27:04.999 pm
UUID: d617cabf-a06d-4167-b5cd-4a03383df035
Ancestors: Cog-eem.215

Fix shapshotting in the 32- to 64-bit SPur boostrap.
Requires VMMaker.oscog-eem.939

=============== Diff against Cog-eem.215 ===============

Item was changed:
  ----- Method: SpurBootstrap32to64>>cloneObjects (in category 'bootstrap image') -----
  cloneObjects
+ 	"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
  			ifTrue:
  				[self cloneFreeLists: obj32]
  			ifFalse:
+ 				[(heap32 isValidObjStackPage: obj32) ifFalse:
+ 					[((classIndex between: ClassLargeNegativeIntegerCompactIndex and: ClassLargePositiveIntegerCompactIndex)
+ 					  and: [interpreter32 initPrimCall.
+ 						value := heap32 positive64BitValueOf: obj32.
+ 						interpreter32 failed not
+ 					  and: [heap64 isIntegerValue: value]]) ifFalse:
+ 						[self clone: obj32]]]]!
- 				[((classIndex between: ClassLargeNegativeIntegerCompactIndex and: ClassLargePositiveIntegerCompactIndex)
- 				  and: [interpreter32 initPrimCall.
- 					value := heap32 positive64BitValueOf: obj32.
- 					interpreter32 failed not
- 				  and: [heap64 isIntegerValue: value]]) ifFalse:
- 					[self clone: obj32]]]!

Item was changed:
  ----- Method: SpurBootstrap32to64>>fillInHeap (in category 'bootstrap image') -----
  fillInHeap
  	| heapEnd freeListsObj |
  	heapEnd := heap64 freeStart.
  	heap64
  		nilObject: (map at: heap32 nilObject);
  		falseObject: (map at: heap32 falseObject);
  		trueObject: (map at: heap32 trueObject);
  		specialObjectsOop: (map at: heap32 specialObjectsOop);
  		lastHash: heap32 lastHash.
  	heap64 segmentManager
  		initSegmentForInImageCompilationFrom: heap64 nilObject
  		to: heapEnd + heap64 bridgeSize.
  	freeListsObj := heap64 objectAfter: heap64 trueObject.
+ 	"Nil-out the free lists."
  	heap64
  		fillObj: freeListsObj numSlots: (heap64 numSlotsOf: freeListsObj) with: 0;
  		initializeFreeSpacePostLoad: freeListsObj;
  		initializePostBootstrap;
  		setEndOfMemory: (heap64 segmentManager bridgeAt: 0) + heap64 baseHeaderSize!

Item was changed:
  ----- Method: SpurBootstrap32to64>>fillInObjects (in category 'bootstrap image') -----
  fillInObjects
+ 	"interpreter32 printOop: obj32"
+ 	{heap32 markStack. heap32 weaklingStack. heap32 ephemeronQueue} do:
+ 		[:obj|
+ 		obj ~= heap32 nilObject ifTrue:
+ 			[map at: obj put: (map at: heap32 nilObject)]].
  	heap32 allObjectsDo:
  		[:obj32|
  		(map at: obj32 ifAbsent: nil)
  			ifNotNil:
  				[:obj64| | format classIndex |
+ 				(heap64 numSlotsOf: obj64) > 0 ifTrue: "filter-out filtered objStack pages"
+ 					[format := heap32 formatOf: obj32.
+ 					 (heap64 isPointersFormat: format)
+ 						ifTrue:
+ 							[((heap64 isIndexableFormat: format)
+ 								and: [(classIndex := heap64 classIndexOf: obj64) <= ClassBlockClosureCompactIndex
+ 								and: [classIndex >= ClassMethodContextCompactIndex]])
+ 								ifTrue: [self fillInPointerObjectWithPC: obj64 from: obj32]
+ 								ifFalse: [self fillInPointerObject: obj64 from: obj32]]
+ 						ifFalse:
+ 							[(heap64 isCompiledMethodFormat: format)
+ 								ifTrue: [self fillInCompiledMethod: obj64 from: obj32]
+ 								ifFalse: [self fillInBitsObject: obj64 from: obj32]]]]
+ 			ifNil: [self assert: (self isUnmappedObject: obj32)]]!
- 				format := heap32 formatOf: obj32.
- 				(heap64 isPointersFormat: format)
- 					ifTrue:
- 						[((heap64 isIndexableFormat: format)
- 							and: [(classIndex := heap64 classIndexOf: obj64) <= ClassBlockClosureCompactIndex
- 							and: [classIndex >= ClassMethodContextCompactIndex]])
- 							ifTrue: [self fillInPointerObjectWithPC: obj64 from: obj32]
- 							ifFalse: [self fillInPointerObject: obj64 from: obj32]]
- 					ifFalse:
- 						[(heap64 isCompiledMethodFormat: format)
- 							ifTrue: [self fillInCompiledMethod: obj64 from: obj32]
- 							ifFalse: [self fillInBitsObject: obj64 from: obj32]]]
- 			ifNil: [self assert: ((heap32 classIndexOf: obj32)
- 									between: ClassLargeNegativeIntegerCompactIndex
- 									and: ClassLargePositiveIntegerCompactIndex)]]!

Item was added:
+ ----- Method: SpurBootstrap32to64>>isUnmappedObject: (in category 'bootstrap image') -----
+ isUnmappedObject: obj32
+ 	"Answer if obj32 is an object that is not cloned by the bootstrap."
+ 	^((heap32 classIndexOf: obj32)
+ 			between: ClassLargeNegativeIntegerCompactIndex
+ 			and: ClassLargePositiveIntegerCompactIndex)
+ 	  or: [obj32 = heap32 freeListsObject
+ 	  or: [heap32 isValidObjStackPage: obj32]]!

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



More information about the Vm-dev mailing list