[svn:parrot] r39992 - trunk/src

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Sat Jul 11 02:47:29 UTC 2009


Author: whiteknight
Date: Sat Jul 11 02:47:28 2009
New Revision: 39992
URL: https://trac.parrot.org/parrot/changeset/39992

Log:
[packfile] add some extra documentation here explaining what executes when

Modified:
   trunk/src/packfile.c

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Sat Jul 11 02:38:48 2009	(r39991)
+++ trunk/src/packfile.c	Sat Jul 11 02:47:28 2009	(r39992)
@@ -889,6 +889,14 @@
 pbc_action_enum_t action, PMC *eval_pmc)>
 
 C<action> is one of C<PBC_PBC>, C<PBC_LOADED>, C<PBC_INIT>, or C<PBC_MAIN>.
+These determine which subs get executed at this point. Some rules:
+
+ :immediate subs always execute immediately
+ :postcomp subs always execute immediately
+ :main subs execute when we have the PBC_MAIN or PBC_PBC actions
+ :init subs execute when :main does
+ :load subs execute on PBC_LOAD
+
 Also store the C<eval_pmc> in the sub structure, so that the eval PMC is kept
 alive by living subs.
 
@@ -4888,8 +4896,9 @@
 =item C<void PackFile_fixup_subs(PARROT_INTERP, pbc_action_enum_t what, PMC
 *eval)>
 
-Runs C<:load> or C<:immediate> subroutines for the current code segment.  If
-C<eval> is given, set this as the owner of the subroutines.
+Calls C<:load>, C<:init>, C<:main>, C<:immediate> and/or C<:postcomp>
+subroutines in the current packfile, depending on the value of C<action>.
+See C<do_sub_pragmas> for more details.
 
 =cut
 


More information about the parrot-commits mailing list