Jeff Clites <[EMAIL PROTECTED]> wrote:

> Picture this call stack:

>       main --> A --> B --> C --> D --> E

> The call from D to E uses the "RESUMEABLE" label, and E stores the
> resulting continuation in a global, and everything up to main returns.
> Then, main invokes the continuation, and we find ourselves back in D.
> Now, C, B, and A will return "again", without any compile-time hint.

That's fine. The return is an expected operation. I don't think that's
the problem. The error in gc_13 is a call path like:

   choose() -> try (with_cc) -> fail() ->
                                        |
                     (choose again)  <- +     <--+
                                                 |
   choose() -> try (with_cc) -> fail() ->        |
                                        |        |
                     (choose again)  <- +        |
                                                 |
   fail()  --------------------------------------+


The problem now is not per se the path in main from the two choose()
calls down to fail is executed more then once (as it's the case with
multiple returns). The problem is the loop in main. By denoting the loop
from the call to fail() to the first choose() with some kind of syntax,
the register allocator does the right thing.

> JEff

leo

Reply via email to