Author: leo
Date: Tue Oct 11 06:25:08 2005
New Revision: 9448
Modified:
trunk/docs/compiler_faq.pod
trunk/docs/intro.pod
trunk/docs/pmc/subs.pod
trunk/docs/tests.pod
trunk/src/packfile.c
trunk/tools/dev/bench_op.imc
Log:
[PATCH] @directive -> :directive - part 2 src, docs, tools
Courtesy of Jonathan Scott Duff <[EMAIL PROTECTED]>
Modified: trunk/docs/compiler_faq.pod
==============================================================================
--- trunk/docs/compiler_faq.pod (original)
+++ trunk/docs/compiler_faq.pod Tue Oct 11 06:25:08 2005
@@ -307,7 +307,7 @@ same way:
You can C<peek_pad> the current pad and use C<delete>.
- .sub main @MAIN
+ .sub main :main
new_pad 0
$P0 = new .Integer
store_lex -1, "foo", $P0
Modified: trunk/docs/intro.pod
==============================================================================
--- trunk/docs/intro.pod (original)
+++ trunk/docs/intro.pod Tue Oct 11 06:25:08 2005
@@ -386,9 +386,9 @@ sub.
The call to C<_fact> in main works in just the same was as the recursive call
to C<_fact> within the sub C<_fact> itself. The only remaining bit of new
-syntax is the C<@MAIN>, written after C<.sub _main>. By default, PIR assumes
+syntax is the C<:main>, written after C<.sub _main>. By default, PIR assumes
that execution begins with the first sub in the file. This behavior can be
-changed by making the sub to start in with C<@MAIN>.
+changed by marking the sub to start in with C<:main>.
=head2 Compiling to PBC
Modified: trunk/docs/pmc/subs.pod
==============================================================================
--- trunk/docs/pmc/subs.pod (original)
+++ trunk/docs/pmc/subs.pod Tue Oct 11 06:25:08 2005
@@ -69,19 +69,19 @@ E.g. get a reference to a (possibly) ext
Exactly one subroutine in the first executed source or byte code file may be
flagged as the "main" subroutine, where executions starts.
- .pcc_sub @MAIN _main:
+ .pcc_sub :main _main:
-In the absence of a B<@MAIN> entry Parrot starts execution at the first
+In the absence of a B<:main> entry Parrot starts execution at the first
statement.
=head2 Automatically loaded initializer code
-If a subroutine is marked as B<@LOAD> this subroutine is run, before the
+If a subroutine is marked as B<:load> this subroutine is run, before the
B<load_bytecode> opcode returns.
e.g.
- .pcc_sub @MAIN _main:
+ .pcc_sub :main _main:
print "in main\n"
load_bytecode "library_code.pasm"
...
@@ -89,12 +89,12 @@ e.g.
# library_code.pasm
...
- .pcc_sub @LOAD _my_lib_init:
+ .pcc_sub :load _my_lib_init:
...
invoke P1
-B<@LOAD> is ignored, if another subroutine in that file is marked with
-B<@MAIN>.
+B<:load> is ignored, if another subroutine in that file is marked with
+B<:main>.
=head2 Invocation i.e. calling the sub
Modified: trunk/docs/tests.pod
==============================================================================
--- trunk/docs/tests.pod (original)
+++ trunk/docs/tests.pod Tue Oct 11 06:25:08 2005
@@ -47,7 +47,7 @@ friends.
pir_output_is(<<'CODE',<<'OUT','nothing useful');
.include 'library/config.imc'
- .sub main @MAIN
+ .sub main :main
print "hi\n"
.end
CODE
Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c (original)
+++ trunk/src/packfile.c Tue Oct 11 06:25:08 2005
@@ -200,7 +200,7 @@ make_code_pointers(struct PackFile_Segme
sub_pragma(Parrot_Interp interpreter,
int action, PMC *sub_pmc)>
-Handle @LOAD, @MAIN ... pragmas for B<sub_pmc>
+Handle :load, :main ... pragmas for B<sub_pmc>
=cut
@@ -236,7 +236,7 @@ sub_pragma(Parrot_Interp interpreter, in
=item C<static PMC* run_sub(Parrot_Interp interpreter, PMC* sub_pmc)>
-Run the B<sub_pmc> due its B<@LOAD>, B<@IMMEDIATE>, ... pragma
+Run the B<sub_pmc> due its B<:load>, B<:immediate>, ... pragma
=cut
Modified: trunk/tools/dev/bench_op.imc
==============================================================================
--- trunk/tools/dev/bench_op.imc (original)
+++ trunk/tools/dev/bench_op.imc Tue Oct 11 06:25:08 2005
@@ -68,7 +68,7 @@ Print program version.
.const string VERSION = "0.1.0"
-.sub main @MAIN
+.sub main :main
.param pmc argv
load_bytecode "Getopt/Long.pbc"