Dan Sugalski <[EMAIL PROTECTED]> wrote: > Exceptions and continuations should be the same problem -- the target > is the start of a basic block. (Well, more than that, as they're > places where calling conventions potentially kick in) This means the > instruction immediately after a sub call starts a new block, as does > the start of an exception handler.
Dan, I've already said that there is of course a new basic block. The problem arises by the silent generation of loops in the CFG. Within a loop the same register can't be reallocated to a different variable. There are two possible solutions (AFAIK): 1) statically mark the branch target of the loop. Proposed syntax constructs: 1a) for exceptions: set_eh handler, catch_label This is just a small adaption of the sequence of installing an exception handler. It depends a bit, if exception handlers are inline or nested closures or both. 1b) generally RESUMABLE: func_that_might_loop_through_cc() possibly accompanied with another markup of the function call that loops back. 2) Fetch all from lexicals/globals after a function call. leo