<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"><<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>></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 <73> pushConstant: nil<br>
74 <81 C5> storeIntoLit: ActiveEvent<br>
76 <81 C6> storeIntoLit: ActiveHand<br>
78 <82 C7> 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't happened yet), then there's a bug in the compiler. The bytecodes will be:<br>
<br>
78 <25> pushConstant: ##ActiveWorld<br>
79 <73> pushConstant: nil<br>
80 <27> pushConstant: ##ActiveEvent<br>
81 <80 41> pushTemp: 1<br>
83 <CA> send: value:<br>
84 <87> pop<br>
85 <26> pushConstant: ##ActiveHand<br>
86 <80 41> pushTemp: 1<br>
88 <CA> send: value:<br>
89 <87> pop<br>
90 <CA> send: value:<br>
91 <87> 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 <20> pushConstant: ##GlobalA<br>
26 <22> pushConstant: $a<br>
27 <21> pushConstant: ##GlobalB<br>
28 <80 41> pushTemp: 1<br>
30 <CA> send: value:<br>
31 <87> pop<br>
32 <CA> send: value:<br>
33 <87> pop<br>
34 <78> returnSelf<br>
<br>
Which still has the pushTemp: 1. But this method has 0 temporaries, so it's a compiler bug. I wonder how the decompiler can decompile anything<br>
meaningful from this, and how the VM doesn'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>