Hi. Suppose I am doing something in #commonSend:

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 stack.

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

--
Mariano
http://marianopeck.wordpress.com