[Vm-dev] VM Maker: VMMaker.oscog-eem.1716.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 9 00:30:39 UTC 2016


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

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

Name: VMMaker.oscog-eem.1716
Author: eem
Time: 8 March 2016, 4:26:55.123457 pm
UUID: 9115c93b-f425-4118-96e7-7130adeff1f2
Ancestors: VMMaker.oscog-eem.1715

Fix the bug in markAndTraceClassOf: that causes the first class table page to become a visible array.  Add a hack fix on initialization.  SInce we /can/ fix the image manually this hack isn't necessary, but the manual fix won't work until the markAndTraceClassOf: bug is fixed.  Sigh...

=============== Diff against VMMaker.oscog-eem.1715 ===============

Item was changed:
  ----- Method: SpurMemoryManager>>markAndTraceClassOf: (in category 'gc - global') -----
  markAndTraceClassOf: objOop
  	"Ensure the class of the argument is marked, pushing it on the markStack if not already marked.
  	 And for one-way become, which can create duplicate entries in the class table, make sure
  	 objOop's classIndex refers to the classObj's actual classIndex.
  	 Note that this is recursive, but the metaclass chain should terminate quickly."
  	<inline: false>
  	| classIndex classObj realClassIndex |
  	classIndex := self classIndexOf: objOop.
  	classObj := self classOrNilAtIndex: classIndex.
  	self assert: (coInterpreter objCouldBeClassObj: classObj).
  	realClassIndex := self rawHashBitsOf: classObj.
+ 	(classIndex ~= realClassIndex
+ 	 and: [realClassIndex > self lastClassIndexPun]) ifTrue:
- 	classIndex ~= realClassIndex ifTrue:
  		[self setClassIndexOf: objOop to: realClassIndex].
  	(self isMarked: classObj) ifFalse:
  		[self setIsMarkedOf: classObj to: true.
  		 self markAndTraceClassOf: classObj.
  		 self push: classObj onObjStack: markStack]!

Item was changed:
  ----- Method: SpurMemoryManager>>setHiddenRootsObj: (in category 'class table') -----
  setHiddenRootsObj: anOop
  	hiddenRootsObj := anOop.
  	self cCode: [self assert: self validClassTableRootPages]
  		inSmalltalk: [numClassTablePages ifNotNil:
  						[self assert: self validClassTableRootPages]].
  	classTableFirstPage := self fetchPointer: 0 ofObject: hiddenRootsObj.
  	self assert: (self numSlotsOf: classTableFirstPage) - 1 = self classTableMinorIndexMask.
+ 	"Hack fix.  A bug in markAndTraceClassOf: caused the class of the first class table page
+ 	 to be changed from its pun.  This can be restored manually, but we do it here too."
+ 	self flag: 'remove at some stage'.
+ 	(self classIndexOf: classTableFirstPage) ~= self arrayClassIndexPun ifTrue:
+ 		[self setClassIndexOf: classTableFirstPage to: self arrayClassIndexPun].
  	"Set classTableIndex to the start of the last used page (excepting first page).
  	 Set numClassTablePages to the number of used pages."
  	numClassTablePages := self classTableRootSlots.
  	2 to: numClassTablePages - 1 do:
  		[:i|
  		(self fetchPointer: i ofObject: hiddenRootsObj) = nilObj ifTrue:
  			[numClassTablePages := i.
  			 classTableIndex := (numClassTablePages - 1 max: 1) << self classTableMajorIndexShift.
  			 ^self]].
  	"no unused pages; set it to the start of the second page."
  	classTableIndex := 1 << self classTableMajorIndexShift!



More information about the Vm-dev mailing list