<br><br><div class="gmail_quote">On Sun, Oct 3, 2010 at 12:42 PM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</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><div style="word-wrap: break-word;"><div>What exactly are you trying to do?</div></div></blockquote><div><br>hehehe sorry. I am trying to &quot;detect unused objects&quot;.<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 style="word-wrap: break-word;"><div> When do you consider an object to be &quot;used&quot;? </div><div><br></div></div></blockquote><div><br>When it receives a message. This is why I changed #normalSend<br><br>Thanks in advance,<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 style="word-wrap: break-word;"><div></div><div><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: &#39;Lucida Grande&#39;; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="font-family: Helvetica;">
<span style="font-family: Helvetica;">- Bert -</span></div><br></span></div><div><div>On 03.10.2010, at 12:12, Mariano Martinez Peck wrote:</div><br><blockquote type="cite">Hi. I have a related question once again with this topic. I&#39;ve changed Interpreter &gt;&gt; normalSend to something like this:<br>
<br><br>normalSend<br>    &quot;Send a message, starting lookup with the receiver&#39;s class.&quot;<br>
    &quot;Assume: messageSelector and argumentCount have been set, and that <br>    the receiver and arguments have been pushed onto the stack,&quot;<br>    &quot;Note: This method is inlined into the interpreter dispatch loop.&quot;<br>

    | rcvr |<br>    self inline: true.<br>    self sharedCodeNamed: &#39;normalSend&#39; inCase: 131.<br>    rcvr := self internalStackValue: argumentCount.<br> <span style="background-color: rgb(255, 0, 0);">   ((self isIntegerObject: rcvr) not and: [hasToTrace])</span><br style="background-color: rgb(255, 0, 0);">

<span style="background-color: rgb(255, 0, 0);">        ifTrue: [ </span><br style="background-color: rgb(255, 0, 0);"><span style="background-color: rgb(255, 0, 0);">            self internalTurnOnUsedBit: rcvr.</span><br style="background-color: rgb(255, 0, 0);">

<span style="background-color: rgb(255, 0, 0);">            ].</span><br>    lkupClass := self fetchClassOf: rcvr.<br>    receiverClass := lkupClass.<br>    self commonSend.<br><br><br>So...if it is not a SmallInetger and if the flag is on, I turn on a bit. <br>

<br>The question is, if I send a normal message to a normal object. Example:<br><br>| anObject |<br>anObject := MyClass new.<br>anObject foo<br><br>Now...I am sure that &quot;anObject&quot; was marked with the bit. But what about:<br>

a) the compiled method  MyClass &gt;&gt; #foo<br>b) MyClass<br><br>should they be marked?<br><br>In other words:<br><br>self deny: (unUsed primitiveGetUsedBit: anObject).<br>    self deny: (unUsed primitiveGetUsedBit: anObject class).<br>

    self deny: (unUsed primitiveGetUsedBit: (anObject class &gt;&gt; #foo)).<br>    <br>     anObject foo.<br><br>    self assert: (unUsed primitiveGetUsedBit: anObject).<br>    self assert: (unUsed primitiveGetUsedBit: anObject class).<br>

    self assert: (unUsed primitiveGetUsedBit: (anObject class &gt;&gt; #foo)).<br>    <br><br>should all the asserts pass?  I ask because I don&#39;t know how CompiledMethods are executed (they receive a normalSend like any other object?) nor how class are accessed.<br>

<br>Thanks in advance,<br><br>Mariano<br><br><br><div class="gmail_quote">On Tue, May 11, 2010 at 5:43 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com" target="_blank">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;"><div><br>
On 11 May 2010 17:40, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks Igor. I could see #class does not the normal way. It was logic as it already has the pointer there ;)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Now I wonder...to avoid those special cases, do you think it makes sense to intercept in commonSend rather than commonSend ?  or it would be the same ?<br>
&gt;&gt; &gt;<br>
&gt;&gt; err... commonSend or commonSend? i think it would be the same :)<br>
&gt;&gt;<br>
&gt;<br>
&gt; hahahah sorry, I meant commonSend instead of normalSend.<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; the other point, where you can try intercept a send is cache lookup.<br>
&gt;&gt;<br>
&gt;<br>
&gt; internalFindNewMethod  ?<br>
&gt;<br>
<br>
</div>I don&#39;t know, maybe :)<br>
<div><br>
&gt; Thanks<br>
&gt;<br>
&gt; Mariano<br>
&gt;<br></div></blockquote></div></blockquote></div><div>
<span style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Lucida Grande; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="font-family: Helvetica;">
<font face="&#39;Lucida Grande&#39;"><span style="font-size: medium;"><font face="Helvetica"><br></font></span></font></div></span></div></div><br></blockquote></div><br>