<div dir="ltr">Once you recompileAll, they do not fail anymore.<br>Still the same problem, Compiler recompileAll will leave unbound CompiledMethod here and there.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/4/12 Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Fri, 12 Apr 2013, Frank Shearar wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This, and the other decompiler test failure, happens because of the<br>
recent chained assignment work:<br>
<br>
original snippet:<br>
<br>
   ActiveWorld := ActiveHand := ActiveEvent := nil.<br>
<br>
decompiled version of sameL<br>
<br>
   ActiveEvent := nil.<br>
   ActiveHand := nil.<br>
   ActiveWorld := nil.<br>
<br>
How to fix?<br>
</blockquote>
<br></div></div>
The only method with this assignment chain in my image is MorphicProject <br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
#saveState . The bytecodes for this line are:<br>
</blockquote></blockquote>
<br>
73 &lt;73&gt; pushConstant: nil<br>
74 &lt;81 C5&gt; storeIntoLit: ActiveEvent<br>
76 &lt;81 C6&gt; storeIntoLit: ActiveHand<br>
78 &lt;82 C7&gt; popIntoLit: ActiveWorld<br>
<br>
And the decompiler can reproduce the original code.<br>
<br>
If I recompile this method (which should have been done due to the Environments changes, but for some reason it hasn&#39;t happened yet), then there&#39;s a bug in the compiler. The bytecodes will be:<br>
<br>
78 &lt;25&gt; pushConstant: ##ActiveWorld<br>
79 &lt;73&gt; pushConstant: nil<br>
80 &lt;27&gt; pushConstant: ##ActiveEvent<br>
81 &lt;80 41&gt; pushTemp: 1<br>
83 &lt;CA&gt; send: value:<br>
84 &lt;87&gt; pop<br>
85 &lt;26&gt; pushConstant: ##ActiveHand<br>
86 &lt;80 41&gt; pushTemp: 1<br>
88 &lt;CA&gt; send: value:<br>
89 &lt;87&gt; pop<br>
90 &lt;CA&gt; send: value:<br>
91 &lt;87&gt; pop<br>
<br>
Which are obviously wrong.<br>
<br>
Creating a new method with just a simple assignment chain:<br>
<br>
foo<br>
<br>
        GlobalA := GlobalB := $a<br>
<br>
generetes:<br>
<br>
25 &lt;20&gt; pushConstant: ##GlobalA<br>
26 &lt;22&gt; pushConstant: $a<br>
27 &lt;21&gt; pushConstant: ##GlobalB<br>
28 &lt;80 41&gt; pushTemp: 1<br>
30 &lt;CA&gt; send: value:<br>
31 &lt;87&gt; pop<br>
32 &lt;CA&gt; send: value:<br>
33 &lt;87&gt; pop<br>
34 &lt;78&gt; returnSelf<br>
<br>
Which still has the pushTemp: 1. But this method has 0 temporaries, so it&#39;s a compiler bug. I wonder how the decompiler can decompile anything<br>
meaningful from this, and how the VM doesn&#39;t crash.<br>
<br>
<br>
Levente<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
frank<br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>