<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 11, 2013 at 4:39 PM, Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span> wrote:<br>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And _that_ would be because the latest version of Environments does<br>
funky stuff with class resolution. Yes?<br></blockquote><div><br></div><div>Yes. There are actually two bugs here:</div><div><br></div><div>The first is that Environment&gt;&gt;at:put: doesn&#39;t pull existing bindings out of Undeclared. Here&#39;s what happens: the Doit in <a href="http://prepare-test-image.st">prepare-test-image.st</a> looks basically like this:</div>
<div><br></div></div></div><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><font class="Apple-style-span" face="&#39;times new roman&#39;, serif">Smalltalk at: #Log put: [:arg].</font></div>
</div></div><div class="gmail_extra"><div class="gmail_quote"><div><font class="Apple-style-span" face="&#39;times new roman&#39;, serif">Log value: &#39;test&#39;. </font></div></div></div></blockquote><div class="gmail_extra">
<div class="gmail_quote"><div><br></div><div>When this code is compiled, the reference to Log on line 2 is undeclared. Then execution starts, and line 1 does an assignment to Log though sneaky reflection, rather than assignment. SystemDictionary overrides #at:put: to make sure this works, but Environments doesn&#39;t, so the binding on line 2 isn&#39;t affected. Then we execute line 2, and send #value: to nil, which raises a MNU. </div>
<div><br></div><div>We get a debugger, click on the DoIt frame to see what happened, and boom, a syntax error. The DoIt doesn&#39;t have a source pointer, because the code is in a .st file, so we need to decompile it. The new binding classes in Environments don&#39;t support decompilation well, so it produces invalid source. I&#39;m not sure why we&#39;re reparsing decompiled code, but clearly it&#39;s not working.</div>
<div><br></div><div>I should be able to just commit fixes to the trunk, since this doesn&#39;t break updating, just building the test image. </div><div><br></div><div>Colin</div></div></div></div>