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

commits at source.squeak.org commits at source.squeak.org
Wed Feb 11 03:00:27 UTC 2015


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

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

Name: VMMaker.oscog-eem.1051
Author: eem
Time: 10 February 2015, 6:58:51.832 pm
UUID: 75c9356f-fb1e-4f2b-99a7-21725cccaa91
Ancestors: VMMaker.oscog-eem.1050

...and rescue compilation of the cogits given the change to
checkIntegrityOfObjectReferencesInCode: in VMMaker.oscog-eem.1048

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

Item was added:
+ ----- Method: CogObjectRepresentation>>hasSpurMemoryManagerAPI (in category 'testing') -----
+ hasSpurMemoryManagerAPI
+ 	^false!

Item was added:
+ ----- Method: CogObjectRepresentationForSpur>>hasSpurMemoryManagerAPI (in category 'testing') -----
+ hasSpurMemoryManagerAPI
+ 	^true!

Item was changed:
  ----- Method: Cogit>>checkIntegrityOfObjectReferencesInCode: (in category 'debugging') -----
  checkIntegrityOfObjectReferencesInCode: gcModes
  	<api>
  	"Answer if all references to objects in machine-code are valid."	
  	| cogMethod ok count |
  	<var: #cogMethod type: #'CogMethod *'>
  	cogMethod := self cCoerceSimple: methodZoneBase to: #'CogMethod *'.
  	ok := true.
  	[cogMethod < methodZone limitZony] whileTrue:
  		[cogMethod cmType ~= CMFree ifTrue:
  			[cogMethod cmRefersToYoung ifTrue:
  				[(count := methodZone occurrencesInYoungReferrers: cogMethod) ~= 1 ifTrue:
  					[coInterpreter print: 'young referrer CM '; printHex: cogMethod asInteger.
  					 count = 0
  						ifTrue: [coInterpreter print: ' is not in youngReferrers'; cr]
  						ifFalse: [coInterpreter print: ' is in youngReferrers '; printNum: count; print: ' times!!'; cr].
  					 ok := false]].
  			 (objectRepresentation checkValidOopReference: cogMethod selector) ifFalse:
  				[coInterpreter print: 'object leak in CM '; printHex: cogMethod asInteger; print: ' selector'; cr.
  				 ok := false].
  			 cogMethod cmType = CMMethod
  				ifTrue:
  					[self assert: cogMethod objectHeader = objectMemory nullHeaderForMachineCodeMethod.
  					 (objectRepresentation checkValidObjectReference: cogMethod methodObject) ifFalse:
  						[coInterpreter print: 'object leak in CM '; printHex: cogMethod asInteger; print: ' methodObject'; cr.
  						 ok := false].
  					 (objectMemory isOopCompiledMethod: cogMethod methodObject) ifFalse:
  						[coInterpreter print: 'non-method in CM '; printHex: cogMethod asInteger; print: ' methodObject'; cr.
  						 ok := false].
  					 (self mapFor: cogMethod
  						 performUntil: #checkIfValidOopRef:pc:cogMethod:
  						 arg: cogMethod asInteger) ~= 0
  							ifTrue: [ok := false].
+ 					 (objectRepresentation hasSpurMemoryManagerAPI
- 					 (objectMemory hasSpurMemoryManagerAPI
  					  or: [gcModes anyMask: GCModeNewSpace]) ifTrue:
  						[(((objectMemory isYoungObject: cogMethod methodObject)
  						    or: [objectMemory isYoung: cogMethod selector])
  						   and: [cogMethod cmRefersToYoung not]) ifTrue:
  							[coInterpreter print: 'CM '; printHex: cogMethod asInteger; print: ' refers to young but not marked as such'; cr.
  							 ok := false]]]
  				ifFalse:
  					[cogMethod cmType = CMClosedPIC
  						ifTrue:
  							[(self checkValidObjectReferencesInClosedPIC: cogMethod) ifFalse:
  								[ok := false]]
  						ifFalse:
  							[cogMethod cmType = CMOpenPIC
  								ifTrue:
  									[(self mapFor: cogMethod
  										performUntil: #checkIfValidOopRef:pc:cogMethod:
  										arg: cogMethod asInteger) ~= 0
  											ifTrue: [ok := false]]]]].
  		cogMethod := methodZone methodAfter: cogMethod].
  	^ok!



More information about the Vm-dev mailing list