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

Re: Continuations, basic blocks, loops and register allocation

Thread Previous | Thread Next
From:
Leopold Toetsch
Date:
November 15, 2004 07:10
Subject:
Re: Continuations, basic blocks, loops and register allocation
Message ID:
200411151451.iAFEpTx17313@thu8.leo.home
Matt Fowles <ubermatt@gmail.com> 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.

leo

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About