Piers Cawley <[EMAIL PROTECTED]> wrote:
> Leopold Toetsch <[EMAIL PROTECTED]> writes:

>> The problem I have is: do we know where registers may be reset? For
>> example:
>>
>>     $I0 = 10
>>   loop:
>>     $P0 = shift array
>>     dec $I0
>>     if $I0 goto loop
>>
>> What happens if the array PMC's C<shift> get overloaded and does some
>> fancy stuff with continuations. My gut feeling is that the loop might
>> suddenly turn into an infinite loop, depending on some code behind the
>> scenes ($I0 might be allocated into the preserved register range or not
>> depending on allocation pressure).
>>
>> Second: if we don't have a notion that a continuation may capture and
>> restore a register frame, a compiler can hardly use any I,S,N registers
>> because some library code or external function might just restore these
>> registers.

> This is, of course, why so many languages that have full continuations
> use reference types throughout, even for numbers. And immutable strings...

So my conclusion that (in combination with restoring registers to the
values of continuation creation) I,S,N registers are almost unusable is
correct?

What about my proposal "Lexicals, continuations, and register
allocation"? Would that provide proper semantics for continuations?

leo

Reply via email to