Uri Guttman <[EMAIL PROTECTED]> writes:
>>>>>> "NI" == Nick Ing-Simmons <[EMAIL PROTECTED]> writes:
>
>  NI> "We" need to decide where a perl6 sub's local variables are going
>  NI> to live (in the recursive case) - if we need a "stack" anyway it
>  NI> may make sense for VM to have ways of indexing the local "frame"
>  NI> rather than having "global" registers (set per thread by the way?)
>
>i made that thread point too in my long reply to dan.
>
>but indexing directly into a stack frame is effectively a register
>window. the problem is that you need to do an indirection through the
>window base for every access and that is slow in software (but free in
>hardware).

It isn't free in hardware either, but cost may be lower.
Modern machines should be able to schedule indirection fairly efficiently.
But I would contend we are going to have at least one index operation
anyway - if only from the "thread" pointer, or "global base" - so 
with careful design so that "registers" are at right "offset" from the "base"
we can subsume the register lookup index into that.

i.e. 
     R4 = frame[N]
is same cost as
     R4 = per_thread[N]
and about the same as
     extern REGISTER GlobalRegs4     
     R4 = GlobalRegs4;



>
-- 
Nick Ing-Simmons
who is looking for a new job see http://www.ni-s.u-net.com/

Reply via email to