develooper Front page | perl.perl6.internals | Postings from November 2004

Re: Continuations, basic blocks, loops and register allocation

Thread Previous | Thread Next
Matt Fowles
November 16, 2004 14:15
Re: Continuations, basic blocks, loops and register allocation
Message ID:

On Tue, 16 Nov 2004 16:24:06 -0500, Dan Sugalski <> wrote:
> We could, but it would be wrong. Hell, it's arguably wrong for return
> continuations to do so, and it wouldn't be unreasonable to argue that
> I and N register contents are guaranteed crud and required refetching.
> I'm not particularly concerned with pressure on the register
> allocator, honestly -- it's a pleasant add-on, and one we will
> continue to do, but it's not strictly necessary. We deal with that
> after we get things correct.

I can accept this, but I would like to make sure that I understand all
of the represcussions of it.  Thus you can consider all of the
following questions (even though they will be phrased as statements).

1)  After a full continuation is taken all of the registers must be
considered invalid.
2)  After a return continuation is taken, the registers can be trusted.
3)  If someone takes a full continuation, all return continuations
down the callstack must be promoted.
4)  After a function call, some magic needs to happen so that the code
knows whether it came back to itself via a return continuation and can
trust its registers, or it came back via a full continuation and
cannot trust them.

Corrections welcome,
"Computer Science is merely the post-Turing Decline of Formal Systems Theory."

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About