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

commits at source.squeak.org commits at source.squeak.org
Tue Sep 30 17:03:39 UTC 2014


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

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

Name: VMMaker.oscog-eem.888
Author: eem
Time: 30 September 2014, 9:59:29.051 am
UUID: e58fb0f2-df49-4ac0-8e84-48499470b5f6
Ancestors: VMMaker.oscog-eem.887

Fix bug in Cogit>>lookup:for:methodAndErrorSelectorInto:
which if cogging a metod found through an MNU
would set the cog method's selector to the original
selector that was not understood instead of
#doesNotUnderstand:.

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

Item was changed:
  ----- Method: Cogit>>lookup:for:methodAndErrorSelectorInto: (in category 'in-line cacheing') -----
  lookup: selector for: receiver methodAndErrorSelectorInto: binaryBlock
  	"Lookup selector in the class of receiver.  If found, evaluate binaryBlock with the
  	 method, cogged if appropriate..  If not found, due to MNU, lookup the DNU selector
  	 and evaluate binaryBlock with the MNU method, cogged if appropriate..  If not found
  	 due to cannot interpret, evaluate binaryBlock with a nil method and the error selector."
  	| methodOrSelectorIndex |
  	<inline: true>
  	methodOrSelectorIndex := coInterpreter
  									lookup: selector
  									receiver: receiver.
  	methodOrSelectorIndex asUnsignedInteger > coInterpreter maxLookupNoMNUErrorCode ifTrue:
  		[(objectMemory isOopCompiledMethod: methodOrSelectorIndex) ifFalse:
  			[^binaryBlock value: methodOrSelectorIndex value: SelectorCannotInterpret].
  		 ((coInterpreter methodHasCogMethod: methodOrSelectorIndex) not
  		  and: [coInterpreter methodShouldBeCogged: methodOrSelectorIndex]) ifTrue:
  			["We assume cog:selector: will *not* reclaim the method zone"
  			 self cog: methodOrSelectorIndex selector: selector].
  		^binaryBlock value: methodOrSelectorIndex value: nil].
  	methodOrSelectorIndex = SelectorDoesNotUnderstand ifTrue:
  		[methodOrSelectorIndex := coInterpreter
  										lookup: (objectMemory splObj: SelectorDoesNotUnderstand)
  										receiver: receiver.
  		 methodOrSelectorIndex asUnsignedInteger > coInterpreter maxLookupNoMNUErrorCode ifTrue:
  			[self assert: (objectMemory isOopCompiledMethod: methodOrSelectorIndex).
  			 ((coInterpreter methodHasCogMethod: methodOrSelectorIndex) not
  			  and: [coInterpreter methodShouldBeCogged: methodOrSelectorIndex]) ifTrue:
  				["We assume cog:selector: will *not* reclaim the method zone"
+ 				 self cog: methodOrSelectorIndex selector: (objectMemory splObj: SelectorDoesNotUnderstand)].
- 				 self cog: methodOrSelectorIndex selector: selector].
  			^binaryBlock value: methodOrSelectorIndex value: SelectorDoesNotUnderstand].
  		^binaryBlock value: nil value: SelectorDoesNotUnderstand].
  	^binaryBlock value: nil value: methodOrSelectorIndex!



More information about the Vm-dev mailing list