On Tue, Dec 08, 2009 at 01:02:25AM -0800, chromatic wrote:
> > In general I've found that the side-effects of :immediate subs
> > don't carry through to precompiled .pbc files.
>
> I can't reproduce that...
>
> ... as of r42940. Does that change your caching strategy for the EH objects?
It may at some point, but not immediately. Because :immediate has
historically been so problematic, PAST doesn't really have good
support for it. We'll probably need some redesign work on PAST to be
able to take advantage of this (but the new capability is very welcome!).
In Rakudo's case, it means that we would need to convert many things
that we currently do as ":load :init" into ":immediate" equivalents,
and also that we'd have to review the overall sequence in which
things are emitted or evaluated (both at compile-time and at load-time).
So, it's really a very non-trivial change that we can start to
investigate after the ng branch lands.
NQP has a lot fewer dependencies in this regard; so I may be able to
come up with something there.
For constant exception handlers, we still need a way to set_addr
on the exception handler object, although I guess that one operation
could still be done at runtime without too much penalty:
.const 'Sub' return_eh = 'const_return_eh'
set_addr return_eh, eh_label
push_eh return_eh
...
Could this new aspect of anonymous :immediate subs get folded into the
pdd19 documentation somewhere, to make it a bit more "official"?
Pm
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev