Leopold Toetsch <[EMAIL PROTECTED]> writes:

> Matt Fowles <[EMAIL PROTECTED]> wrote:
>
>> Thanks for the clear explanation.  I did not realize that S registers
>> could switch pointers, that does make things a little harder.  I have
>> a recommendation for a possible hybrid solution.  Incur the cost of
>> spilling I,S,N registers heavily.  Restore the state of P register.
>
> My conclusion was that with the copying approach I,S,N registers are
> unusable.

But you only need to copy when the frame you're restoring is a full
continuation (and, actually, if copy on write works at a per register
level, copy on write might be the way to go). If it's a return
continuation you can simply use the stored state. 

I'd submit that, in the vast majority of cases you're not going to be
dealing with full continuations, and on the occasions when you are the
programmer using them will be aware of the cost and will be willing to
pay it.

Reply via email to