[squeak-dev] compiler whitewash

Balázs Kósi kosi.balazs at ezomer.hu
Wed Oct 22 07:43:26 UTC 2014


hi,

I have a quick fix, tested only with your example.
It just stores the original selection and restores it after the query.
Change Parser >> #queryUndefined to:

Parser >> queryUndefined
    | varStart varName originalStart originalStop |
    originalStart := cue requestor startIndex.
    originalStop := cue requestor stopIndex.
    varName := parseNode key.
    varStart := self endOfLastToken + requestorOffset - varName size + 1.
    cue requestor selectFrom: varStart to: varStart + varName size - 1;
select.
    (UndefinedVariable name: varName) ifFalse: [^ self fail].
    cue requestor selectFrom: originalStart to: originalStop; select.

Cheers, Balazs

On Wed, Oct 22, 2014 at 2:12 AM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

> hi compiler hackers....
>
> in Squeak trunk evaluate the following, proceeding through the warning
> that t appears to be uninitialized when send ifNil:
>
> | t |
> t ifNil: [#ignore].
> 3 + 4
>
>
> 7 is printed between the "t" and the "ifNil:".  It would be nice if it
> were still printed after the 3 + 4.  wanna fix it?
> --
> best,
> Eliot
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20141022/242915c2/attachment.htm


More information about the Squeak-dev mailing list