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

commits at source.squeak.org commits at source.squeak.org
Thu Jan 30 01:24:14 UTC 2014


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

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

Name: VMMaker.oscog-eem.596
Author: eem
Time: 29 January 2014, 5:21:10.663 pm
UUID: 2fdbc6e9-ad25-4c1c-8125-0fa1f3a8dbb5
Ancestors: VMMaker.oscog-eem.595

Fix the isValidSegmentBridge: assert for the last bridge.

Add printLikelyImplementorsOfSelector: for help during debugging.

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

Item was removed:
- ----- Method: CogVMSimulator>>penultimateLiteralOf: (in category 'simulation only') -----
- penultimateLiteralOf: aMethodOop
- 	self assert: (objectMemory isOopCompiledMethod: aMethodOop).
- 	^self literal: (self literalCountOf: aMethodOop) - 2 ofMethod: aMethodOop!

Item was changed:
  ----- Method: SpurSegmentManager>>isValidSegmentBridge: (in category 'testing') -----
  isValidSegmentBridge: objOop
  	"bridges bridge the gaps between segments. They are the last object in each segment."
+ 	^((manager addressCouldBeObj: objOop) or: [objOop = manager endOfMemory])
- 	^(manager addressCouldBeObj: objOop)
  	  and: [(manager isSegmentBridge: objOop)
  	  and: [(manager hasOverflowHeader: objOop)
  		or: [(manager numSlotsOfAny: objOop) = 0]]]!

Item was added:
+ ----- Method: StackInterpreter>>penultimateLiteralOf: (in category 'debug printing') -----
+ penultimateLiteralOf: aMethodOop
+ 	self assert: (objectMemory isOopCompiledMethod: aMethodOop).
+ 	^self literal: (self literalCountOf: aMethodOop) - 2 ofMethod: aMethodOop!

Item was added:
+ ----- Method: StackInterpreter>>printLikelyImplementorsOfSelector: (in category 'debug printing') -----
+ printLikelyImplementorsOfSelector: selector
+ 	"Print all methods whose penultimate literal is either selector,
+ 	 or an object whose first inst var is the method and whose
+ 	 second is selector (e.g. an AdditionalMethodState)."
+ 	<api>
+ 	objectMemory allObjectsDo:
+ 		[:obj| | penultimateLiteral methodClassAssociation |
+ 		(objectMemory isCompiledMethod: obj) ifTrue:
+ 			[penultimateLiteral := self penultimateLiteralOf: obj.
+ 			 (penultimateLiteral = selector
+ 			 or: [(objectMemory isPointers: penultimateLiteral)
+ 				and: [(objectMemory numSlotsOf: penultimateLiteral) >= 2
+ 				and: [(objectMemory fetchPointer: 0 ofObject: penultimateLiteral) = obj
+ 				and: [(objectMemory fetchPointer: 1 ofObject: penultimateLiteral) = selector]]]]) ifTrue:
+ 				["try and print the key of the method class association (the name of the implementing class)"
+ 				 methodClassAssociation := self methodClassAssociationOf: obj.
+ 				 self printHexnp: obj;
+ 					space;
+ 					printOopShortInner: (((objectMemory isPointers: methodClassAssociation)
+ 										  and: [(objectMemory numSlotsOf: methodClassAssociation) >= 2])
+ 											ifTrue: [objectMemory fetchPointer: 0 ofObject: methodClassAssociation]
+ 											ifFalse: [methodClassAssociation]);
+ 					cr]]]!

Item was removed:
- ----- Method: StackInterpreterSimulator>>penultimateLiteralOf: (in category 'simulation only') -----
- penultimateLiteralOf: aMethodOop
- 	self assert: (objectMemory isOopCompiledMethod: aMethodOop).
- 	^self literal: (self literalCountOf: aMethodOop) - 2 ofMethod: aMethodOop!



More information about the Vm-dev mailing list