[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about coroutines
From: |
Marius Vollmer |
Subject: |
Re: about coroutines |
Date: |
07 Dec 2001 19:20:40 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Keith Wright <address@hidden> writes:
> > From: Marius Vollmer <address@hidden>
> >
> > Ok, here is what I've found.
> >
> > It's a real conservative GC bug, and it's impossible to fix (without
> > going to a precise GC or non-copying continuations) since it is all
> > over the place. The continuations stick in a stack slot that is not
> > associated with any variable, it's just debris from a previous
> > function call (specifically, from building the lexical environment of
> > call-with-current-continuation).
>
> I'm not quite understanding. Are things that have been popped off
> the stack getting included in the copied continuation stack, or
> is the stack getting pushed without being initialized? (Or
> are those both wrong?)
I don't know. The continuation is referenced from a cons cell that
was passed as an argument to a function. After that particular piece
of code (eval.c:2906), the stack slot that I was watching contained
the reference to the cons cell, and it didn't get cleared before the
stack was copied. When I cleared that stack slot manually, another
references popped up in a different stack slot.
> > One-shot continuations should make for a nice SRFI, actually.
>
> Ouch. I don't think so.
Hmm, well, scratch the part about "we could even avoid...", I was
thinking too fast there. But in general, why don't you think so?