At 9:16 AM +0200 10/20/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:

 The first is the CPS style chews through continuation objects at a
 massive rate, and using them means that everything needs to be COW.

We don't have COWed stacks, they are all single chunk already.

Yeah, I know, but I've been considering allowing stack back-peeking and modifying. Sorry, wasn't clear.


 > A return continuation is a *potential* continuation.

Ok, the return of the return continuation recycling. But it's likely a
bit more complicated. Creating a Continuation somewhere down a call
chain has to mark all return continuations up as non-recyclable.

Right. Any time an actual continuation is created we need to walk back up the call chain and mark all the pending return continuations as non-recyclable.


 And as
the Continuation PMC can get passed anywhere, it looks to me that just
the presence of one Continuation PMC invalidates all return
continuations.

No, it doesn't, luckily. The worst case here is that invoking a continuation will leave some return continuations to be cleaned up by a DOD sweep.


The proposed scheme with big register chunks and a watermark at the
frame pointer of the "highest" continuation looks more sane.

Yeah, that's what I thought back when we started parrot--that's the original design of the register stacks. At this point I *don't* think it's the right thing, for a few reasons.


*) It was annoyingly error prone
*) If we switch to the scheme we've been arguing over the number of register frame pushes will approach 0, so there's little point in the complexity.


If we're not saving much on the register stacks (and with the switch in calls we won't be, which means we can drop the pushtop/poptop stuff on calls) it's easier to go with a one-frame-per-chunk setup.

> ..., and it will completely invalidate all the
existing JIT code.

Only i386, which is the only one that does not already a CPU register indirect addressing of Parrot registers. i386 is currently being fixed. When that's done, all JIT platforms basically need *one* additional instruction in one place, e.g. for PPC:

r16 = BP_OFFS(r13) # get base bointer from interpreter

What, we have two registers dedicated? One for the interpreter pointer and one for the start of registers? I didn't realize that. If so, then nevermind.


 > ..., but I'm kinda sick at the moment,

Get well soon.

Let's hope that's after we get this hashed out. :) -- Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to