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 13, 2004 14:03
Re: Continuations, basic blocks, loops and register allocation
Message ID:
Matt Fowles <> wrote:

> I like the idea of mandating lexicals vars.  This would also eliminate
> the need for spilling (I think), as the register allocator would only
> need to refetch the lexical rather than save it off somewhere to be
> restored later.

There are two issues: yes with refetch - no with store (probably).
Lexicals and globals are references, so:

  add Plex, Px, Py

stores already x+y in the variable lex. Well, that's a compiler issue
and a reason to keep the current "destination exists" semantics of
opcodes. (This usage doesn't cope with the generation of new values,
though and morping "Undef" isn't a good solution)

> I get the feeling that this is equivalent to requiring exception
> handlers to be a locally defined closure, which is another way we
> could go about this.

Yes. That solves it. OTOH going all along with lexicals could be pretty

> Matt


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