Re: no constants please Tom Lord 07 Jan 2004 00:54 UTC
> From: Michael Sperber <email@example.com>
> Tom> While they live on the stack, the only references to these objects are
> Tom> rooted in $continuation and $environment and follow their respective
> Tom> chains. The general collector can regard references from the stack to
> Tom> the heap as GC roots -- but there's no reason it can't trace those
> Tom> incrementally.
> How do you deal with the fact that $continuation changes very
> frequently? Here's (in my ind) the obvious way to approach this: The
> GC is tracing some old value of $continuation. When it's finished,
> there's a new one there, with new frames hanging off it. So the
> tracer needs to go back to the new value. Is there a guarantee this
> process will finish if the steps have bounded size?
Right. There's a bunch of little cases like that in here where you
have to relate the rates of various things going on in order to
guarantee termination of GC phases. Frankly, I approach hacking Pika
with a kind of iterative deepening of the design space: I'm personally
convinced I can solve that subproblem but I can't, off the top of my
head, demonstrate the solution.
As a general rule, by the time it becomes necessary to blacken
$continuation or $environment in order to close out a trace phase,
make sure that only shallow work is needed.