Continuations, concurrency, yada yada...

Tony Garnock-Jones tonyg at lshift.net
Wed Oct 26 09:32:33 PDT 2005


Lee Salzman wrote:
> [for implementing continuations] You're either faced with copying
> large parts of the stack (you might consider that a vote for
> delimited continuations, if any) or getting rid of the stack entirely
> in favor of a garbage collector nursery.

Yes.

> I am not even sure what havoc the catastrophic overhaul option would
> play on a dynamic compiler.

I can't imagine the changes required would be any more taxing than those 
required to support a different continuation representation in an 
interpreter.

One of the things that I like about the PPC (and ARM, for that matter) 
is that it doesn't insist on having a stack - conventionally one of the 
registers is used to manage a stack, but that's totally up to the ABI 
designer...

> But if one just wants poor man's threads, then real threads are
> better. Real threads need to be implemented at some point, and having
> a feature which is poorly orthogonal to real threads does not bode
> well for that feature.

The Interpreter structure is currently 15 words long. The stack 
autogrows, and could be started at, say, 16 words. Maybe we're not so 
far away from at least cooperative multithreading.

Tony




More information about the Slate mailing list