[parenscript-devel] Tweaks to the NOT and RETURN special forms
Daniel Gackle
danielgackle at gmail.com
Wed Oct 28 21:46:21 UTC 2009
I pushed another fix for PS LOOP, this time to make :WHILE and :UNTIL
clauses play well with :FOR clauses. Working on this, I noticed the
generated code was getting lots of expressions like "!!x". So I tweaked the
NOT special form to eliminate double negatives (this wasn't a big deal
because the NOT special form was already doing some operand reduction):
(ps (not (not x)))
now => "x;"
formerly => "!!x"
Also, we sometimes get syntactically illegal double RETURNs in our generated
JS (things like "return return x;"). Although this only happens when we make
a mistake and use the wrong macro, it can be hard to track down the problem.
Since "return return" is never legal JS, I added an error check to the
RETURN special form to signal when PS is given such a bad expression to
compile.
(The above pertains to commit 7c417818 and its two predecessors.)
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20091028/e94d2e3e/attachment.html>
More information about the parenscript-devel
mailing list