<br><br><div class="gmail_quote">On Mon, Mar 11, 2013 at 4:22 PM, Frank Shearar <span dir="ltr"><<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>></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 <<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>> wrote:<br>
><br>
> On 2013-03-12, at 00:11, Frank Shearar <<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>> wrote:<br>
><br>
>> It is Environments, and it's _after_ the image is updated: first the<br>
>> CI job runs <a href="http://update-image.st" target="_blank">update-image.st</a>, copies this updated artifact, and in the<br>
>> copy runs <a href="http://prepare-test-image.st" target="_blank">prepare-test-image.st</a>. That then fails because of a<br>
>> SyntaxError being thrown, saying this:<br>
>><br>
>> DoIt<br>
>> Smalltalk<br>
>> at: #Log<br>
>> put: [:t1 |<br>
>> | t2 |<br>
>> t2 := #Invalid literal character ->#DateAndTime value now<br>
>> printString , ': ' , t1.<br>
>> FileStream stdout nextPutAll: t2;<br>
>> nextPut: Character lf;<br>
>> flush.<br>
>> ##Transcript value cr; show: t2].<br>
>><br>
>> 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>
>><br>
>> Smalltalk at: #Log put: [:msg | | str |<br>
>> str := DateAndTime now printString, ': ', msg.<br>
>> FileStream stdout nextPutAll: str; nextPut: Character lf; flush.<br>
>> Transcript cr; show: str].<br>
>><br>
>> Note the ## marks prepended to (some of) the class names. Colin? Thoughts?<br>
><br>
> I'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'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 >><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't seem to step into MethodNode >> #generate:using: though to see<br>
what's going on.<br>
<br>
frank<br>
<br>
> - Bert -<br>
><br>
><br>
><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>