<br><br><div class="gmail_quote">On Mon, Mar 11, 2013 at 4:22 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><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 11 March 2013 23:13, Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt; wrote:<br>
&gt;<br>
&gt; On 2013-03-12, at 00:11, Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; It is Environments, and it&#39;s _after_ the image is updated: first the<br>
&gt;&gt; CI job runs <a href="http://update-image.st" target="_blank">update-image.st</a>, copies this updated artifact, and in the<br>
&gt;&gt; copy runs <a href="http://prepare-test-image.st" target="_blank">prepare-test-image.st</a>. That then fails because of a<br>
&gt;&gt; SyntaxError being thrown, saying this:<br>
&gt;&gt;<br>
&gt;&gt; DoIt<br>
&gt;&gt;       Smalltalk<br>
&gt;&gt;               at: #Log<br>
&gt;&gt;               put: [:t1 |<br>
&gt;&gt;                       | t2 |<br>
&gt;&gt;                       t2 := #Invalid literal character -&gt;#DateAndTime value now<br>
&gt;&gt; printString , &#39;: &#39; , t1.<br>
&gt;&gt;                       FileStream stdout nextPutAll: t2;<br>
&gt;&gt;                                nextPut: Character lf;<br>
&gt;&gt;                                flush.<br>
&gt;&gt;                       ##Transcript value cr; show: t2].<br>
&gt;&gt;<br>
&gt;&gt; Compare that to the original source, from <a href="http://prepare-test-image.st" target="_blank">prepare-test-image.st</a> in the CI job:<br>
&gt;&gt;<br>
&gt;&gt; Smalltalk at: #Log put: [:msg | | str |<br>
&gt;&gt;       str := DateAndTime now printString, &#39;: &#39;, msg.<br>
&gt;&gt;       FileStream stdout nextPutAll: str; nextPut: Character lf; flush.<br>
&gt;&gt;       Transcript cr; show: str].<br>
&gt;&gt;<br>
&gt;&gt; Note the ## marks prepended to (some of) the class names. Colin? Thoughts?<br>
&gt;<br>
&gt; I&#39;ve seen that too. It happens I think when code gets decompiled.<br>
<br>
</div></div>Odd, but I think I can imagine how it happens: Foo gets turned into a<br>
Symbol which is printed out as #Foo which then gets... printed out as<br>
a Symbol by something that thinks it has a String, resulting in ##Foo?<br>
And then something ELSE takes this broken source and tries to compile<br>
it. I guess?<br></blockquote><div><br></div><div>No.  Its arguably a bug but a binding will print itself as the Symbol key.  So what&#39;s happening is that the binding for DateAndTime is printing itself as #DateAndTime.  So the problem is that the Decompiler is not mapping the sequence pushLiteral: aBinding, send #value back into an appropriate LiteralVariableNode instance.  The Decompiler needs to special-case this.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
OK, stepping through, I can see it gets as far as Compiler &gt;&gt;<br>
#evaluate:cue:ifFailed:logged. There we turn the source into an AST<br>
(succeeds), and then compile that (succeeds)... but that<br>
CompiledMethod screws up decompilation, putting in the extra #s.<br>
<br>
I can&#39;t seem to step into MethodNode &gt;&gt; #generate:using: though to see<br>
what&#39;s going on.<br>
<br>
frank<br>
<br>
&gt; - Bert -<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>