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

commits at source.squeak.org commits at source.squeak.org
Tue Nov 18 19:30:30 UTC 2014


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

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

Name: Cog-eem.215
Author: eem
Time: 18 November 2014, 11:30:11.922 am
UUID: 3e37e52b-c415-41a2-87c1-12f789f6c3f3
Ancestors: Cog-eem.214

Update 32 to 64 bit Spur bootstrap to
- clone free lists correctly
- initialize specalObjectsOop, segments and new
  space post bootstrap
- write the image file

Requires VMMaker.oscog-eem.937

=============== Diff against Cog-eem.214 ===============

Item was changed:
  ----- Method: SpurBootstrap32to64>>bootstrapImage (in category 'public access') -----
  bootstrapImage
  	self cloneObjects.
+ 	self fillInObjects.
+ 	self fillInHeap!
- 	self fillInObjects.!

Item was changed:
  ----- Method: SpurBootstrap32to64>>bootstrapImageUsingFileDirectory: (in category 'public access') -----
  bootstrapImageUsingFileDirectory: imageName
  	| dirName baseName dir |
  	dirName := FileDirectory dirPathFor: imageName.
  	baseName := (imageName endsWith: '.image')
  					ifTrue: [FileDirectory baseNameFor: imageName]
  					ifFalse: [FileDirectory localNameFor: imageName].
  	dir := dirName isEmpty ifTrue: [FileDirectory default] ifFalse: [FileDirectory default on: dirName].
  	self on: (dir fullNameFor: baseName, '.image').
  	[self bootstrapImage]
  		on: Halt
  		do: [:ex|
  			"suppress halts from the usual suspects (development time halts)"
  			(#(fullGC compactImage) includes: ex signalerContext sender selector)
  				ifTrue: [ex resume]
  				ifFalse: [ex pass]].
  	self writeSnapshot: (dir fullNameFor: baseName, '-64.image')
- 		ofTransformedImage: heap32
  		headerFlags: imageHeaderFlags
  		screenSize: savedWindowSize.
  	dir deleteFileNamed: baseName, '-64.changes';
  		copyFileNamed: baseName, '.changes' toFileNamed: baseName, '-64.changes'!

Item was added:
+ ----- Method: SpurBootstrap32to64>>cloneFreeLists: (in category 'bootstrap image') -----
+ cloneFreeLists: obj32
+ 	| obj64 |
+ 	obj64 := heap64
+ 				allocateSlots: heap64 numFreeLists
+ 				format: heap64 sixtyFourBitIndexableFormat
+ 				classIndex: heap64 sixtyFourBitLongsClassIndexPun.
+ 	reverseMap at: obj64 put: obj32.
+ 	^map at: obj32 put: obj64!

Item was changed:
  ----- Method: SpurBootstrap32to64>>cloneObjects (in category 'bootstrap image') -----
  cloneObjects
+ 	| freeListsObject |
+ 	freeListsObject := heap32 freeListsObject.
+ 	heap32 allOldSpaceObjectsDo:
- 	heap32 allObjectsDo:
  		[:obj32| | classIndex value |
  		classIndex := heap32 classIndexOf: obj32.
+ 		obj32 = freeListsObject
+ 			ifTrue:
+ 				[self cloneFreeLists: 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 added:
+ ----- 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.
+ 	heap64
+ 		fillObj: freeListsObj numSlots: (heap64 numSlotsOf: freeListsObj) with: 0;
+ 		initializeFreeSpacePostLoad: freeListsObj;
+ 		initializePostBootstrap;
+ 		setEndOfMemory: (heap64 segmentManager bridgeAt: 0) + heap64 baseHeaderSize!

Item was added:
+ ----- Method: SpurBootstrap32to64>>writeSnapshot:headerFlags:screenSize: (in category 'snapshot') -----
+ writeSnapshot: imageFileName headerFlags: headerFlags screenSize: screenSizeInteger
+ 	heap64
+ 		checkFreeSpace;
+ 		runLeakCheckerForFullGC: true.
+ 	interpreter64
+ 		setImageHeaderFlagsFrom: headerFlags;
+ 		setDisplayForm: nil;
+ 		imageName: imageFileName;
+ 		writeImageFileIO.
+ 	Transcript cr; show: 'Done!!'!



More information about the Vm-dev mailing list