Hi,

@LOAD subs are executed if loaded with load_bytecode, but not when they are in 
inside the initial bytecode loaded by parrot.
Please have a look at the attached patch against t/pmc/sub.t for an example.

jens
Index: t/pmc/sub.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/sub.t,v
retrieving revision 1.41
diff -u -w -r1.41 sub.t
--- t/pmc/sub.t	2 Apr 2004 10:20:26 -0000	1.41
+++ t/pmc/sub.t	8 Apr 2004 17:02:59 -0000
@@ -17,7 +17,7 @@
 
 =cut
 
-use Parrot::Test tests => 73;
+use Parrot::Test tests => 74;
 use Test::More;
 use Parrot::Config;
 
@@ -1200,4 +1200,17 @@
 .end
 CODE
 /uninit.*\n.*\nback\nok/
+OUTPUT
+
+output_is(<<'CODE', <<'OUTPUT', '@LOAD in main bytecode file');
+##PIR##
+.sub _main @MAIN
+    print "main\n"
+.end
+.sub _onload @LOAD
+    print "load\n"
+.end
+CODE
+main
+load
 OUTPUT

Reply via email to