[parenscript-devel] Bug: lexical renames wrongly extended to CREATE special form
Vladimir Sedach
vsedach at gmail.com
Tue Oct 13 15:59:38 UTC 2009
This is actually due to the dumb way that LET decides whether it needs
to rename a variable or not. I'm going to see if I can make it produce
better code.
Vladimir
On Fri, Oct 9, 2009 at 2:46 PM, Daniel Gackle <danielgackle at gmail.com> wrote:
> Further to the previous bug report, I noticed that lexical variables are
> being renamed unnecessarily in this case:
>
> (ps (let ((x (@ foo x)))
> (blah x)))
> =>
> "var x2 = foo.x;
> blah(x2);"
>
> Here the generated code isn't incorrect, as in the bug with CREATE, but I
> wonder if the two problems aren't related: in each case, PS appears to
> mistake a symbol reference for a lexical variable reference.
>
>
> On Fri, Oct 9, 2009 at 2:00 PM, Daniel Gackle <danielgackle at gmail.com>
> wrote:
>>
>> In this example, the CREATE form is being expanded incorrectly, because
>> the symbol A passed to it is not a reference to either of the lexical
>> variables in scope.
>>
>> (ps (let ((a 99))
>> (let ((a 22))
>> (create a 33))))
>>
>> =>
>>
>> "var a = 99;
>> var a666 = 22;
>> { a666 : 33 };"
>
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
>
More information about the parenscript-devel
mailing list