At 1:02 AM -0500 1/9/04, Michal Wallace wrote:
I changed my compiler to call savetop before every function
call, and that passes my tests but I'm having trouble
visualizing why. Would I ever NOT want to call savetop
before creating a continuation?
Sure. The only reason to call savetop is if you wan
Luke Palmer <[EMAIL PROTECTED]> wrote:
> This patch re-implements the register backing stacks as PObjs (so they
> can be garbage-collected), honors their COW flags, and adds them to the
> interpreter context (where they should be, honest!).
> As a healthy side-effect, it encapsulates their behavio
On Fri, 9 Jan 2004, Luke Palmer wrote:
> Very rarely would you not savetop before creating a *real* continuation.
> But again, very rarely would you actually create a *real* continuation
> (depending on your language). RetContinuations are almost always a
> better choice for traditional languages
On Fri, 9 Jan 2004, Leopold Toetsch wrote:
> Michal Wallace <[EMAIL PROTECTED]> wrote:
>
> > newsub $P1, .Continuation, done
>
> For returning just use a .RetContinuation. Or still better, just omit
> $P1 totally here:
>
> > .pcc_call $P0, $P1
Aha! I like that even better. :) Thanks!
Sin
Michal Wallace writes:
> On Thu, 8 Jan 2004, Luke Palmer wrote:
> > .sub __main__
> > newsub $P0, .Closure, _func
> > savetop
> > newsub $P0, .Continuation, done
> >
> > So the restoretop after the invoke has something to pop (and so your
> > register state isn't screwed up when you get
Michal Wallace <[EMAIL PROTECTED]> wrote:
> newsub $P1, .Continuation, done
For returning just use a .RetContinuation. Or still better, just omit
$P1 totally here:
> .pcc_call $P0, $P1
leo
Luke Palmer <[EMAIL PROTECTED]> wrote:
> .sub __main__
> newsub $P0, .Closure, _func
> savetop
No - not for plain subroutines/closures.
> Or you could do as PCC does and use a .RetContinuation, which doesn't
> close over the stacks, when you don't actually need a full continuation.
Yep.
On Thu, 8 Jan 2004, Luke Palmer wrote:
> @pcc_sub_call_4:
> set P0, P17
> set P1, P16
> set I0, 0
> set I1, 0
> set I2, 0
> set I3, -2
> updatecc
> savetop
> invoke
> done:
> restoretop
> set P16, P5
>
> When t
Michal Wallace writes:
> Luke Palmer wrote:
>
> > This patch re-implements the register backing stacks as PObjs (so
> > they can be garbage-collected), honors their COW flags, and adds
> > them to the interpreter context (where they should be, honest!).
> >
> > As a healthy side-effect, it encapsu
Luke Palmer wrote:
> This patch re-implements the register backing stacks as PObjs (so
> they can be garbage-collected), honors their COW flags, and adds
> them to the interpreter context (where they should be, honest!).
>
> As a healthy side-effect, it encapsulates their behavior nicely into
>
This patch re-implements the register backing stacks as PObjs (so they
can be garbage-collected), honors their COW flags, and adds them to the
interpreter context (where they should be, honest!).
As a healthy side-effect, it encapsulates their behavior nicely into
register.c, when before their gut
11 matches
Mail list logo