[parenscript-devel] Missing 'break' in CASE

Vladimir Sedach vsedach at gmail.com
Thu Nov 4 05:23:45 UTC 2010


This bug is fixed in the patch I just committed which changes the way
special operators work.

In the process of changing the special operators and fixing this bug,
I came to the conclusion that there is actually no way to implement a
magic "expressionize" function for the compiler that will do the right
thing for all forms - the necessary transformations depend both on the
outer and inner special operators in different ways. I think it's
possible to avoid the complexity of having a product of all possible
cases for this, and even if it's not, the special operators can be
grouped into only a few common classes, so things are not that bad.

Please check out the latest version of Parenscript and see if the new
code breaks anything.

Vladimir

2010/10/1  <sblist at me.com>:
> It appears that some commit between ac408014 and b9dc8d1a (maybe
> 2f9fa1976a?) breaks the compilation of CASE forms in a function's tail
> position when some (but not all) branches in a body form contain a RETURN.
>
> PS> (ps (defun foo ()
>          (case x
>            ("bar" (if y (return t) nil))
>            ("baz" nil))))
> "function foo() {
>    switch (x) {
>    case 'bar':
>        if (y) {
>            return true;
>        };
>    //----------------- missing break; here
>    case 'baz':
>        return null;
>    };
> };"
>
> Scott
>
> _______________________________________________
> 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