<br><br><div class="gmail_quote">On Mon, May 10, 2010 at 5:09 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</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 &#39;enableTrace&#39;<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&#39;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 &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi folks. I need to intercept all messages. For such purpose, I modified Interpreter &gt;&gt; normalSend like this:<br>
&gt;<br>
&gt;<br>
&gt; normalSend<br>
&gt;     &quot;Send a message, starting lookup with the receiver&#39;s class.&quot;<br>
&gt;     &quot;Assume: messageSelector and argumentCount have been set, and that<br>
&gt;     the receiver and arguments have been pushed onto the stack,&quot;<br>
&gt;     &quot;Note: This method is inlined into the interpreter dispatch loop.&quot;<br>
&gt;     | rcvr |<br>
&gt;     self inline: true.<br>
&gt;     self sharedCodeNamed: &#39;normalSend&#39; inCase: 131.<br>
&gt;     rcvr := self internalStackValue: argumentCount.<br>
&gt;     (self isIntegerObject:  rcvr)<br>
&gt;         ifFalse: [<br>
&gt;             self doSomething: rcvr.<br>
&gt;             ].<br>
&gt;     lkupClass := self fetchClassOf: rcvr.<br>
&gt;     receiverClass := lkupClass.<br>
&gt;     self commonSend.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; Thank you very much.<br>
&gt;<br>
&gt; Mariano<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
</font></blockquote></div><br>