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

commits at source.squeak.org commits at source.squeak.org
Wed Sep 4 21:22:21 UTC 2013


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

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

Name: Cog-eem.69
Author: eem
Time: 4 September 2013, 2:22:08.497 pm
UUID: d6786922-3487-4e64-bb5c-95a935cbd3c3
Ancestors: Cog-eem.68

Update bootstrap to facilitate setting up new space and the
scavenger after image conversion.

=============== Diff against Cog-eem.68 ===============

Item was changed:
  ----- Method: SpurBootstrap>>allocateClassTable (in category 'bootstrap') -----
  allocateClassTable
  	"Allocate the root of the classTable plus enough pages to accomodate all classes in
  	 the classToIndex map.  Don;t fill in the entries yet; the classes have yet to be cloned."
  	| tableRootSize tableRoot page maxSize numPages |
  	tableRootSize := self classTableSize / newHeap classTablePageSize.
  	tableRoot := newHeap
  					allocateSlots: tableRootSize
  					format: newHeap arrayFormat
  					classIndex: newHeap arrayClassIndexPun.
  	self assert: (newHeap numSlotsOf: tableRoot) = tableRootSize.
  	self assert: (newHeap formatOf: tableRoot) = newHeap arrayFormat.
  	self assert: (newHeap classIndexOf: tableRoot) = newHeap arrayClassIndexPun.
  	newHeap nilFieldsOf: tableRoot.
  	"first page is strong"
  	page := newHeap
  					allocateSlots: newHeap classTablePageSize
  					format: newHeap arrayFormat
  					classIndex: newHeap arrayClassIndexPun.
  	self assert: (newHeap numSlotsOf: page) = newHeap classTablePageSize.
  	self assert: (newHeap formatOf: tableRoot) = newHeap arrayFormat.
  	self assert: (newHeap classIndexOf: tableRoot) = newHeap arrayClassIndexPun.
+ 	self assert: (newHeap objectAfter: tableRoot limit: newHeap freeStart) = page.
- 	self assert: (newHeap objectAfter: tableRoot) = page.
  	newHeap nilFieldsOf: page.
  	newHeap storePointer: 0 ofObject: tableRoot withValue: page.
  	newHeap classTableRootObj: tableRoot.
  	maxSize := classToIndex inject: 0 into: [:a :b| a max: b].
  	numPages := (maxSize + newHeap classTableMinorIndexMask / newHeap classTablePageSize) truncated.
  	2 to: numPages do:
  		[:i|
  		page := newHeap
  					allocateSlots: newHeap classTablePageSize
  					format: newHeap weakArrayFormat
  					classIndex: newHeap weakArrayClassIndexPun.
  		self assert: (newHeap numSlotsOf: page) = newHeap classTablePageSize.
  		self assert: (newHeap formatOf: page) = newHeap weakArrayFormat.
  		self assert: (newHeap classIndexOf: page) = newHeap weakArrayClassIndexPun.
  		newHeap nilFieldsOf: page.
  		newHeap storePointer: i - 1 ofObject: tableRoot withValue: page.
+ 		self assert: (newHeap objectAfter: (newHeap fetchPointer: i - 2 ofObject: tableRoot)  limit: newHeap freeStart) = page].
- 		self assert: (newHeap objectAfter: (newHeap fetchPointer: i - 2 ofObject: tableRoot)) = page].
  	pastClassTable := newHeap freeStart.!

Item was added:
+ ----- Method: SpurBootstrap>>bootstrapImage (in category 'bootstrap') -----
+ bootstrapImage
+ 	self cloneNilTrueAndFalse.
+ 	self buildClassMap.
+ 	self allocateClassTable.
+ 	self cloneObjects.
+ 	self fillInObjects.
+ 	self fillInClassTable!

Item was changed:
  ----- Method: SpurBootstrap>>launch (in category 'testing') -----
  launch
  	| sim |
  	sim := StackInterpreterSimulator onObjectMemory: newHeap.
  	newHeap coInterpreter: sim.
- 	newHeap initializePostBootstrap.
  	sim initializeInterpreter: 0.
  	sim run!

Item was changed:
  ----- Method: SpurBootstrap>>transform (in category 'bootstrap') -----
  transform
+ 	self bootstrapImage.
+ 	newHeap initializePostBootstrap.
- 	self cloneNilTrueAndFalse.
- 	self buildClassMap.
- 	self allocateClassTable.
- 	self cloneObjects.
- 	self fillInObjects.
- 	self fillInClassTable.
  	self validate!



More information about the Vm-dev mailing list