Author: leo
Date: Tue Oct 11 06:30:27 2005
New Revision: 9449

Modified:
   trunk/imcc/docs/calling_conventions.pod
   trunk/imcc/docs/operation.pod
   trunk/imcc/parser_util.c
   trunk/imcc/t/imcpasm/opt1.t
   trunk/imcc/t/imcpasm/pcc.t
   trunk/imcc/t/reg/alloc.t
   trunk/imcc/t/reg/spill.t
   trunk/imcc/t/syn/bsr.t
   trunk/imcc/t/syn/clash.t
   trunk/imcc/t/syn/eval.t
   trunk/imcc/t/syn/file.t
   trunk/imcc/t/syn/keyed.t
   trunk/imcc/t/syn/labels.t
   trunk/imcc/t/syn/macro.t
   trunk/imcc/t/syn/objects.t
   trunk/imcc/t/syn/op.t
   trunk/imcc/t/syn/pod.t
   trunk/imcc/t/syn/scope.t
   trunk/imcc/t/syn/tail.t
Log:
[PATCH] @directive -> :directive - part 3 imcc

Courtesy of Jonathan Scott Duff <[EMAIL PROTECTED]>


Modified: trunk/imcc/docs/calling_conventions.pod
==============================================================================
--- trunk/imcc/docs/calling_conventions.pod     (original)
+++ trunk/imcc/docs/calling_conventions.pod     Tue Oct 11 06:30:27 2005
@@ -105,23 +105,23 @@ following meaning:
 
 =over 4
 
-=item * @MAIN
+=item * :main
 
 Define "main" entry point to start execution. If multiple subroutines
-are marked as B<@MAIN>, the B<last> marked subroutine is entered.
+are marked as B<:main>, the B<last> marked subroutine is entered.
 
-=item * @LOAD
+=item * :load
 
 Run this subroutine during the B<load_library> opcode.
-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>.
 
-=item * @ANON
+=item * :anon
 
 Do not install this subroutine in the namespace. Allows the subroutine
 name to be reused.
 
-=item * @MULTI(Type1, Type2...)
+=item * :multi(Type1, Type2...)
 
 Engage in multiple dispatch with the listed types.
 

Modified: trunk/imcc/docs/operation.pod
==============================================================================
--- trunk/imcc/docs/operation.pod       (original)
+++ trunk/imcc/docs/operation.pod       Tue Oct 11 06:30:27 2005
@@ -111,7 +111,7 @@ an appropriate message.
 
 Consider these two code snippets (block numbers are attached):
 
-  .sub main @MAIN
+  .sub main :main
  0      $I0 = 0                # initialized
  0      if $I0 goto l1
  1      $I1 = 1                # init in block 1

Modified: trunk/imcc/parser_util.c
==============================================================================
--- trunk/imcc/parser_util.c    (original)
+++ trunk/imcc/parser_util.c    Tue Oct 11 06:30:27 2005
@@ -705,7 +705,7 @@ imcc_compile(Parrot_Interp interp, const
     /*
      * create sub PMC
      *
-     * TODO if a sub was denoted @MAIN return that instead
+     * TODO if a sub was denoted :main return that instead
      */
     sub = pmc_new(interp, enum_class_Eval);
     sub_data = PMC_sub(sub);

Modified: trunk/imcc/t/imcpasm/opt1.t
==============================================================================
--- trunk/imcc/t/imcpasm/opt1.t (original)
+++ trunk/imcc/t/imcpasm/opt1.t Tue Oct 11 06:30:27 2005
@@ -1066,7 +1066,7 @@ OUT
 }
 
 pir_2_pasm_like(<<'CODE', <<'OUT', "segv - last ins changed");
-.sub main @MAIN
+.sub main :main
     func()
 .end
 .sub func
@@ -1081,7 +1081,7 @@ CODE
 OUT
 
 pir_2_pasm_like(<<'CODE', <<'OUT', "segv - last ins deleted");
-.sub main @MAIN
+.sub main :main
     func()
 .end
 .sub func

Modified: trunk/imcc/t/imcpasm/pcc.t
==============================================================================
--- trunk/imcc/t/imcpasm/pcc.t  (original)
+++ trunk/imcc/t/imcpasm/pcc.t  Tue Oct 11 06:30:27 2005
@@ -6,8 +6,8 @@ use strict;
 use Parrot::Test tests => 11;
 
 
-pir_2_pasm_like(<<'CODE', <<'OUT', 'end in @MAIN');
-.sub _main @MAIN
+pir_2_pasm_like(<<'CODE', <<'OUT', 'end in :main');
+.sub _main :main
      noop
 .end
 CODE

Modified: trunk/imcc/t/reg/alloc.t
==============================================================================
--- trunk/imcc/t/reg/alloc.t    (original)
+++ trunk/imcc/t/reg/alloc.t    Tue Oct 11 06:30:27 2005
@@ -9,7 +9,7 @@ pir_output_is(<<'CODE', <<'OUT', "alliga
 # if the side-effect of newsub/continuation isn't
 # detected this program prints "Hi\nalligator\n"
 
-.sub main @MAIN
+.sub main :main
     $P0 = new .String
     $P0 = "Hi\n"
     $I0 = 2

Modified: trunk/imcc/t/reg/spill.t
==============================================================================
--- trunk/imcc/t/reg/spill.t    (original)
+++ trunk/imcc/t/reg/spill.t    Tue Oct 11 06:30:27 2005
@@ -11,7 +11,7 @@ pir_output_is(<<'CODE', <<'OUT', "alloca
 # Test the ability of the register allocator to
 # generate spills.
 #
-.sub test @MAIN
+.sub test :main
        $I0 = 0
        $I1 = 1
        $I2 = 2
@@ -85,7 +85,7 @@ pir_output_is(<<'CODE', <<'OUT', "spill 
 # Test the ability of the register allocator to
 # generate spills.
 #
-.sub test @MAIN
+.sub test :main
        $I0 = 0
        $I1 = 1
        $I2 = 2
@@ -243,7 +243,7 @@ pir_output_is(<<'CODE', <<'OUT', "pcc ar
 # combination with PCC calling convention and overflow arguments.
 # Slightly redundant with tests in t/syn/pcc.t but please leave.
 #
-.sub test @MAIN
+.sub test :main
   
_foo(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)
   end
 .end
@@ -334,7 +334,7 @@ pir_output_is(<<'CODE', <<'OUT', "spill 
 #
 # Another spill test
 #
-.sub test @MAIN
+.sub test :main
        $I0 = 0
        $I1 = 1
        $I2 = 2
@@ -434,7 +434,7 @@ pir_output_is(<<'CODE', <<'OUT', "bug #3
 
 .namespace ["Foo"]
 
-.sub __biginit @MAIN
+.sub __biginit :main
        newclass $P0, "Foo"
        $I1 = find_type "Foo"
        $P1 = new $I1

Modified: trunk/imcc/t/syn/bsr.t
==============================================================================
--- trunk/imcc/t/syn/bsr.t      (original)
+++ trunk/imcc/t/syn/bsr.t      Tue Oct 11 06:30:27 2005
@@ -7,7 +7,7 @@ use Parrot::Test tests => 13;
 
 pir_output_is(<<'CODE', <<'OUT', "bsr 1");
 # this tests register allocation/preserving of local bsr calls
-.sub test @MAIN
+.sub test :main
    $I0 = 2
    $I1 = 3
    bsr L
@@ -26,7 +26,7 @@ OUT
 
 ##############################
 pir_output_is(<<'CODE', <<'OUT', "stack calling conventions");
-.sub test @MAIN
+.sub test :main
    .local int x
    x = 10
    .const int y = 20
@@ -79,7 +79,7 @@ OUT
 ##############################
 #
 pir_output_is(<<'CODE', <<'OUT', "fact with stack calling conventions");
-.sub test @MAIN
+.sub test :main
     .local int counter
     counter = 5
     save counter
@@ -114,7 +114,7 @@ OUT
 # this is considered a non local bsr
 #
 pir_output_is(<<'CODE', <<'OUT', "recursive bsr with saveall");
-.sub test @MAIN
+.sub test :main
    $I0 = 5     # count
    $I1 = 1     # product
    save $I0
@@ -148,7 +148,7 @@ OUT
 ##############################
 # tail recursion - caller saves
 pir_output_is(<<'CODE', <<'OUT', "tail recursive bsr");
-.sub test @MAIN
+.sub test :main
    $I0 = 5     # count
    $I1 = 1     # product
    saveall
@@ -179,7 +179,7 @@ OUT
 ##############################
 # tail recursion - caller saves
 pir_output_is(<<'CODE', <<'OUT', "tail recursive bsr 2");
-.sub test @MAIN
+.sub test :main
    $I0 = 5     # count
    $I1 = 1     # product
    saveall
@@ -206,7 +206,7 @@ OUT
 ##############################
 # tail recursion - caller saves
 pir_output_is(<<'CODE', <<'OUT', "tail recursive bsr - opt");
-.sub test @MAIN
+.sub test :main
    $I0 = 5     # count
    $I1 = 1     # product
    saveall
@@ -233,7 +233,7 @@ OUT
 ##############################
 # tail recursion - caller saves - parrot calling convention
 pir_output_is(<<'CODE', <<'OUT', "tail recursive bsr, parrot cc");
-.sub test @MAIN
+.sub test :main
    $I0 = _fact(1, 5)
    print $I0
    print "\n"
@@ -261,7 +261,7 @@ OUT
 ##############################
 # coroutine
 pir_output_is(<<'CODE', <<'OUT', "coroutine");
-.sub test @MAIN
+.sub test :main
     .local Coroutine co
     co = new Coroutine
     co = addr _routine
@@ -285,7 +285,7 @@ Hello perl6.
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "newsub");
-    .sub test @MAIN
+    .sub test :main
         newsub P0, .Sub, _foo  # PASM syntax only for now
         invokecc P0
         end
@@ -309,7 +309,7 @@ $head1 BLA
  fasel
 
 $cut
-.sub test [EMAIL PROTECTED]
+.sub test \:main
        print "ok 1\\n"
        end
 .end
@@ -323,7 +323,7 @@ $head1 FOO
  fasel
 
 $cut
-.sub test [EMAIL PROTECTED]
+.sub test \:main
        print "ok 1\\n"
        end
 .end
@@ -336,7 +336,7 @@ ok 1
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "bug #25948");
-.sub main @MAIN
+.sub main :main
         goto L1
 test:
         $I1 = 1

Modified: trunk/imcc/t/syn/clash.t
==============================================================================
--- trunk/imcc/t/syn/clash.t    (original)
+++ trunk/imcc/t/syn/clash.t    Tue Oct 11 06:30:27 2005
@@ -6,7 +6,7 @@ use strict;
 use Parrot::Test tests => 15;
 
 pir_output_is(<<'CODE', <<'OUT', "if/unless");
-.sub test @MAIN
+.sub test :main
        $I0 = 0
        if $I0 goto nok1
        print "ok 1\n"
@@ -29,7 +29,7 @@ ok 2
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "if/unless");
-.sub test @MAIN
+.sub test :main
        $I0 = 0
        $I1 = 1
        if $I0 == $I1 goto nok1
@@ -58,7 +58,7 @@ OUT
 
 
 pir_output_is(<<'CODE', <<'OUT', "new");
-.sub test @MAIN
+.sub test :main
        $P1 = new String
        $P1 = "ok 1\n"
        new P1, .String
@@ -74,7 +74,7 @@ OUT
 
 
 pir_output_is(<<'CODE', <<'OUT', "clone");
-.sub test @MAIN
+.sub test :main
        $P1 = new String
        $P1 = "ok 1\n"
        $P0 = clone $P1
@@ -92,7 +92,7 @@ OUT
 
 
 pir_output_is(<<'CODE', <<'OUT', "defined");
-.sub test @MAIN
+.sub test :main
        $P1 = new Hash
        $I0 = defined $P1
        new P1, .Hash
@@ -110,7 +110,7 @@ OUT
 
 
 pir_output_is(<<'CODE', <<'OUT', "defined keyed");
-.sub test @MAIN
+.sub test :main
        $P1 = new Hash
        $P1["a"] = "ok 1\n"
        $I0 = defined $P1["a"]
@@ -134,7 +134,7 @@ OUT
 
 
 pir_output_is(<<'CODE', <<'OUT', "parrot op as identifier");
-.sub test @MAIN
+.sub test :main
        .local int set
        set = 5
        print set
@@ -151,7 +151,7 @@ OUT
 
 
 pir_output_is(<<'CODE', <<'OUT', "parrot op as label");
-.sub test @MAIN
+.sub test :main
        null I0
        goto set
 set:
@@ -172,7 +172,7 @@ ok
 OUT
 
 pir_output_like(<<'CODE', <<'OUTPUT', "new with a native type");
-.sub test @MAIN
+.sub test :main
         $P1 = new INTVAL
        print "never\n"
        end
@@ -182,7 +182,7 @@ CODE
 OUTPUT
 
 pir_output_is(<<'CODE', <<'OUTPUT', "setline w comment");
-.sub test @MAIN
+.sub test :main
     setline 1  # comment
     print "ok\n"
     end
@@ -192,7 +192,7 @@ ok
 OUTPUT
 
 pir_output_is(<<'CODE', <<'OUTPUT', "setfile w comment");
-.sub test @MAIN
+.sub test :main
     setfile "foo"      # comment
     print "ok\n"
     end
@@ -202,7 +202,7 @@ ok
 OUTPUT
 
 pir_output_is(<<'CODE', <<'OUTPUT', "eq_num => eq");
-.sub test @MAIN
+.sub test :main
     .local int i
     .local int j
     i = 1
@@ -218,7 +218,7 @@ ok 1
 OUTPUT
 
 pir_output_is(<<'CODE', <<'OUTPUT', "eq_num => eq mixed => eq_n_n");
-.sub test @MAIN
+.sub test :main
     .local int i
     .local float j
     i = 1
@@ -234,7 +234,7 @@ ok 1
 OUTPUT
 
 pir_output_like(<<'CODE', <<'OUT', "undefined ident");
-.sub test @MAIN
+.sub test :main
     print no_such
 .end
 CODE
@@ -242,7 +242,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "label ident");
-.sub test @MAIN
+.sub test :main
     branch no_such
     end
 no_such:

Modified: trunk/imcc/t/syn/eval.t
==============================================================================
--- trunk/imcc/t/syn/eval.t     (original)
+++ trunk/imcc/t/syn/eval.t     Tue Oct 11 06:30:27 2005
@@ -10,7 +10,7 @@ SKIP: {
 
 ##############################
 pir_output_is(<<'CODE', <<'OUT', "eval pasm");
-.sub test @MAIN
+.sub test :main
        $S0 = 'set S1, "in eval\n"'
        concat $S0, "\n"
        concat $S0, "print S1\nend\n"
@@ -26,7 +26,7 @@ back
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "eval pir");
-.sub test @MAIN
+.sub test :main
        $S1 = ".sub _foo\n"
        concat $S1, '$S1 = "42\n"'
        concat $S1, "\nprint $S1\nend\n"
@@ -53,7 +53,7 @@ pir_output_is(<<'CODE', <<'OUT', "inters
 # 7
 #####
 
-.sub test @MAIN
+.sub test :main
     I1 = 5
     $S0 = ".sub _e\nif I1 == 6 goto LAB\nend\n.end\n"
     compreg P2, "PIR"
@@ -70,7 +70,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "intersegment branch 2");
-.sub test @MAIN
+.sub test :main
     I1 = 4
     $S0 = ".sub _e\nif I1 <= 6 goto LAB\nend\n.end\n"
     compreg P2, "PIR"
@@ -87,7 +87,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "intersegment branch 3");
-.sub test @MAIN
+.sub test :main
     I1 = 4
     compreg P2, "PIR"
     $S0 = ".sub _e\nif I1 <= 5 goto LAB\nend\n.end\n"
@@ -108,7 +108,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "intersegment branch 4");
-.sub test @MAIN
+.sub test :main
     I1 = 4
     compreg P2, "PIR"
     $S0 = ".sub _e\nif I1 <= 5 goto LAB\nend\n.end\n"
@@ -130,7 +130,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "eval - same constants");
-.sub test @MAIN
+.sub test :main
         print "hello"
        print "\n"
        $S0 = 'print "hello"'

Modified: trunk/imcc/t/syn/file.t
==============================================================================
--- trunk/imcc/t/syn/file.t     (original)
+++ trunk/imcc/t/syn/file.t     Tue Oct 11 06:30:27 2005
@@ -30,7 +30,7 @@ ENDF
 close FOO;
 
 pir_output_is(<<'CODE', <<'OUT', "include pasm");
-.sub test @MAIN
+.sub test :main
     print "before\n"
     .include "temp.pasm"
     print .BAR
@@ -52,7 +52,7 @@ ENDF
 close FOO;
 
 pir_output_is(<<'CODE', <<'OUT', "include pir");
-.sub test @MAIN
+.sub test :main
     print "before\n"
     .include "temp.imc"
     print BAR
@@ -74,7 +74,7 @@ ENDF
 close FOO;
 
 pir_output_is(<<'CODE', <<'OUT', "include .inc");
-.sub test @MAIN
+.sub test :main
     print "before\n"
     .include "temp.inc"
     print BAR
@@ -111,7 +111,7 @@ EOF
 close F;
 
 pir_output_is(<<'CODE', <<'OUT', "subroutine in external file");
-.sub test @MAIN
+.sub test :main
    .local int x
    x = 10
    .const int y = 20
@@ -341,7 +341,7 @@ OUT
 # Including a non-existent file should produce an error
 .include "non_existent.imc"
 # An error should have been raised
-.sub test @MAIN
+.sub test :main
   # dummy, because a main function is expected
   end
 .end
@@ -365,7 +365,7 @@ END_PIR
     my $ENOENT = $! + 0;
     open FOO, ">temp.imc" or die "Can't write temp.imc\n";
     print FOO << "END_PIR";
-.sub test [EMAIL PROTECTED]
+.sub test \:main
   # run a OS command, and get the errmessge for the exit code
   .local string enoent_err_msg
   err enoent_err_msg, $ENOENT

Modified: trunk/imcc/t/syn/keyed.t
==============================================================================
--- trunk/imcc/t/syn/keyed.t    (original)
+++ trunk/imcc/t/syn/keyed.t    Tue Oct 11 06:30:27 2005
@@ -10,7 +10,7 @@ SKIP: {
   skip("experimental", 1);
 
 pir_output_is(<<'CODE', <<'OUTPUT', "add_keyed");
-.sub test @MAIN
+.sub test :main
     new P0, .Array
     new P1, .Array
     new P2, .Array

Modified: trunk/imcc/t/syn/labels.t
==============================================================================
--- trunk/imcc/t/syn/labels.t   (original)
+++ trunk/imcc/t/syn/labels.t   Tue Oct 11 06:30:27 2005
@@ -7,7 +7,7 @@ use Parrot::Test tests => 7;
 
 ##############################
 pir_output_is(<<'CODE', <<'OUT', "goto 1");
-.sub test @MAIN
+.sub test :main
        goto foo
        end
 foo:
@@ -21,7 +21,7 @@ OUT
 
 ##############################
 pir_output_is(<<'CODE', <<'OUT', "goto 2");
-.sub test @MAIN
+.sub test :main
        goto foo
 bar:   print "ok 2\n"
        end

Modified: trunk/imcc/t/syn/macro.t
==============================================================================
--- trunk/imcc/t/syn/macro.t    (original)
+++ trunk/imcc/t/syn/macro.t    Tue Oct 11 06:30:27 2005
@@ -8,7 +8,7 @@ use Parrot::Test tests => 23;
 # macro tests
 
 pir_output_is( <<'CODE', <<OUTPUT, "macro, zero parameters" );
-.sub test @MAIN
+.sub test :main
 .macro answer()
        print   42
        print   "\n"
@@ -21,7 +21,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "macro, one unused parameter, literal term" 
);
-.sub test @MAIN
+.sub test :main
 .macro answer(A)
        print   42
 .endm
@@ -34,7 +34,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "macro, one unused parameter, register 
term" );
-.sub test @MAIN
+.sub test :main
 .macro answer(A)
        print   42
 .endm
@@ -48,7 +48,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "macro, one used parameter, literal" );
-.sub test @MAIN
+.sub test :main
 .macro answer(A)
        print   .A
 .endm
@@ -61,7 +61,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "macro, one used parameter, register" );
-.sub test @MAIN
+.sub test :main
 .macro answer(A)
        print   .A
 .endm
@@ -75,7 +75,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "macro, one used parameter, called twice" );
-.sub test @MAIN
+.sub test :main
 .macro answer(A)
        print   .A
        print   "\n"
@@ -92,7 +92,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "macro, one used parameter, label" );
-.sub test @MAIN
+.sub test :main
 .macro answer(A)
        ne      I0,42,.$done
        print   .A
@@ -108,7 +108,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "macro, one used parameter run twice, 
label" );
-.sub test @MAIN
+.sub test :main
 .macro answer(A)
        ne      I0,42,.$done
        print   .A
@@ -126,7 +126,7 @@ CODE
 OUTPUT
 
 pir_output_is(<<'CODE', '32', "constant defined and used");
-.sub test @MAIN
+.sub test :main
 .const int FOO = 32
   print FOO
   end
@@ -134,7 +134,7 @@ pir_output_is(<<'CODE', '32', "constant 
 CODE
 
 pir_output_is(<<'CODE', 'foo', "constant defined and used");
-.sub test @MAIN
+.sub test :main
 .const string FOO = "foo"
   print FOO
   end
@@ -142,7 +142,7 @@ pir_output_is(<<'CODE', 'foo', "constant
 CODE
 
 pir_output_is( <<'CODE', <<OUTPUT, ".newid" );
-.sub test @MAIN
+.sub test :main
 .macro newid(ID, CLASS)
     .sym .CLASS .ID
     .ID = new .CLASS
@@ -158,7 +158,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, ".newlex" );
-.sub test @MAIN
+.sub test :main
 .macro newlex(ID, CLASS)
     .sym .CLASS .ID
     .ID = new .CLASS
@@ -175,7 +175,7 @@ CODE
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "too few params" );
-.sub test @MAIN
+.sub test :main
 .macro M(A, B)
     print .A
     print .B
@@ -188,7 +188,7 @@ CODE
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "too many params" );
-.sub test @MAIN
+.sub test :main
 .macro M(A, B)
     print .A
     print .B
@@ -201,7 +201,7 @@ CODE
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "ok param count" );
-.sub test @MAIN
+.sub test :main
 .macro M(A, B)
     print .A
     print .B
@@ -214,7 +214,7 @@ fine
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "macro name is no ident" );
-.sub test @MAIN
+.sub test :main
 .macro 42(A, B)
     print .A
     print .B
@@ -227,7 +227,7 @@ CODE
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "unterminated macro" );
-.sub test @MAIN
+.sub test :main
 .macro M(
 
 
@@ -236,7 +236,7 @@ CODE
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "unterminated macro 2" );
-.sub test @MAIN
+.sub test :main
 .macro M(A, B)
   print .A
 .endm
@@ -247,7 +247,7 @@ CODE
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "ill param def" );
-.sub test @MAIN
+.sub test :main
 .macro M(A, B
   print .A
 .endm
@@ -258,7 +258,7 @@ CODE
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "no params" );
-.sub test @MAIN
+.sub test :main
 .macro M(A, B)
     print .A
     print .B
@@ -272,7 +272,7 @@ OUTPUT
 
 
 pir_output_like( <<'CODE', <<OUTPUT, "unknown macro" );
-.sub test @MAIN
+.sub test :main
 .macro M(A, B)
     print .A
     print .B
@@ -285,7 +285,7 @@ CODE
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "unexpected IDENTIFIER" );
-.sub test @MAIN
+.sub test :main
 .macro M()
     this gives a parse error
 .endm
@@ -297,7 +297,7 @@ CODE
 OUTPUT
 
 pir_output_like( <<'CODE', <<OUTPUT, "unknown macro" );
-.sub test @MAIN
+.sub test :main
 .macro M(A)
     .arg .A
 .endm

Modified: trunk/imcc/t/syn/objects.t
==============================================================================
--- trunk/imcc/t/syn/objects.t  (original)
+++ trunk/imcc/t/syn/objects.t  Tue Oct 11 06:30:27 2005
@@ -11,7 +11,7 @@ use Parrot::Test tests => 11;
 
 pir_output_is(<<'CODE', <<'OUT', "meth call syntax");
 
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     newclass class, "Foo"
@@ -34,7 +34,7 @@ done
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "meth call syntax m.o(arg)");
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     newclass class, "Foo"
@@ -60,7 +60,7 @@ done
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "meth call ret = o.m(arg)");
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     newclass class, "Foo"
@@ -89,7 +89,7 @@ done
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "meth call syntax, string");
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     .local string meth
@@ -119,7 +119,7 @@ done
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "initializer");
-.sub test @MAIN
+.sub test :main
     newclass P1, "Foo"
     subclass P2, P1, "Bar"
     subclass P3, P2, "Baz"
@@ -160,7 +160,7 @@ OUT
 
 pir_output_is(<<'CODE', <<'OUT', "meth call syntax - method, self");
 
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     newclass class, "Foo"
@@ -188,7 +188,7 @@ OUT
 
 pir_output_is(<<'CODE', <<'OUT', "explicit meth call syntax");
 
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     newclass class, "Foo"
@@ -213,7 +213,7 @@ OUT
 
 pir_output_is(<<'CODE', <<'OUT', "explicit meth call syntax, meth var");
 
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     .local string meth
@@ -240,7 +240,7 @@ done
 OUT
 pir_output_is(<<'CODE', <<'OUT', "explicit meth call syntax, args");
 
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     newclass class, "Foo"
@@ -278,7 +278,7 @@ OUT
 
 pir_output_is(<<'CODE', <<'OUT', "explicit meth call syntax");
 
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     newclass class, "Foo"
@@ -303,7 +303,7 @@ OUT
 
 pir_output_is(<<'CODE', <<'OUT', "meth call syntax - reserved word");
 
-.sub test @MAIN
+.sub test :main
     .local pmc class
     .local pmc obj
     newclass class, "Foo"

Modified: trunk/imcc/t/syn/op.t
==============================================================================
--- trunk/imcc/t/syn/op.t       (original)
+++ trunk/imcc/t/syn/op.t       Tue Oct 11 06:30:27 2005
@@ -7,7 +7,7 @@ use Parrot::Test tests => 21;
 
 ##############################
 pir_output_is(<<'CODE', <<'OUT', "+=");
-.sub test @MAIN
+.sub test :main
     $I0 = 10
     $I0 += 20
     print $I0
@@ -20,7 +20,7 @@ OUT
 
 ##############################
 pir_output_is(<<'CODE', <<'OUT', "-=");
-.sub test @MAIN
+.sub test :main
     $I0 = 10
     $I0 -= 20
     print $I0
@@ -32,7 +32,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "*=");
-.sub test @MAIN
+.sub test :main
     $I0 = 10
     $I0 *= 20
     print $I0
@@ -44,7 +44,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "/=");
-.sub test @MAIN
+.sub test :main
     $I0 = 20
     $I0 /= 2
     print $I0
@@ -56,7 +56,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "%=");
-.sub test @MAIN
+.sub test :main
     $I0 = 20
     $I0 %= 7
     print $I0
@@ -68,7 +68,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', ".=");
-.sub test @MAIN
+.sub test :main
     $S0 = "ab"
     $S0 .= "cd"
     print $S0
@@ -79,7 +79,7 @@ CODE
 abcd
 OUT
 pir_output_is(<<'CODE', <<'OUT', "&=");
-.sub test @MAIN
+.sub test :main
     $I0 =  0b1011
     $I0 &= 0b1000
     print $I0
@@ -91,7 +91,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "|=");
-.sub test @MAIN
+.sub test :main
     $I0 =  0b1011
     $I0 |= 0b1000
     print $I0
@@ -103,7 +103,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "~=");
-.sub test @MAIN
+.sub test :main
     $I0 =  0b1011
     $I0 ~= 0b1000
     print $I0
@@ -115,7 +115,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', ">>=");
-.sub test @MAIN
+.sub test :main
     $I0 =  0b1011
     $I0 >>= 1
     print $I0
@@ -127,7 +127,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', ">>>=");
-.sub test @MAIN
+.sub test :main
     $I0 =  0b1011
     $I0 >>>= 1
     print $I0
@@ -139,7 +139,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "<<=");
-.sub test @MAIN
+.sub test :main
     $I0 =  0b1011
     $I0 <<= 1
     print $I0
@@ -151,7 +151,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "x = defined");
-.sub test @MAIN
+.sub test :main
     .local pmc a
     a = new PerlArray
     push a, 10
@@ -169,7 +169,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "x = clone");
-.sub test @MAIN
+.sub test :main
     .local pmc a
     a = new Integer
     a = 10
@@ -184,7 +184,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "x = length");
-.sub test @MAIN
+.sub test :main
     .local string s
     s = "abc"
     $I0 = length s
@@ -197,7 +197,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "x = sin");
-.sub test @MAIN
+.sub test :main
     $N0 = sin 0
     print $N0
     print "\n"
@@ -208,7 +208,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "x = can");
-.sub test @MAIN
+.sub test :main
     $P0 = new ParrotIO
     $I0 = can $P0, "puts"
     print $I0
@@ -220,7 +220,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "x = isa");
-.sub test @MAIN
+.sub test :main
     $P0 = new Integer
     $I0 = isa $P0, "scalar"
     print $I0
@@ -232,7 +232,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "x = add");
-.sub test @MAIN
+.sub test :main
     $I0 = 10
     $I1 = add $I0, 10
     print $I1
@@ -244,7 +244,7 @@ CODE
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "x = invoke");
-.sub test @MAIN
+.sub test :main
     $P0 = find_global "_s"
     $P0 = invokecc
     $S0 = "done\n"

Modified: trunk/imcc/t/syn/pod.t
==============================================================================
--- trunk/imcc/t/syn/pod.t      (original)
+++ trunk/imcc/t/syn/pod.t      Tue Oct 11 06:30:27 2005
@@ -8,7 +8,7 @@ use Parrot::Test tests => 3;
 # POD
 
 pir_output_is(<<'CODE', <<'OUT', "simple pod");
-.sub test @MAIN
+.sub test :main
     print "pass\n"
     end
 .end
@@ -20,7 +20,7 @@ pass
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "pod with decimal digits");
-.sub test @MAIN
+.sub test :main
     print "pass\n"
     end
 .end
@@ -32,7 +32,7 @@ pass
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "pod inside sub");
-.sub test @MAIN
+.sub test :main
      print "pass\n"
      bsr _x
      end

Modified: trunk/imcc/t/syn/scope.t
==============================================================================
--- trunk/imcc/t/syn/scope.t    (original)
+++ trunk/imcc/t/syn/scope.t    Tue Oct 11 06:30:27 2005
@@ -7,7 +7,7 @@ use Parrot::Test tests => 1;
 
 ##############################
 pir_output_is(<<'CODE', <<'OUT', "global const");
-.sub test @MAIN
+.sub test :main
        .globalconst string ok = "ok\n"
        print ok
        bsr _sub

Modified: trunk/imcc/t/syn/tail.t
==============================================================================
--- trunk/imcc/t/syn/tail.t     (original)
+++ trunk/imcc/t/syn/tail.t     Tue Oct 11 06:30:27 2005
@@ -11,7 +11,7 @@ use Parrot::Test tests => 6;
 $ENV{TEST_PROG_ARGS} = '-Oc';
 
 pir_output_is(<<'CODE', <<'OUT', "tail call optimization, final position");
-.sub _main @MAIN
+.sub _main :main
     $P1 = new Integer
     $P1 = 20
     $P2 = new Integer
@@ -95,7 +95,7 @@ SKIP: {
     skip("missing HLL :slurp syntax", 3);
 pir_output_is(<<'CODE', <<'OUT', "tail call optimization, intermediate 
position");
 
-.sub _main @MAIN
+.sub _main :main
        $P1 = new Integer
        $P1 = 20
        $P2 = new Integer
@@ -177,7 +177,7 @@ OUT
 
 pir_output_is(<<'CODE', <<'OUT', "tail call optimization, implicit final 
return");
 
-.sub _main @MAIN
+.sub _main :main
 
        $P1 = new Integer
        $P1 = 20
@@ -259,7 +259,7 @@ OUT
 
 pir_output_is(<<'CODE', <<'OUT', ":flatten in .return");
 
-.sub _main @MAIN
+.sub _main :main
 
        $P1 = new Integer
        $P1 = 20
@@ -318,7 +318,7 @@ OUT
 }
 
 pir_output_is(<<'CODE', <<'OUT', "new tail call syntax");
-.sub main @MAIN
+.sub main :main
     $S0 = foo()
     print $S0
 .end
@@ -336,7 +336,7 @@ ok
 OUT
 
 pir_output_is(<<'CODE', <<'OUT', "new tail method call syntax");
-.sub main @MAIN
+.sub main :main
     .local pmc cl, o, n
     cl = newclass "Foo"
     addattribute cl, "n"

Reply via email to