Hi David,<br><br><div class="gmail_quote">On Tue, May 18, 2010 at 4:33 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, May 18, 2010 at 02:17:40PM -0700, Eliot Miranda wrote:<br>
&gt; Hi Hans-Martin,<br>
&gt;<br>
&gt; On Tue, May 18, 2010 at 12:15 PM, Hans-Martin Mosner &lt;<a href="mailto:hmm@heeg.de">hmm@heeg.de</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hello,<br>
&gt; &gt; while looking at the decompiled code of some OMeta methods I noticed<br>
&gt; &gt; that the temp name handling in the decompiler seems to be broken.<br>
&gt; &gt; When you compile a method with temps that are referenced from blocks,<br>
&gt; &gt; the decompiler tends to rearrange the temp names, so this method<br>
&gt; &gt;<br>
&gt; &gt; test<br>
&gt; &gt;    | one two |<br>
&gt; &gt;    two := 2.<br>
&gt; &gt;    ^{[one := 1].<br>
&gt; &gt;    [ [one + two] value]}<br>
&gt; &gt;<br>
&gt; &gt; gets decompiled to this:<br>
&gt; &gt;<br>
&gt; &gt; test<br>
&gt; &gt;    | one two |<br>
&gt; &gt;    one := 2.<br>
&gt; &gt;    ^ {[two := 1]. [[two + one] value]}<br>
&gt; &gt;<br>
&gt;<br>
&gt; OK, the issue in Squeak 4.1 is that the<br>
&gt; CodeHolder&gt;&gt;decompiledSourceIntoContents method is out of date.  Find<br>
&gt; attached.<br>
<br>
</div>I tried the Decompiler.1.cs patch in Squeak trunk, and it produces some undesirable<br>
side effects. Here is what I did:<br>
<br>
- saved a copy of changes file<br>
- created a new method in a browser<br>
- save and exit<br>
- copy saved changes file back to changes file (to eliminate the source for new method)<br>
- restart image<br>
- decompiled code in browser shows bug reported by Hans-Martin Mosner<br>
- loaded Decompiler.1.cs<br>
- decompiled code in browser produces a &quot;Note:&quot; dialog, and the following<br>
  (garbage) in the codeholder window:<br>
<br>
    &quot;ueak/Squeak3.10-dev/squeak.10.image&quot;<br></blockquote><div><br></div><div>that&#39;s a different issue caused by your effectively truncating the changes file. What you&#39;ve done is arrange that the method&#39;s source pointer points into the SNAPSHOT marker in the original changes file.  What you need to do is select decompile from the source button dropdown menu in the browser, not switch the changes file underneath the method and expect the system to automatically figure out that the source is corrupt and it should decompile.</div>
<div><br></div><div>cheers</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Dave<br>
<br>
<br>
</blockquote></div><br>