[Vm-dev] how can I check which selector is the VM executing?

Mariano Martinez Peck marianopeck at gmail.com
Thu Apr 28 10:22:33 UTC 2011

Hi. Suppose I am doing something in #commonSend:

    "Send a message, starting lookup with the receiver's class."
    "Assume: messageSelector and argumentCount have been set, and that
    the receiver and arguments have been pushed onto the stack,"
    "Note: This method is inlined into the interpreter dispatch loop."
    <sharedCodeNamed: 'commonSend' inCase: 131>
    self internalFindNewMethod.
    self internalExecuteNewMethod.
    self fetchNextBytecode

and somewhere there I want to do something like this:

(messageSelector = '#foo') ifTrue: [ self print: 'the message foo was
called'; cr ].

messageSelector is the instVar of Interpreter and it is already in the

Of course, the part that doesn't work is (messageSelector = '#foo')
I tried several things but I don't find how to do it.

Thank in advance

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110428/326960d7/attachment.htm

More information about the Vm-dev mailing list