Hi Nicolas,<div><br></div><div>    this is fixed in my working image.  I&#39;ll try and move changes into trunk later this week.  There are also some compiler fixes for nilling block-local temps tat need to be included (i.e. in the below delta should have the value nil before the assignment, not the value it had from the previous iteration).  But I can&#39;t get to it right now.</div>
<div><br></div><div>best</div><div>Eliot<br><br><div class="gmail_quote">On Tue, Mar 2, 2010 at 2:17 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I think I narrowed a bit the offending code:<br>
<br>
eventTickler2<br>
        &quot;For debugging Decompiler&quot;<br>
        [| delta |<br>
        [delta := true] yourself.<br>
        delta ] whileTrue.<br>
<br>
(EventSensor&gt;&gt;#eventTickler2) decompile<br>
 eventTickler2<br>
        [[_r1 := true] yourself.<br>
        _r1] whileTrue<br>
<br>
<br>
17 &lt;8A 01&gt; push: (Array new: 1)<br>
19 &lt;68&gt; popIntoTemp: 0<br>
20 &lt;10&gt; pushTemp: 0<br>
21 &lt;8F 10 00 05&gt; closureNumCopied: 1 numArgs: 0 bytes 25 to 29<br>
25      &lt;71&gt; pushConstant: true<br>
26      &lt;8D 00 00&gt; storeIntoTemp: 0 inVectorAt: 0<br>
29      &lt;7D&gt; blockReturn<br>
30 &lt;D0&gt; send: yourself<br>
31 &lt;87&gt; pop<br>
32 &lt;8C 00 00&gt; pushTemp: 0 inVectorAt: 0<br>
35 &lt;99&gt; jumpFalse: 38<br>
36 &lt;A3 EB&gt; jumpTo: 17<br>
38 &lt;78&gt; returnSelf<br>
<br>
<br>
All is well untill Decompiler tries to interpret instruction 35 &lt;99&gt;<br>
jumpFalse: 38<br>
We enter Decompiler&gt;&gt;#jump:if:<br>
...snip...<br>
        &quot;if jump goes back, then it&#39;s a loop&quot;<br>
        thenJump &lt; elseStart<br>
                ifTrue:<br>
                        [&quot;Must be a while loop...<br>
                          thenJump will jump to the beginning of the while expr.  In the<br>
case of while&#39;s<br>
                          with a block in the condition, the while expr should include more than just<br>
                          the last expression: find all the statements needed by re-decompiling.&quot;<br>
                        stack := saveStack.<br>
                        pc := thenJump.<br>
                        blockBody := self statementsTo: elsePc.<br>
We go back and reinterpret what we already interpreted... But this<br>
time we already get a RemoteTempVectorNode in the tempVars...<br>
And we are gonna create a RemoteTempVectorNode  on a<br>
RemoteTempVectorNode next time we interpret the closure byte code 17<br>
&lt;8A 01&gt; push: (Array new: 1)...<br>
So the second pass will decompile _r1 instead of t1...<br>
<br>
I don&#39;t feel like correcting the monster  Decompiler&gt;&gt;#jump:if:<br>
Maybe I will just set a tweak in RemoteTempVectorNode creation...<br>
<font color="#888888"><br>
Nicolas<br>
<br>
</font></blockquote></div><br></div>