<br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 5:51 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div></div><div class="h5"><br><div><div>On 12.04.2012, at 16:40, Eliot Miranda wrote:</div><br><blockquote type="cite">Hi Yoshiki,<br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 4:27 PM, Yoshiki Ohshima <span dir="ltr">&lt;<a href="mailto:Yoshiki.Ohshima@acm.org" target="_blank">Yoshiki.Ohshima@acm.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
At Thu, 12 Apr 2012 16:08:53 -0700,<br>
<div>Eliot Miranda wrote:<br>
&gt;<br>
&gt; Hi Yoshiki,<br>
&gt;<br>
&gt;     what&#39;s the image you&#39;re using, or at least what is it derived from?  Also, what&#39;s the result of (OMeta2 &gt;&gt; #token) symbolic ?<br>
<br>
</div>The image is one started from &quot;Squeak4.3alpha-11481&quot; and updated by<br>
pressing the &quot;update code from server&quot; button.  The result of<br>
#symbolic is like this:<br>
<br>
37 &lt;71&gt; pushConstant: true<br>
38 &lt;AC 0F&gt; jumpFalse: 55<br>
40 &lt;70&gt; self<br>
41 &lt;21&gt; pushConstant: #anything<br>
42 &lt;E0&gt; send: apply:<br>
43 &lt;68&gt; popIntoTemp: 0<br>
44 &lt;70&gt; self<br>
45 &lt;22&gt; pushConstant: #spaces<br>
46 &lt;E0&gt; send: apply:<br>
47 &lt;87&gt; pop<br>
48 &lt;70&gt; self<br>
49 &lt;24&gt; pushConstant: #seq<br>
50 &lt;10&gt; pushTemp: 0<br>
51 &lt;8A 81&gt; pop 1 into (Array new: 1)<br>
53 &lt;F3&gt; send: apply:withArgs:<br>
54 &lt;90&gt; jumpTo: 56<br>
55 &lt;73&gt; pushConstant: nil<br>
56 &lt;7C&gt; returnTop<br>
<br>
-- Yoshiki<br></blockquote><div><br></div><div>I can&#39;t reproduce this.  When I debug the following doit (which mimics your code) and inspect the context  I get a valid decompilation:</div><div><br></div><div><span style="white-space:pre-wrap">        </span>| t |</div>

<div>       ^ true</div><div>               ifTrue: [t := self apply: #anything.</div><div>                       self apply: #spaces.</div><div>                       self apply: #seq withArgs: {t}]</div><div><br></div>
<div>
the same code:</div><div><br></div><div>method symbolic</div><div>&#39;37 &lt;71&gt; pushConstant: true</div><div>38 &lt;AC 0F&gt; jumpFalse: 55</div><div>40 &lt;70&gt; self</div><div>41 &lt;21&gt; pushConstant: #anything</div>

<div>42 &lt;E0&gt; send: apply:</div><div>43 &lt;68&gt; popIntoTemp: 0</div><div>44 &lt;70&gt; self</div><div>45 &lt;22&gt; pushConstant: #spaces</div><div>46 &lt;E0&gt; send: apply:</div><div>47 &lt;87&gt; pop</div><div>

48 &lt;70&gt; self</div><div>49 &lt;24&gt; pushConstant: #seq</div><div>50 &lt;10&gt; pushTemp: 0</div><div>51 &lt;8A 81&gt; pop 1 into (Array new: 1)</div><div>53 &lt;F3&gt; send: apply:withArgs:</div><div>54 &lt;90&gt; jumpTo: 56</div>

<div>55 &lt;73&gt; pushConstant: nil</div><div>56 &lt;7C&gt; returnTop</div><div>&#39;</div><div><br></div><div>and decompileWithTemps returns something correct:</div><div><br></div><div>method decompileWithTemps</div><div>

DoIt</div><div><span style="white-space:pre-wrap">        </span>| t |</div><div><span style="white-space:pre-wrap">        </span>^ true</div><div><span style="white-space:pre-wrap">                </span>ifTrue: [t := self apply: #anything.</div>

<div><span style="white-space:pre-wrap">                        </span>self apply: #spaces.</div><div><span style="white-space:pre-wrap">                        </span>self apply: #seq withArgs: {t}] </div><div><br></div><div>So has OMeta patched some old bug in the decompiler which is now obsoleted by some other fix?</div>

</div></blockquote><br></div></div></div><div>The difference appears to be that the OMeta compiler answers &#39;(t)[(t)[(t)]]&#39; for the schematicTempNamesString. The regular compiler answers &#39;t&#39;. This trips the Decompiler over.</div>
</div></blockquote><div><br></div><div>Bingo.  OMeta looks to be computing the schematic temps for the method before inlining and closure analysis, in that the ifTrue: argument is an actual block according to that string.  Good catch!</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><font color="#888888"><div>
<div style="font-family:Helvetica;font-size:12px"><span style="font-family:Helvetica">- Bert -</span></div><span style="font-family:&#39;Lucida Grande&#39;;font-size:12px"><br></span>
</div>
<br></font></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>