Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [CVS ci] basic support for @IMMEDIATE

2 views
Skip to first unread message

Dan Sugalski

unread,
Nov 12, 2004, 11:49:29 AM11/12/04
to Leopold Toetsch, Perl 6 Internals
At 5:39 PM +0100 11/12/04, Leopold Toetsch wrote:
>In that thread I also asked:
>
>> POSTCOMP subs are executed as soon as compilation is done, once again
>> with no parameters. Whether they do a whole lot is up in the air, but
>> that's not my problem, and it'll be useful for compile-and-go systems.
>
>Can that not be achieved by either MAIN or LOAD?
>
>--
>So what is actually the difference between POSTCOMP and LOAD?

LOAD is executed when the bytecode segment is loaded, POSTCOMP at the
end of compilation. So if you did:

parrot -o foo.pbc foo.imc

then the POSTCOMP sub would be executed and the load not executed.
When you did:

parrot foo.pbc

then the LOAD would be executed, and the POSTCOMP not. (Except for
the issue of us not executing LOAD subs for the main bytecode segment)
--
Dan

--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

0 new messages