Matt Fowles <[EMAIL PROTECTED]> wrote: [ continuations should restore registers ]
> I am sorry, but I don't understand what you are trying to say here. > Would you mind rewording it for me? Imagine a simple loop: i = 0 lp: foo() inc i if i < 10 goto lp Looking at the loop counter a programmer or optimizer could easily decide that using an I-Reg for it instead of a P-Reg is fine. Now comes your proposed implementation for continuations: they copy the register frame on creation and restore it on invocation. Besides of the big cost of the memcpy's this simple loop above suddenly stops working, depending on the implementation of foo() - which might be outside your control. BTW in an early stage we had exactly this behavior of continuations. This was abandoned. The subject was IIRC something like "Should continuations close over registers". The answer was clearly "no". leo