<br><br><div class="gmail_quote">On Mon, May 10, 2010 at 5:09 PM, Igor Stasenko <span dir="ltr"><<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
just add some flag to interpreter state (ivar), like 'enableTrace'<br>
and a primitive which sets it to true or false.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br>What an idiot I am...thanks Igor. Sorry for the newbie/stupid questions. I am still new in this VM world and sometimes I don't know where I am (in OO or C world) and how to communicate from one to the other one. <br>
<br>That worked perfectly.<br><br>Thanks again.<br><br>Mariano<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div class="h5">
On 10 May 2010 17:33, Mariano Martinez Peck <<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>> wrote:<br>
><br>
> Hi folks. I need to intercept all messages. For such purpose, I modified Interpreter >> normalSend like this:<br>
><br>
><br>
> normalSend<br>
> "Send a message, starting lookup with the receiver's class."<br>
> "Assume: messageSelector and argumentCount have been set, and that<br>
> the receiver and arguments have been pushed onto the stack,"<br>
> "Note: This method is inlined into the interpreter dispatch loop."<br>
> | rcvr |<br>
> self inline: true.<br>
> self sharedCodeNamed: 'normalSend' inCase: 131.<br>
> rcvr := self internalStackValue: argumentCount.<br>
> (self isIntegerObject: rcvr)<br>
> ifFalse: [<br>
> self doSomething: rcvr.<br>
> ].<br>
> lkupClass := self fetchClassOf: rcvr.<br>
> receiverClass := lkupClass.<br>
> self commonSend.<br>
><br>
><br>
><br>
> 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.<br>
><br>
> 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 ?<br>
><br>
> Thank you very much.<br>
><br>
> Mariano<br>
><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
</font></blockquote></div><br>