[Vm-dev] VM Maker: VMMaker.oscog-eem.419.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Sep 30 19:24:15 UTC 2013
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.419.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.419
Author: eem
Time: 30 September 2013, 12:20:58.18 pm
UUID: c200c5ad-4e63-4a11-8f12-91986fc1781b
Ancestors: VMMaker.oscog-eem.418
Handle forwarded message selectors in send fault processing.
=============== Diff against VMMaker.oscog-eem.418 ===============
Item was changed:
----- Method: StackInterpreter>>findNewMethodInClassTag: (in category 'message sending') -----
+ findNewMethodInClassTag: classTagArg
- findNewMethodInClassTag: classTag
"Find the compiled method to be run when the current
messageSelector is sent to the given class, setting the values
of 'newMethod' and 'primitiveIndex'."
+ | ok class classTag |
- | ok class |
<inline: false>
+ ok := self lookupInMethodCacheSel: messageSelector classTag: classTagArg.
- ok := self lookupInMethodCacheSel: messageSelector classTag: classTag.
ok ifFalse: "entry was not found in the cache; look it up the hard way "
+ [classTag := classTagArg.
+ ((objectMemory isOopForwarded: messageSelector)
+ or: [objectMemory isForwardedClassTag: classTag]) ifTrue:
+ [(objectMemory isOopForwarded: messageSelector) ifTrue:
+ [messageSelector := self handleForwardedSelectorFaultFor: messageSelector].
+ (objectMemory isForwardedClassTag: classTag) ifTrue:
+ [classTag := self handleForwardedSendFaultFor: classTag].
+ ok := self lookupInMethodCacheSel: messageSelector classTag: classTag.
- [(objectMemory isForwardedClassTag: lkupClassTag) ifTrue:
- [lkupClassTag := self handleForwardedSendFaultFor: lkupClassTag.
- ok := self lookupInMethodCacheSel: messageSelector classTag: lkupClassTag.
ok ifTrue:
[^nil]].
class := objectMemory classForClassTag: classTag.
self lookupMethodInClass: class.
self addNewMethodToCache: class]!
Item was added:
+ ----- Method: StackInterpreter>>handleForwardedSelectorFaultFor: (in category 'message sending') -----
+ handleForwardedSelectorFaultFor: selectorOop
+ "Handle a send fault that is due to a send using a forwarded selector.
+ Unforward the selector and follow the current method and special
+ selectors array to unforward the source of the forwarded selector."
+ self assert: (objectMemory isOopForwarded: selectorOop).
+
+ objectMemory
+ followForwardedObjectFields: method
+ toDepth: 0;
+ followForwardedObjectFields: (objectMemory splObj: SpecialSelectors)
+ toDepth: 0.
+ ^objectMemory followForwarded: selectorOop!
Item was changed:
----- Method: StackInterpreter>>internalFindNewMethod (in category 'message sending') -----
internalFindNewMethod
"Find the compiled method to be run when the current messageSelector is sent to the class 'lkupClass', setting the values of 'newMethod' and 'primitiveIndex'."
| ok |
<inline: true>
ok := self lookupInMethodCacheSel: messageSelector classTag: lkupClassTag.
ok ifFalse: "entry was not found in the cache; look it up the hard way"
[self externalizeIPandSP.
+ ((objectMemory isOopForwarded: messageSelector)
+ or: [objectMemory isForwardedClassTag: lkupClassTag]) ifTrue:
+ [(objectMemory isOopForwarded: messageSelector) ifTrue:
+ [messageSelector := self handleForwardedSelectorFaultFor: messageSelector].
+ (objectMemory isForwardedClassTag: lkupClassTag) ifTrue:
+ [lkupClassTag := self handleForwardedSendFaultFor: lkupClassTag].
- (objectMemory isForwardedClassTag: lkupClassTag) ifTrue:
- [lkupClassTag := self handleForwardedSendFaultFor: lkupClassTag.
ok := self lookupInMethodCacheSel: messageSelector classTag: lkupClassTag.
ok ifTrue:
[^nil]].
lkupClass := objectMemory classForClassTag: lkupClassTag.
self lookupMethodInClass: lkupClass.
self internalizeIPandSP.
self addNewMethodToCache: lkupClass]!
More information about the Vm-dev
mailing list