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

commits at source.squeak.org commits at source.squeak.org
Thu Sep 5 00:29:05 UTC 2013


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

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

Name: Cog-eem.70
Author: eem
Time: 4 September 2013, 5:28:45.984 pm
UUID: 1cf5db5c-444b-434d-bd7e-3deae50eee2a
Ancestors: Cog-eem.69

Rename fetchClassOfNonInt: to fetchClassOfNonImm:.

=============== Diff against Cog-eem.69 ===============

Item was changed:
  ----- Method: SpurBootstrap>>buildClassMap (in category 'bootstrap') -----
  buildClassMap
  	"enumerate all objects asking isBehavior:?  (class == Metaclass or class class == Metaclass) doesn't work for Newspeak"
  	"Build a map from all classes in oldHeap to a class index.
  	 ONLY DEALS WITH CLASSES THAT HAVE INSTANCES!!!! (can walk superclass chain?  Can walk subclasses set? Can ask class == Metaclass or class class == Metaclass class?)"
  	| classes classTableIndex |
  	self defineKnownClassIndices.
  	classes := classToIndex keys asSet.
  	classTableIndex := newHeap classTablePageSize.
  	oldHeap allObjectsDo:
  		[:oldObj| | oldClass |
+ 		 oldClass := oldHeap fetchClassOfNonImm: oldObj.
- 		 oldClass := oldHeap fetchClassOfNonInt: oldObj.
  		 (classes includes: oldClass) ifFalse:
  			[classes add: oldClass.
  			 classToIndex at: oldClass put: (classTableIndex := classTableIndex + 1)]]!

Item was changed:
  ----- Method: SpurBootstrap>>cloneNilTrueAndFalse (in category 'bootstrap') -----
  cloneNilTrueAndFalse
  	{	oldHeap nilObject.
  		oldHeap falseObject.
  		oldHeap trueObject. }
  		with: (self firstOrdinaryClassIndex to: self firstOrdinaryClassIndex + 2)
  		do: [:obj :classIndex|
+ 			classToIndex at: (oldHeap fetchClassOfNonImm: obj) put: classIndex.
- 			classToIndex at: (oldHeap fetchClassOfNonInt: obj) put: classIndex.
  			self clone: obj classIndex: classIndex].
  	newHeap
  		nilObject: (map at: oldHeap nilObject); "needed for nilling objects etc"
  		falseObject: (map at: oldHeap falseObject);
  		trueObject: (map at: oldHeap trueObject)!

Item was changed:
  ----- Method: SpurBootstrap>>cloneObjects (in category 'bootstrap') -----
  cloneObjects
  	| characterClass characterTable oldObj oldClass |
  	characterClass := oldHeap classCharacter.
  	characterTable := oldHeap characterTable.
  	oldObj := oldHeap objectAfter: oldHeap trueObject.
  	[oldObj < oldHeap freeStart] whileTrue:
+ 		[oldClass := oldHeap fetchClassOfNonImm: oldObj.
- 		[oldClass := oldHeap fetchClassOfNonInt: oldObj.
  		 (oldObj ~= characterTable
  		 and: [oldClass ~= characterClass]) ifTrue:
  			[self clone: oldObj classIndex: (classToIndex at: oldClass)].
  		 oldObj := oldHeap objectAfter: oldObj].
  	newHeap specialObjectsOop: (map at: oldHeap specialObjectsOop)!

Item was changed:
  ----- Method: SpurBootstrap>>fillInPointerObject:from: (in category 'bootstrap') -----
  fillInPointerObject: newObj from: oldObj
  	0 to: (oldHeap lastPointerOf: oldObj) / oldHeap bytesPerWord - 1 do:
  		[:i| | oldValue newValue |
  		oldValue := oldHeap fetchPointer: i ofObject: oldObj.
  		newValue := (oldHeap isIntegerObject: oldValue)
  						ifTrue: [oldValue]
  						ifFalse:
  							[map at: oldValue ifAbsent:
  								[oldValue = oldHeap characterTable
  									ifTrue: [newHeap nilObject]
  									ifFalse:
+ 										[self assert: (oldHeap fetchClassOfNonImm: oldValue) = oldHeap classCharacter.
- 										[self assert: (oldHeap fetchClassOfNonInt: oldValue) = oldHeap classCharacter.
  										 newHeap characterObjectOf:
  											(oldHeap integerValueOf:
  												(oldHeap fetchPointer: CharacterValueIndex ofObject: oldValue))]]].
  		newHeap
  			storePointerUnchecked: i
  			ofObject: newObj
  			withValue: newValue]!



More information about the Vm-dev mailing list