Matt Fowles <[EMAIL PROTECTED]> wrote:
> All~

> This feels similar in spirit to the old framestacks that we used to
> have.  I throught that we moved away from those to single frame things
> so that we did not have to perform special logic around continuations.
>  I would feel more comfortable if someone explained both the initial
> motivation of leaving the chunked system and why this does not violate
> that motivation or that motivation was wrong.

The problem currently is that we do too much copying. The caller has to
preserve it's registers. That is currently done by copying onto the
frame stacks. After function return there's another copy going on to
restore registers.

Until around Parrot 0.0.3 there were chunked stacks *with* an
indirection for the register frame pointers. During development of the
JIT system these indirections got dropped to be able to use absolute
addresses for registers in JIT code and for about 3% of more
performance.

To support continuations the chunks were first copied then COWed, and
later replaced by the single frame stack, we now have.

What I want to achieve is to find the best combination of all these
variations. That is:

- again one indirection for register access. The cost is near zero
  because almost all JIT subsystems are already using register indirect
  addressing.
- but only one frame stack, not 4 to be able to have the frame pointer
  in a CPU register
- no COW copying of frames because that is expensive too. Instead the
  register chunks are compacted occassionally during GC.

> Thanks,
> Matt

leo

Reply via email to