[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Kawa-commonlisp-dev] tagbodies
From: |
Charles Turner |
Subject: |
Re: [Kawa-commonlisp-dev] tagbodies |
Date: |
Fri, 27 Jul 2012 12:51:56 +0100 |
On 26 July 2012 20:13, Helmut Eller <address@hidden> wrote:
> State machines can be written with LABELS and (local) tail-calls. Kawa
> should recognize those and implement them with gotos. E.g.
Ah yes, forgot about tail-calls :-)
> I think implementing TAGBODY now is a bit of a distraction and messaging
> the source into LABELS isn't that hard.
>> How hard would it be to implement TAGBODY? Seems like I could just
>> use BlockExp to do it.
>
> In general you need to do a modicum of escape analysis before you can
> turn it into BlockExp.
I was just curious about it's implementation. Thanks for the pointers!
> So what still on the TODO stack?
When I started with destructuring I immediately pushed lambdas
parameters on my stack, then I ran into the whole
((lambda (&optional x &rest y) ...)
unleashing the hounds if and only if &optional is not proceed by an
ordinary var. Still need to fix this one, but mercifully SBCL doesn't
seem to use this in it's implementation :-) so I postponed it. But now
I've been told several times to just get on with the workarounds
(sorry for the slowness!) several items popped of the stack.
> You've already done a lot to make &optional/&key work for normal lambdas.
> Do you have some test cases for that? Should it be reviewed?
The code for that is in OrdinaryLambda, which is (for now, sorry
future people) online at
http://chturner.com/kawa/trunk/kawa/lang/OrdinaryLambda.java if you
don't have my repository locally. It's still brittle (for instance, it
currently only supports 10 &optional/&key parameters because I haven't
added a dynamic array yet). I'm afraid I haven't written any tests for
it yet.
- [Kawa-commonlisp-dev] tagbodies, Charles Turner, 2012/07/26
- Re: [Kawa-commonlisp-dev] tagbodies, Helmut Eller, 2012/07/26
- Re: [Kawa-commonlisp-dev] tagbodies, Jamison Hope, 2012/07/26
- Re: [Kawa-commonlisp-dev] tagbodies, Charles Turner, 2012/07/27
- Re: [Kawa-commonlisp-dev] tagbodies, Charles Turner, 2012/07/27
- Re: [Kawa-commonlisp-dev] tagbodies, Charles Turner, 2012/07/27
- Re: [Kawa-commonlisp-dev] tagbodies, Jamison Hope, 2012/07/27
- Re: [Kawa-commonlisp-dev] tagbodies, Charles Turner, 2012/07/27
Re: [Kawa-commonlisp-dev] tagbodies,
Charles Turner <=