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

commits at source.squeak.org commits at source.squeak.org
Sat Dec 28 23:15:37 UTC 2019


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

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

Name: VMMaker.oscog-eem.2644
Author: eem
Time: 28 December 2019, 3:15:24.53656 pm
UUID: 805f6c57-b207-47be-a317-5df317516d88
Ancestors: VMMaker.oscog-eem.2643

lookup32BitWordConstant: needs to be more robust.

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

Item was changed:
  ----- Method: SpurMemoryManager>>lookup32BitWordConstant: (in category 'simulation only') -----
  lookup32BitWordConstant: word
  	"If word appears to be a class index answer the class name, otherwise answer nil.
  	 For code disassembly"
  	<doNotGenerate>
  	| class classSize classNameIndex thisClassIndex |
+ 	(word between: 1 and: self classIndexMask) ifFalse:
+ 		[^nil].
  	class := self noCheckClassAtIndex: word.
  	(class isNil or: [class = nilObj]) ifTrue:
  		[^nil].	"address is either a class or a metaclass, or an instance of a class or invalid.  determine which."
  	classNameIndex := coInterpreter classNameIndex.
  	thisClassIndex := coInterpreter thisClassIndex.
  	((classSize := self numSlotsOf: class) <= (classNameIndex max: thisClassIndex)
  	 or: [classSize > 255]) ifTrue:
  		[^nil].
  	"Address could be a class or a metaclass"
  	(self lookupAddress: (self fetchPointer: classNameIndex ofObject: class)) ifNotNil:
  		[:maybeClassName| ^maybeClassName allButFirst].
  	(self lookupAddress: (self fetchPointer: thisClassIndex ofObject: class)) ifNotNil:
  		[:maybeClassName| ^maybeClassName allButFirst, ' class'].!



More information about the Vm-dev mailing list