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

Re: Continuations, basic blocks, loops and register allocation

Thread Previous | Thread Next
Leopold Toetsch
November 15, 2004 07:10
Re: Continuations, basic blocks, loops and register allocation
Message ID:
Matt Fowles <> wrote:
> All~

> ...  When a full continuation is invoked it
> *copies* its contenxt into place (thus it can be invoked multiple
> times and it will always have its original context).

If you mean by "context" C<struct Parrot_Context> then yes, this is what
continuations are doing. But then nothing is solved.

If you mean context + registers then there is another problem: returning
via continuation would restore everything, including e.g. a loop-counter
that keeps track of how often you loop via the continuation.

A continuation isn't allowed to do that, you couldn't make any progress
in that subroutine, when all register contents is restored.


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