[Vm-dev] Set and get values from the VM AND the image

Igor Stasenko siguctua at gmail.com
Mon May 10 15:09:13 UTC 2010


just add some flag to interpreter state (ivar), like 'enableTrace'
and a primitive which sets it to true or false.

On 10 May 2010 17:33, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
>
> Hi folks. I need to intercept all messages. For such purpose, I modified Interpreter >> normalSend like this:
>
>
> normalSend
>     "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."
>     | rcvr |
>     self inline: true.
>     self sharedCodeNamed: 'normalSend' inCase: 131.
>     rcvr := self internalStackValue: argumentCount.
>     (self isIntegerObject:  rcvr)
>         ifFalse: [
>             self doSomething: rcvr.
>             ].
>     lkupClass := self fetchClassOf: rcvr.
>     receiverClass := lkupClass.
>     self commonSend.
>
>
>
> But now, from the IMAGE side I would like to enable or disable such intercept. It would be great if from the Image side I can set a value to a boolean and read such value and ask, from the VM side.
>
> Do you know if I can do this?  Should I use specialObjectArray ?  If true, can you give me a hint of how to do it ?
>
> Thank you very much.
>
> Mariano
>
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list