[Vm-dev] VM Maker: VMMaker.oscog-rmacnak.1383.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jun 26 04:59:39 UTC 2015
Ryan Macnak uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-rmacnak.1383.mcz
==================== Summary ====================
Name: VMMaker.oscog-rmacnak.1383
Author: rmacnak
Time: 25 June 2015, 9:58:12.556 pm
UUID: 07614259-3b43-4981-afba-ab17e3835074
Ancestors: VMMaker.oscog-rmacnak.1382
Set lkupClass when MNU because of protected method in lookupOrdinaryNoMNUEtcInClass:. Remove duplicate lookup in findNewMethodInClassTag:.
=============== Diff against VMMaker.oscog-rmacnak.1382 ===============
Item was changed:
----- Method: CoInterpreter>>findNewMethodInClassTag: (in category 'message sending') -----
findNewMethodInClassTag: classTagArg
"Find the compiled method to be run when the current messageSelector is
sent to the given classTag, setting the values of newMethod and primitiveIndex."
| ok classTag |
<inline: false>
ok := self lookupInMethodCacheSel: messageSelector classTag: classTagArg.
ok ifTrue:
[self ifAppropriateCompileToNativeCode: newMethod selector: messageSelector]
ifFalse:
["entry was not found in the cache; perhaps soemthing was forwarded."
classTag := classTagArg.
((objectMemory isOopForwarded: messageSelector)
or: [objectMemory isForwardedClassTag: classTag]) ifTrue:
[(objectMemory isOopForwarded: messageSelector) ifTrue:
[messageSelector := self handleForwardedSelectorFaultFor: messageSelector].
(objectMemory isForwardedClassTag: classTag) ifTrue:
[classTag := self handleForwardedSendFaultForTag: classTag].
ok := self lookupInMethodCacheSel: messageSelector classTag: classTag.
ok ifTrue:
[^self ifAppropriateCompileToNativeCode: newMethod selector: messageSelector]].
"entry was not found in the cache; look it up the hard way "
lkupClass := objectMemory classForClassTag: classTag.
self cppIf: #NewspeakVM
ifTrue: [self lookupOrdinarySend]
ifFalse: [self lookupMethodInClass: lkupClass].
- self lookupMethodInClass: lkupClass.
self addNewMethodToCache: lkupClass]!
Item was changed:
----- Method: StackInterpreter>>lookupOrdinaryNoMNUEtcInClass: (in category 'message sending') -----
lookupOrdinaryNoMNUEtcInClass: class
"Lookup messageSelector in class. Answer 0 on success. Answer the splObj: index
for the error selector to use on failure rather than performing MNU processing etc."
| currentClass dictionary found |
<inline: false>
currentClass := class.
[currentClass ~= objectMemory nilObject] whileTrue:
[dictionary := objectMemory followObjField: MethodDictionaryIndex ofObject: currentClass.
dictionary = objectMemory nilObject ifTrue:
[lkupClass := self superclassOf: currentClass.
^SelectorCannotInterpret].
found := self lookupMethodInDictionary: dictionary.
self cppIf: #NewspeakVM
ifTrue:
[found ifTrue:
[(self accessModifierOfMethod: newMethod) == AccessModifierPublic
ifTrue: [self addNewMethodToCache: class. ^0].
(self accessModifierOfMethod: newMethod) == AccessModifierProtected
+ ifTrue: [lkupClass := class. ^SelectorDoesNotUnderstand]]]
- ifTrue: [^SelectorDoesNotUnderstand]]]
ifFalse:
[found ifTrue: [self addNewMethodToCache: class. ^0]].
currentClass := self superclassOf: currentClass].
lkupClass := class.
^SelectorDoesNotUnderstand!
More information about the Vm-dev
mailing list