Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.132.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.132 Author: eem Time: 4 October 2011, 7:41:37.687 am UUID: bd35186a-b5f6-490a-ad8b-2a9c487674fa Ancestors: VMMaker.oscog-eem.131 Fix yet another slip in Cogit>>lookup:for:methodAndErrorSelectorInto: for cannotInterpret: cases. Fixes Mariano's crash as of 2011/10/03. =============== Diff against VMMaker.oscog-eem.131 =============== 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." - "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 the error selector - and a nil method." | methodOrSelectorIndex | <inline: true> methodOrSelectorIndex := coInterpreter lookup: selector receiver: receiver. methodOrSelectorIndex asUnsignedInteger > objectMemory startOfMemory 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 > objectMemory startOfMemory 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: selector]. + ^binaryBlock value: methodOrSelectorIndex value: SelectorDoesNotUnderstand]. + ^binaryBlock value: nil value: SelectorDoesNotUnderstand]. + ^binaryBlock value: nil value: methodOrSelectorIndex! - ^binaryBlock value: methodOrSelectorIndex value: SelectorDoesNotUnderstand]]. - ^binaryBlock value: methodOrSelectorIndex value: nil! |
Free forum by Nabble | Edit this page |