Author: fperrad
Date: Mon Jun  4 00:53:36 2007
New Revision: 18801

Modified:
   trunk/languages/WMLScript/build/SRM/Register.pm
   trunk/languages/WMLScript/build/SRM/Stack.pm
   trunk/languages/WMLScript/build/translator.pl
   trunk/languages/WMLScript/runtime/wmlsconsole.pir
   trunk/languages/WMLScript/runtime/wmlsfloat.pir
   trunk/languages/WMLScript/runtime/wmlslang.pir
   trunk/languages/WMLScript/runtime/wmlsstring.pir
   trunk/languages/WMLScript/src/script.pir
   trunk/languages/WMLScript/src/translation.rules
   trunk/languages/WMLScript/src/wmlsstdlibs.pir
   trunk/languages/WMLScript/wmls2pbc.pir
   trunk/languages/WMLScript/wmls2pir.pir
   trunk/languages/WMLScript/wmlsd.pir
   trunk/languages/WMLScript/wmlsi.pir

Log:
[WMLScript]
- indent label
- rename variables (ret, index)

Modified: trunk/languages/WMLScript/build/SRM/Register.pm
==============================================================================
--- trunk/languages/WMLScript/build/SRM/Register.pm     (original)
+++ trunk/languages/WMLScript/build/SRM/Register.pm     Mon Jun  4 00:53:36 2007
@@ -160,11 +160,11 @@
     \${PARAMS} = ""
     \$I0 = $nb_arg
     \$I1 = 0
-L1_\${CURIC}:
+  L1_\${CURIC}:
     unless \$I1 < \$I0 goto L2_\${CURIC}
     if \$I1 == 0 goto L3_\${CURIC}
     \${PARAMS} = concat ", ", \${PARAMS}
-L3_\${CURIC}:
+  L3_\${CURIC}:
     \$S0 = "\$P"
     \$S1 = stack_depth
     \$S0 = concat \$S1
@@ -173,7 +173,7 @@
     dec stack_depth
     inc \$I1
     goto L1_\${CURIC}
-L2_\${CURIC}:
+  L2_\${CURIC}:
     # Increment stack depth.
     inc stack_depth
     # Assign register name.

Modified: trunk/languages/WMLScript/build/SRM/Stack.pm
==============================================================================
--- trunk/languages/WMLScript/build/SRM/Stack.pm        (original)
+++ trunk/languages/WMLScript/build/SRM/Stack.pm        Mon Jun  4 00:53:36 2007
@@ -161,7 +161,7 @@
     \$I0 = $nb_arg
     dec \$I0
     \$I1 = \$I0
-L1_\${CURIC}:
+  L1_\${CURIC}:
     unless \$I1 >= 0 goto L2_\${CURIC}
     \${INS} = concat "  \$P"
     \$S0 = \$I1
@@ -169,13 +169,13 @@
     \${INS} = concat " = pop s\\n"
     if \$I1 == \$I0 goto L3_\${CURIC}
     \${PARAMS} = concat ", ", \${PARAMS}
-L3_\${CURIC}:
+  L3_\${CURIC}:
     \$S1 = "\$P"
     \$S1 = concat \$S1, \$S0
     \${PARAMS} = concat \$S1, \${PARAMS}
     dec \$I1
     goto L1_\${CURIC}
-L2_\${CURIC}:
+  L2_\${CURIC}:
     # Just got it in the 0th register.
     \${DEST0} = "reg0"
 PIR

Modified: trunk/languages/WMLScript/build/translator.pl
==============================================================================
--- trunk/languages/WMLScript/build/translator.pl       (original)
+++ trunk/languages/WMLScript/build/translator.pl       Mon Jun  4 00:53:36 2007
@@ -347,7 +347,7 @@
 
     gen_pir = concat "\n# BEGIN OF TRANSLATED BYTECODE\n\n"
 
-LOOP:
+  LOOP:
     pc = next_pc
     if pc >= bc_length goto COMPLETE
     $S0 = substr code, pc, 1
@@ -393,7 +393,7 @@
     bc_length = length code
     next_pc = 0
 
-LOOP:
+  LOOP:
     pc = next_pc
     if pc >= bc_length goto COMPLETE
     $S0 = substr code, pc, 1
@@ -428,7 +428,7 @@
 
     # Emit unknown instruction code.
     $pir .= <<'PIRCODE';
-BDISPATCH_NOT_FOUND:
+  BDISPATCH_NOT_FOUND:
     .local pmc ex
     .local string msg
     new ex, .Exception
@@ -480,9 +480,9 @@
         $pir .= "    if cur_ic < 0x$r2[0]->{code} goto 
${prefix}_$r1[$#r1]->{code}\n";
 
         # Recurse to make code for sub branches.
-        $pir .= "${prefix}_$r1[$#r1]->{code}:\n";
+        $pir .= "  ${prefix}_$r1[$#r1]->{code}:\n";
         $pir .= binary_dispatch_table( $prefix, @r1 );
-        $pir .= "${prefix}_$r2[0]->{code}:\n";
+        $pir .= "  ${prefix}_$r2[0]->{code}:\n";
         $pir .= binary_dispatch_table( $prefix, @r2 );
     }
 
@@ -502,7 +502,7 @@
 
     # Emit dispatch label.
     my $pir = <<"PIRCODE";
-BDISPATCH_$rule->{name}:
+  BDISPATCH_$rule->{name}:
     # Translation code for $rule->{name} ($rule->{code})
     gen_pir = concat "  # $rule->{name}\\n"
 PIRCODE
@@ -750,7 +750,7 @@
 
     # Emit dispatch label.
     my $pir = <<"PIRCODE";
-BDISPATCH_$rule->{name}:
+  BDISPATCH_$rule->{name}:
     # Dump code for $rule->{name}
 PIRCODE
 
@@ -826,7 +826,7 @@
     # Emit complete label.
     # Emit the end of the dumper.
     my $pir = <<'PIRCODE';
-COMPLETE:
+  COMPLETE:
 .end
 
 PIRCODE
@@ -843,7 +843,7 @@
     # Emit complete label.
     # Emit label generation code.
     my $pir = <<'PIRCODE';
-COMPLETE:
+  COMPLETE:
 
     $S0 = pc
     gen_pir = concat "PC"
@@ -855,13 +855,13 @@
     # Insert constants.
     $P0 = iter h_const
     $S0 = "\n"
-L1_CST:
+  L1_CST:
     $S1 = shift $P0
     if null $S1 goto L2_CST
     $S1 = $P0[$S1]
     $S0 = concat $S1
     goto L1_CST
-L2_CST:
+  L2_CST:
     $S0 = concat "\n"
     gen_pir = concat $S0, gen_pir
 PIRCODE

Modified: trunk/languages/WMLScript/runtime/wmlsconsole.pir
==============================================================================
--- trunk/languages/WMLScript/runtime/wmlsconsole.pir   (original)
+++ trunk/languages/WMLScript/runtime/wmlsconsole.pir   Mon Jun  4 00:53:36 2007
@@ -46,19 +46,19 @@
 
 .sub '_console_print' :anon
     .param pmc str
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
     $S0 = str
     print $S0
     $I0 = length $S0
-    new ret, .WmlsInteger
-    ret = $I0
+    new res, .WmlsInteger
+    set res, $I0
     goto L2
-L1:
-    new ret, .WmlsInvalid
-L2:
-    .return (ret)
+  L1:
+    new res, .WmlsInvalid
+  L2:
+    .return (res)
 .end
 
 
@@ -79,20 +79,20 @@
 
 .sub '_console_println' :anon
     .param pmc str
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
     $S0 = str
     print $S0
     print "\n"
     $I0 = length $S0
-    new ret, .WmlsInteger
-    ret = $I0
+    new res, .WmlsInteger
+    set res, $I0
     goto L2
-L1:
-    new ret, .WmlsInvalid
-L2:
-    .return (ret)
+  L1:
+    new res, .WmlsInvalid
+  L2:
+    .return (res)
 .end
 
 

Modified: trunk/languages/WMLScript/runtime/wmlsfloat.pir
==============================================================================
--- trunk/languages/WMLScript/runtime/wmlsfloat.pir     (original)
+++ trunk/languages/WMLScript/runtime/wmlsfloat.pir     Mon Jun  4 00:53:36 2007
@@ -63,22 +63,22 @@
 
 .sub '_float_int' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $P0 = value
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseNumber'()
-L1:
+  L1:
     $I0 = isa $P0, 'WmlsInvalid'
     if $I0 goto L2
     $I0 = $P0
-    new ret, .WmlsInteger
-    set ret, $I0
+    new res, .WmlsInteger
+    set res, $I0
     goto L3
-L2:
-    new ret, .WmlsInvalid
-L3:
-    .return (ret)
+  L2:
+    new res, .WmlsInvalid
+  L3:
+    .return (res)
 .end
 
 
@@ -101,23 +101,23 @@
 
 .sub '_float_floor' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $P0 = value
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseNumber'()
-L1:
+  L1:
     $I0 = isa $P0, 'WmlsInvalid'
     if $I0 goto L2
     $N0 = $P0
     $I0 = floor $N0
-    new ret, .WmlsInteger
-    set ret, $I0
+    new res, .WmlsInteger
+    set res, $I0
     goto L3
-L2:
-    new ret, .WmlsInvalid
-L3:
-    .return (ret)
+  L2:
+    new res, .WmlsInvalid
+  L3:
+    .return (res)
 .end
 
 
@@ -140,23 +140,23 @@
 
 .sub '_float_ceil' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $P0 = value
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseNumber'()
-L1:
+  L1:
     $I0 = isa $P0, 'WmlsInvalid'
     if $I0 goto L2
     $N0 = $P0
     $I0 = ceil $N0
-    new ret, .WmlsInteger
-    set ret, $I0
+    new res, .WmlsInteger
+    set res, $I0
     goto L3
-L2:
-    new ret, .WmlsInvalid
-L3:
-    .return (ret)
+  L2:
+    new res, .WmlsInvalid
+  L3:
+    .return (res)
 .end
 
 
@@ -189,12 +189,12 @@
 .sub '_float_pow' :anon
     .param pmc value1
     .param pmc value2
-    .local pmc ret
+    .local pmc res
     $P1 = value1
     $I0 = isa value1, 'WmlsString'
     unless $I0 goto L1
     $P1 = value1.'parseNumber'()
-L1:
+  L1:
     $I0 = isa $P1, 'WmlsInvalid'
     if $I0 goto L2
     $N1 = $P1
@@ -202,28 +202,28 @@
     $I0 = isa value2, 'WmlsString'
     unless $I0 goto L3
     $P2 = value2.'parseNumber'()
-L3:
+  L3:
     $I0 = isa $P2, 'WmlsInvalid'
     if $I0 goto L2
     $N2 = $P2
     unless $N1 == 0.0 goto L4
     if $N2 < 0.0 goto L2
-    new ret, .WmlsFloat
-    set ret, 0.0
+    new res, .WmlsFloat
+    set res, 0.0
     goto L5
-L4:
+  L4:
     unless $N1 < 0.0 goto L6
     $I0 = isa $P2, 'WmlsFloat'
     if $I0 goto L2
-L6:
+  L6:
     $N0 = pow $N1, $N2
-    new ret, .WmlsFloat
-    set ret, $N0
+    new res, .WmlsFloat
+    set res, $N0
     goto L5
-L2:
-    new ret, .WmlsInvalid
-L5:
-    .return (ret)
+  L2:
+    new res, .WmlsInvalid
+  L5:
+    .return (res)
 .end
 
 
@@ -248,24 +248,24 @@
 
 .sub '_float_round' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $P0 = value
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseNumber'()
-L1:
+  L1:
     $I0 = isa $P0, 'WmlsInvalid'
     if $I0 goto L2
     $N0 = $P0
     $N0 += 0.5
     $I0 = floor $N0
-    new ret, .WmlsInteger
-    set ret, $I0
+    new res, .WmlsInteger
+    set res, $I0
     goto L3
-L2:
-    new ret, .WmlsInvalid
-L3:
-    .return (ret)
+  L2:
+    new res, .WmlsInvalid
+  L3:
+    .return (res)
 .end
 
 
@@ -292,24 +292,24 @@
 
 .sub '_float_sqrt' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $P0 = value
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseNumber'()
-L1:
+  L1:
     $I0 = isa $P0, 'WmlsInvalid'
     if $I0 goto L2
     $N0 = $P0
     if $N0 < 0.0 goto L2
     $N1 = sqrt $N0
-    new ret, .WmlsFloat
-    set ret, $N1
+    new res, .WmlsFloat
+    set res, $N1
     goto L3
-L2:
-    new ret, .WmlsInvalid
-L3:
-    .return (ret)
+  L2:
+    new res, .WmlsInvalid
+  L3:
+    .return (res)
 .end
 
 
@@ -327,10 +327,10 @@
 =cut
 
 .sub '_float_maxFloat' :anon
-    .local pmc ret
-    new ret, .WmlsFloat
-    set ret, 3.40282347e+38
-    .return (ret)
+    .local pmc res
+    new res, .WmlsFloat
+    set res, 3.40282347e+38
+    .return (res)
 .end
 
 
@@ -349,10 +349,10 @@
 =cut
 
 .sub '_float_minFloat' :anon
-    .local pmc ret
-    new ret, .WmlsFloat
-    set ret, 1.17549435e-38
-    .return (ret)
+    .local pmc res
+    new res, .WmlsFloat
+    set res, 1.17549435e-38
+    .return (res)
 .end
 
 

Modified: trunk/languages/WMLScript/runtime/wmlslang.pir
==============================================================================
--- trunk/languages/WMLScript/runtime/wmlslang.pir      (original)
+++ trunk/languages/WMLScript/runtime/wmlslang.pir      Mon Jun  4 00:53:36 2007
@@ -78,10 +78,10 @@
 
 .sub '_lang_abs' :anon
     .param pmc value
-    .local pmc ret
-    ret = clone value
-    ret = abs value
-    .return (ret)
+    .local pmc res
+    res = clone value
+    res = abs value
+    .return (res)
 .end
 
 
@@ -126,30 +126,30 @@
 .sub '_lang_min' :anon
     .param pmc value1
     .param pmc value2
-    .local pmc ret
+    .local pmc res
     $P1 = value1
     $I0 = isa value1, 'WmlsString'
     unless $I0 goto L1
     $P1 = value1.'parseNumber'()
-L1:
+  L1:
     $P2 = value2
     $I0 = isa value2, 'WmlsString'
     unless $I0 goto L2
     $P2 = value2.'parseNumber'()
-L2:
+  L2:
     $P0 = isle $P1, $P2
     $I0 = isa $P0, 'WmlsInvalid'
     unless $I0 goto L3
     .return ($P0)
-L3:
+  L3:
     $I0 = $P0
     unless $I0 goto L4
-    ret = clone value1
+    res = clone value1
     goto L5
-L4:
-    ret = clone value2
-L5:
-    .return (ret)
+  L4:
+    res = clone value2
+  L5:
+    .return (res)
 .end
 
 
@@ -194,30 +194,30 @@
 .sub '_lang_max' :anon
     .param pmc value1
     .param pmc value2
-    .local pmc ret
+    .local pmc res
     $P1 = value1
     $I0 = isa value1, 'WmlsString'
     unless $I0 goto L1
     $P1 = value1.'parseNumber'()
-L1:
+  L1:
     $P2 = value2
     $I0 = isa value2, 'WmlsString'
     unless $I0 goto L2
     $P2 = value2.'parseNumber'()
-L2:
+  L2:
     $P0 = isge $P1, $P2
     $I0 = isa $P0, 'WmlsInvalid'
     unless $I0 goto L3
     .return ($P0)
-L3:
+  L3:
     $I0 = $P0
     unless $I0 goto L4
-    ret = clone value1
+    res = clone value1
     goto L5
-L4:
-    ret = clone value2
-L5:
-    .return (ret)
+  L4:
+    res = clone value2
+  L5:
+    .return (res)
 .end
 
 
@@ -257,18 +257,18 @@
 
 .sub '_lang_parseInt' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
-    ret = value.'parseInt'()
-    .return (ret)
-L1:
-    ret = value
+    res = value.'parseInt'()
+    .return (res)
+  L1:
+    res = value
     $I0 = isa value, 'WmlsInteger'
     if $I0 goto L2
-    new ret, .WmlsInvalid
-L2:
-    .return (ret)
+    new res, .WmlsInvalid
+  L2:
+    .return (res)
 .end
 
 
@@ -308,25 +308,25 @@
 
 .sub '_lang_parseFloat' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
-    ret = value.'parseFloat'()
-    .return (ret)
-L1:
-    ret = value
+    res = value.'parseFloat'()
+    .return (res)
+  L1:
+    res = value
     $I0 = isa value, 'WmlsFloat'
     if $I0 goto L2
     $I0 = isa value, 'WmlsInteger'
     unless $I0 goto L3
     $I0 = value
-    new ret, .WmlsFloat
-    set ret, $I0
+    new res, .WmlsFloat
+    set res, $I0
     goto L2
-L3:
-    new ret, .WmlsInvalid
-L2:
-    .return (ret)
+  L3:
+    new res, .WmlsInvalid
+  L2:
+    .return (res)
 .end
 
 
@@ -350,22 +350,22 @@
 
 .sub '_lang_isInt' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseInt'()
-    ret = defined $P0
-    .return (ret)
-L1:
+    res = defined $P0
+    .return (res)
+  L1:
     $I0 = isa value, 'WmlsInvalid'
     unless $I0 goto L2
-    new ret, .WmlsInvalid
-    .return (ret)
-L2:
-    new ret, .WmlsBoolean
+    new res, .WmlsInvalid
+    .return (res)
+  L2:
+    new res, .WmlsBoolean
     $I0 = isa value, 'WmlsInteger'
-    set ret, $I0
-    .return (ret)
+    set res, $I0
+    .return (res)
 .end
 
 
@@ -389,26 +389,26 @@
 
 .sub '_lang_isFloat' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseFloat'()
-    ret = defined $P0
-    .return (ret)
-L1:
+    res = defined $P0
+    .return (res)
+  L1:
     $I0 = isa value, 'WmlsInvalid'
     unless $I0 goto L2
-    new ret, .WmlsInvalid
-    .return (ret)
-L2:
-    new ret, .WmlsBoolean
+    new res, .WmlsInvalid
+    .return (res)
+  L2:
+    new res, .WmlsBoolean
     $I0 = isa value, 'WmlsFloat'
-    set ret, $I0
+    set res, $I0
     if $I0 goto L3
     $I0 = isa value, 'WmlsInteger'
-    set ret, $I0
-L3:
-    .return (ret)
+    set res, $I0
+  L3:
+    .return (res)
 .end
 
 
@@ -425,10 +425,10 @@
 =cut
 
 .sub '_lang_maxInt' :anon
-    .local pmc ret
-    new ret, .WmlsInteger
-    set ret, 2147483647
-    .return (ret)
+    .local pmc res
+    new res, .WmlsInteger
+    set res, 2147483647
+    .return (res)
 .end
 
 
@@ -445,10 +445,10 @@
 =cut
 
 .sub '_lang_minInt' :anon
-    .local pmc ret
-    new ret, .WmlsInteger
-    set ret, -2147483648
-    .return (ret)
+    .local pmc res
+    new res, .WmlsInteger
+    set res, -2147483648
+    .return (res)
 .end
 
 
@@ -465,10 +465,10 @@
 =cut
 
 .sub '_lang_float' :anon
-    .local pmc ret
-    new ret, .WmlsBoolean
-    set ret, 1
-    .return (ret)
+    .local pmc res
+    new res, .WmlsBoolean
+    set res, 1
+    .return (res)
 .end
 
 
@@ -493,13 +493,13 @@
 
 .sub '_lang_exit' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
-    $P0 = value.parseInt()
+    $P0 = value.'parseInt'()
     $I0 = $P0
     exit $I0
-L1:
+  L1:
     $I0 = value
     exit $I0
 .end
@@ -566,12 +566,12 @@
 
 .sub '_lang_random' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $P0 = value
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseNumber'()
-L1:
+  L1:
     $I0 = isa $P0, 'WmlsInvalid'
     if $I0 goto L2
     $I0 = $P0
@@ -580,13 +580,13 @@
     $N0 = $P0
     $N0 = mul $I0
     $I0 = $N0
-    new ret, .WmlsInteger
-    set ret, $I0
+    new res, .WmlsInteger
+    set res, $I0
     goto L3
-L2:
-    new ret, .WmlsInvalid
-L3:
-    .return (ret)
+  L2:
+    new res, .WmlsInvalid
+  L3:
+    .return (res)
 .end
 
 
@@ -617,26 +617,26 @@
 
 .sub '_lang_seed' :anon
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $P0 = value
     $I0 = isa value, 'WmlsString'
     unless $I0 goto L1
     $P0 = value.'parseNumber'()
-L1:
+  L1:
     $I0 = isa $P0, 'WmlsInvalid'
     if $I0 goto L2
     $I0 = $P0
     if $I0 >= 0 goto L3
     $I0 = time
-L3:
+  L3:
     new $P0, .Random
     $P0 = $I0
-    new ret, .WmlsString, ''
+    new res, .WmlsString, ''
     goto L4
-L2:
-    new ret, .WmlsInvalid
-L4:
-    .return (ret)
+  L2:
+    new res, .WmlsInvalid
+  L4:
+    .return (res)
 .end
 
 
@@ -655,10 +655,10 @@
 =cut
 
 .sub '_lang_characterSet' :anon
-    .local pmc ret
-    new ret, .WmlsInteger
-    ret = 4     # latin1
-    .return (ret)
+    .local pmc res
+    new res, .WmlsInteger
+    res = 4     # latin1
+    .return (res)
 .end
 
 

Modified: trunk/languages/WMLScript/runtime/wmlsstring.pir
==============================================================================
--- trunk/languages/WMLScript/runtime/wmlsstring.pir    (original)
+++ trunk/languages/WMLScript/runtime/wmlsstring.pir    Mon Jun  4 00:53:36 2007
@@ -104,17 +104,17 @@
 
 .sub '_string_length' :anon
     .param pmc str
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
     $S1 = str
     $I1 = length $S1
-    new ret, .WmlsInteger
-    ret = $I1
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    new res, .WmlsInteger
+    set res, $I1
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -137,20 +137,20 @@
 
 .sub '_string_isEmpty' :anon
     .param pmc str
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
     $S1 = str
     $I1 = length $S1
-    new ret, .WmlsBoolean
-    ret = 0
+    new res, .WmlsBoolean
+    set res, 0
     if $I1 goto L2
-    ret = 1
-L2:
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, 1
+  L2:
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -182,29 +182,29 @@
 
 .sub '_string_charAt' :anon
     .param pmc str
-    .param pmc index
-    .local pmc ret
+    .param pmc index_
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
-    $I0 = isa index, 'WmlsInteger'
+    $I0 = isa index_, 'WmlsInteger'
     if $I0 goto L2
-    $I0 = isa index, 'WmlsFloat'
+    $I0 = isa index_, 'WmlsFloat'
     if $I0 goto L2
     goto L1
-L2:
+  L2:
     $S1 = str
     $I1 = length $S1
-    $I2 = index
-    new ret, .WmlsString
+    $I2 = index_
+    new res, .WmlsString
     if $I2 < 0 goto L3
     if $I2 >= $I1 goto L3
     $S0 = substr $S1, $I2, 1
-    ret = $S0
-L3:
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $S0
+  L3:
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -245,7 +245,7 @@
     .param pmc String
     .param pmc startIndex
     .param pmc Length
-    .local pmc ret
+    .local pmc res
     $I0 = isa String, 'WmlsInvalid'
     if $I0 goto L1
     $I0 = isa startIndex, 'WmlsInteger'
@@ -253,30 +253,30 @@
     $I0 = isa startIndex, 'WmlsFloat'
     if $I0 goto L2
     goto L1
-L2:
+  L2:
     $I0 = isa Length, 'WmlsInteger'
     if $I0 goto L3
     $I0 = isa Length, 'WmlsFloat'
     if $I0 goto L3
     goto L1
-L3:
+  L3:
     $S1 = String
     $I1 = length $S1
     $I2 = startIndex
     if $I2 >= 0 goto L4
     $I2 = 0
-L4:
-    new ret, .WmlsString
+  L4:
+    new res, .WmlsString
     if $I2 >= $I1 goto L5
     $I3 = Length
     if $I3 <= 0 goto L5
     $S0 = substr $S1, $I2, $I3
-    ret = $S0
-L5:
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $S0
+  L5:
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -310,7 +310,7 @@
 .sub '_string_find' :anon
     .param pmc String
     .param pmc subString
-    .local pmc ret
+    .local pmc res
     $I0 = isa String, 'WmlsInvalid'
     if $I0 goto L1
     $I0 = isa subString, 'WmlsInvalid'
@@ -320,12 +320,12 @@
     $I2 = length $S2
     if $I2 == 0 goto L1
     $I0 = index $S1, $S2
-    new ret, .WmlsInteger
-    ret = $I0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    new res, .WmlsInteger
+    set res, $I0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -362,7 +362,7 @@
     .param pmc String
     .param pmc oldSubString
     .param pmc newSubString
-    .local pmc ret
+    .local pmc res
     $I0 = isa String, 'WmlsInvalid'
     if $I0 goto L1
     $I0 = isa oldSubString, 'WmlsInvalid'
@@ -376,12 +376,12 @@
     $S3 = newSubString
     $P0 = split $S2, $S1
     $S0 = join $S3, $P0
-    new ret, .WmlsString
-    ret = $S0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    new res, .WmlsString
+    set res, $S0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -412,7 +412,7 @@
 .sub '_string_elements' :anon
     .param pmc str
     .param pmc separator
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
     $I0 = isa separator, 'WmlsInvalid'
@@ -422,19 +422,19 @@
     $I2 = length $S2
     if $I2 == 0 goto L1
     $S2 = substr $S2, 0, 1
-    new ret, .WmlsInteger
+    new res, .WmlsInteger
     $I1 = length $S1
     if $I1 != 0 goto L2
-    ret = 1
-    .return (ret)
-L2:
+    set res, 1
+    .return (res)
+  L2:
     $P0 = split $S2, $S1
     $I0 = elements $P0
-    ret = $I0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $I0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -471,44 +471,44 @@
 
 .sub '_string_elementAt' :anon
     .param pmc str
-    .param pmc index
+    .param pmc index_
     .param pmc separator
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
-    $I0 = isa index, 'WmlsInteger'
+    $I0 = isa index_, 'WmlsInteger'
     if $I0 goto L2
-    $I0 = isa index, 'WmlsFloat'
+    $I0 = isa index_, 'WmlsFloat'
     if $I0 goto L2
     goto L1
-L2:
+  L2:
     $I0 = isa separator, 'WmlsInvalid'
     if $I0 goto L1
     $S1 = str
-    $I2 = index
+    $I2 = index_
     if $I2 >= 0 goto L3
     $I2 = 0
-L3:
+  L3:
     $S3 = separator
     $I3 = length $S3
     if $I3 == 0 goto L1
     $S3 = substr $S3, 0, 1
-    new ret, .WmlsString
+    new res, .WmlsString
     $I1 = length $S1
     if $I1 != 0 goto L4
-    .return (ret)
-L4:
+    .return (res)
+  L4:
     $P0 = split $S3, $S1
     $I0 = elements $P0
     if $I2 < $I0 goto L5
     $I2 = $I0 - 1
-L5:
+  L5:
     $S0 = $P0[$I2]
-    ret = $S0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $S0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -545,59 +545,59 @@
 
 .sub '_string_removeAt' :anon
     .param pmc str
-    .param pmc index
+    .param pmc index_
     .param pmc separator
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
-    $I0 = isa index, 'WmlsInteger'
+    $I0 = isa index_, 'WmlsInteger'
     if $I0 goto L2
-    $I0 = isa index, 'WmlsFloat'
+    $I0 = isa index_, 'WmlsFloat'
     if $I0 goto L2
     goto L1
-L2:
+  L2:
     $I0 = isa separator, 'WmlsInvalid'
     if $I0 goto L1
     $S1 = str
-    $I2 = index
+    $I2 = index_
     if $I2 >= 0 goto L3
     $I2 = 0
-L3:
+  L3:
     $S3 = separator
     $I3 = length $S3
     if $I3 == 0 goto L1
     $S3 = substr $S3, 0, 1
-    new ret, .WmlsString
+    new res, .WmlsString
     $I1 = length $S1
     if $I1 != 0 goto L4
-    .return (ret)
-L4:
+    .return (res)
+  L4:
     $P0 = split $S3, $S1
     $I4 = elements $P0
     if $I2 < $I4 goto L5
     $I2 = $I4 - 1
-L5:
+  L5:
     dec $I4
     new $P1, .Array
     set $P1, $I4
     $I0 = 0
     $I1 = 0
-L6:
+  L6:
     unless $I1 < $I4 goto L7
     $S0 = $P0[$I0]
     $P1[$I1] = $S0
     if $I0 == $I2 goto L8
     inc $I1
-L8:
+  L8:
     inc $I0
     goto L6
-L7:
+  L7:
     $S0 = join $S3, $P1
-    ret = $S0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $S0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -637,49 +637,49 @@
 .sub '_string_replaceAt' :anon
     .param pmc str
     .param pmc element
-    .param pmc index
+    .param pmc index_
     .param pmc separator
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
     $I0 = isa element, 'WmlsInvalid'
     if $I0 goto L1
-    $I0 = isa index, 'WmlsInteger'
+    $I0 = isa index_, 'WmlsInteger'
     if $I0 goto L2
-    $I0 = isa index, 'WmlsFloat'
+    $I0 = isa index_, 'WmlsFloat'
     if $I0 goto L2
     goto L1
-L2:
+  L2:
     $I0 = isa separator, 'WmlsInvalid'
     if $I0 goto L1
     $S1 = str
     $S2 = element
-    $I3 = index
+    $I3 = index_
     if $I3 >= 0 goto L3
     $I3 = 0
-L3:
+  L3:
     $S4 = separator
     $I4 = length $S4
     if $I4 == 0 goto L1
     $S4 = substr $S4, 0, 1
-    new ret, .WmlsString
+    new res, .WmlsString
     $I1 = length $S1
     if $I1 != 0 goto L4
-    ret = $S2
-    .return (ret)
-L4:
+    set res, $S2
+    .return (res)
+  L4:
     $P0 = split $S4, $S1
     $I0 = elements $P0
     if $I3 < $I0 goto L5
     $I3 = $I0 - 1
-L5:
+  L5:
     $P0[$I3] = $S2
     $S0 = join $S4, $P0
-    ret = $S0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $S0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -719,65 +719,65 @@
 .sub '_string_insertAt' :anon
     .param pmc str
     .param pmc element
-    .param pmc index
+    .param pmc index_
     .param pmc separator
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
     $I0 = isa element, 'WmlsInvalid'
     if $I0 goto L1
-    $I0 = isa index, 'WmlsInteger'
+    $I0 = isa index_, 'WmlsInteger'
     if $I0 goto L2
-    $I0 = isa index, 'WmlsFloat'
+    $I0 = isa index_, 'WmlsFloat'
     if $I0 goto L2
     goto L1
-L2:
+  L2:
     $I0 = isa separator, 'WmlsInvalid'
     if $I0 goto L1
     $S1 = str
     $S2 = element
-    $I3 = index
+    $I3 = index_
     if $I3 >= 0 goto L3
     $I3 = 0
-L3:
+  L3:
     $S4 = separator
     $I4 = length $S4
     if $I4 == 0 goto L1
     $S4 = substr $S4, 0, 1
-    new ret, .WmlsString
+    new res, .WmlsString
     $I1 = length $S1
     if $I1 != 0 goto L4
-    ret = $S2
-    .return (ret)
-L4:
+    set res, $S2
+    .return (res)
+  L4:
     $P0 = split $S4, $S1
     $I5 = elements $P0
     if $I3 <= $I5 goto L5
     $I3 = $I5
-L5:
+  L5:
     $I6 = $I5 + 1
     new $P1, .Array
     set $P1, $I6
     $I0 = 0
     $I1 = 0
-L6:
+  L6:
     unless $I0 < $I5 goto L7
     if $I1 != $I3 goto L8
     inc $I1
-L8:
+  L8:
     $S0 = $P0[$I0]
     $P1[$I1] = $S0
     inc $I0
     inc $I1
     goto L6
-L7:
+  L7:
     $P1[$I3] = $S2
     $S0 = join $S4, $P1
-    ret = $S0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $S0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -802,43 +802,43 @@
 
 .sub 'squeeze' :anon
     .param string s
-    .local string ret
+    .local string res
     .local int idx
-    ret = ''
+    res = ''
     idx = 0
     $I1 = length s
-L1:
+  L1:
     unless idx < $I1 goto L2
     $I0 = is_cclass .CCLASS_WHITESPACE, s, idx
     if $I0 goto L3
     $S0 = substr s, idx, 1
-    ret = concat $S0
+    res = concat $S0
     inc idx
     goto L1
-L3:
-    ret = concat ' '
-L4:
+  L3:
+    res = concat ' '
+  L4:
     inc idx
     $I0 = is_cclass .CCLASS_WHITESPACE, s, idx
     if $I0 goto L4
     goto L1
-L2:
-    .return (ret)
+  L2:
+    .return (res)
 .end
 
 .sub '_string_squeeze' :anon
     .param pmc str
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
-    new ret, .WmlsString
+    new res, .WmlsString
     $S1 = str
     $S0 = squeeze($S1)
-    ret = $S0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $S0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -861,38 +861,38 @@
 
 .sub 'trim' :anon
     .param string s
-    .local string ret
+    .local string res
     $I1 = 0
-L1:
+  L1:
     $I0 = is_cclass .CCLASS_WHITESPACE, s, $I1
     unless $I0 goto L2
     inc $I1
     goto L1
-L2:
+  L2:
     $I2 = length s
-L3:
+  L3:
     dec $I2
     $I0 = is_cclass .CCLASS_WHITESPACE, s, $I2
     if $I0 goto L3
     inc $I2
     $I2 -= $I1
-    ret = substr s, $I1, $I2
-    .return (ret)
+    res = substr s, $I1, $I2
+    .return (res)
 .end
 
 .sub '_string_trim' :anon
     .param pmc str
-    .local pmc ret
+    .local pmc res
     $I0 = isa str, 'WmlsInvalid'
     if $I0 goto L1
-    new ret, .WmlsString
+    new res, .WmlsString
     $S1 = str
     $S0 = trim($S1)
-    ret = $S0
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, $S0
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -920,27 +920,27 @@
 .sub '_string_compare' :anon
     .param pmc string1
     .param pmc string2
-    .local pmc ret
+    .local pmc res
     $I0 = isa string1, 'WmlsInvalid'
     if $I0 goto L1
     $I0 = isa string2, 'WmlsInvalid'
     if $I0 goto L1
     $S1 = string1
     $S2 = string2
-    new ret, .WmlsInteger
+    new res, .WmlsInteger
     if $S1 >= $S2 goto L2
-    ret = -1
-    .return (ret)
-L2:
+    set res, -1
+    .return (res)
+  L2:
     if $S1 > $S2 goto L3
-    ret = 0
-    .return (ret)
-L3:
-    ret = 1
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    set res, 0
+    .return (res)
+  L3:
+    set res, 1
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 
@@ -966,10 +966,10 @@
 .sub '_string_toString' :anon
     .param pmc value
     $S1 = value
-    .local pmc ret
-    new ret, .WmlsString
-    ret = $S1
-    .return (ret)
+    .local pmc res
+    new res, .WmlsString
+    set res, $S1
+    .return (res)
 .end
 
 
@@ -1084,21 +1084,21 @@
 .sub '_string_format' :anon
     .param pmc format
     .param pmc value
-    .local pmc ret
+    .local pmc res
     $I0 = isa format, 'WmlsInvalid'
     if $I0 goto L1
     $S0 = format
     new $P0, .Array
     set $P0, 1
     $P0[0] = value
-L2:
+  L2:
     $S1 = sprintf $S0, $P0
-    new ret, .WmlsString
-    ret = $S1
-    .return (ret)
-L1:
-    new ret, .WmlsInvalid
-    .return (ret)
+    new res, .WmlsString
+    set res, $S1
+    .return (res)
+  L1:
+    new res, .WmlsInvalid
+    .return (res)
 .end
 
 

Modified: trunk/languages/WMLScript/src/script.pir
==============================================================================
--- trunk/languages/WMLScript/src/script.pir    (original)
+++ trunk/languages/WMLScript/src/script.pir    Mon Jun  4 00:53:36 2007
@@ -144,7 +144,7 @@
     .local pmc constant
     nb = elements self
     idx = 0
-L1:
+  L1:
     unless idx < nb goto L2
     constant = self[idx]
     print "cst"
@@ -154,7 +154,7 @@
     print "\n"
     inc idx
     goto L1
-L2:
+  L2:
 .end
 
 .sub 'translate' :method
@@ -297,7 +297,7 @@
     .local pmc pragma
     nb = elements self
     idx = 0
-L1:
+  L1:
     unless idx < nb goto L2
     pragma = self[idx]
     print "pragma"
@@ -307,7 +307,7 @@
     print "\n"
     inc idx
     goto L1
-L2:
+  L2:
 .end
 
 .namespace ['Wmls::AccessDomain']
@@ -373,7 +373,7 @@
     .local int function_name_size
     .local int function_index
     idx = 0
-L1:
+  L1:
     unless idx < number_of_function_names goto L2
     couple = self[idx]
     function_index = couple[0]
@@ -387,7 +387,7 @@
     print "\n"
     inc idx
     goto L1
-L2:
+  L2:
 .end
 
 .sub 'translate' :method
@@ -403,7 +403,7 @@
     .local pmc couple
     .local string function_name
     .local int function_index
-L1:
+  L1:
     unless idx < nb goto L2
     couple = self[idx]
     function_index = couple[0]
@@ -422,7 +422,7 @@
     pir .= "\n"
     inc idx
     goto L1
-L2:
+  L2:
     .return (pir)
 .end
 
@@ -434,7 +434,7 @@
     .local pmc function
     nb = elements self
     idx = 0
-L1:
+  L1:
     unless idx < nb goto L2
     function = self[idx]
     print "## function "
@@ -443,7 +443,7 @@
     function.dump()
     inc idx
     goto L1
-L2:
+  L2:
 .end
 
 .sub 'translate' :method
@@ -455,14 +455,14 @@
     .local pmc function
     nb = elements self
     idx = 0
-L1:
+  L1:
     unless idx < nb goto L2
     function = self[idx]
     $S0 = function.translate(script, idx)
     pir .= $S0
     inc idx
     goto L1
-L2:
+  L2:
     .return (pir)
 .end
 
@@ -502,7 +502,7 @@
     number_of_arguments = self['NumberOfArguments']
     .local int idx
     idx = 0
-L1:
+  L1:
     unless idx < number_of_arguments goto L2
     pir .= "  .param pmc arg"
     $S0 = idx
@@ -510,14 +510,14 @@
     pir .= "\n"
     inc idx
     goto L1
-L2:
+  L2:
 
     .local int number_of_local_variables
     number_of_local_variables = self['NumberOfLocalVariables']
     .local int number_of_variables
     number_of_variables = number_of_arguments + number_of_local_variables
     idx = 0
-L3:
+  L3:
     unless idx < number_of_variables goto L4
     pir .= "  .local pmc local"
     $S0 = idx
@@ -525,10 +525,10 @@
     pir .= "\n"
     inc idx
     goto L3
-L4:
+  L4:
 
     idx = 0
-L5:
+  L5:
     unless idx < number_of_arguments goto L6
     pir .= "  local"
     $S0 = idx
@@ -538,11 +538,11 @@
     pir .= "\n"
     inc idx
     goto L5
-L6:
+  L6:
 
     unless number_of_local_variables goto L7
     pir .= "  new $P0, .WmlsString, ''\n"
-L7:
+  L7:
     unless idx < number_of_variables goto L8
     pir .= "  local"
     $S0 = idx
@@ -550,7 +550,7 @@
     pir .= " = $P0\n"
     inc idx
     goto L7
-L8:
+  L8:
 
     .local string code_array
     code_array = self['CodeArray']

Modified: trunk/languages/WMLScript/src/translation.rules
==============================================================================
--- trunk/languages/WMLScript/src/translation.rules     (original)
+++ trunk/languages/WMLScript/src/translation.rules     Mon Jun  4 00:53:36 2007
@@ -263,7 +263,7 @@
     if $I0 goto L6_${CURIC}
     $S0 = constants.translate(${ARG1})
     ${CONST}[$S1] = $S0
-L6_${CURIC}:
+  L6_${CURIC}:
     $S0 = ${ARG2}   # findex
     $S1 = "const"
     $S1 = concat $S0
@@ -274,7 +274,7 @@
     if $I0 goto L7_${CURIC}
     $S0 = constants.translate(${ARG2})
     ${CONST}[$S1] = $S0
-L7_${CURIC}:
+  L7_${CURIC}:
     ${INS} = concat "  ${PTEMP0} = find_lib_url(${STEMP1}, ${STEMP2})\n"
     ${INS} = concat "  "
     ${INS} = concat ${DEST0}
@@ -299,7 +299,7 @@
     if $I0 goto L6_${CURIC}
     $S0 = constants.translate(${ARG1})
     ${CONST}[$S1] = $S0
-L6_${CURIC}:
+  L6_${CURIC}:
     $S0 = ${ARG2}   # findex
     $S1 = "const"
     $S1 = concat $S0
@@ -310,7 +310,7 @@
     if $I0 goto L7_${CURIC}
     $S0 = constants.translate(${ARG2})
     ${CONST}[$S1] = $S0
-L7_${CURIC}:
+  L7_${CURIC}:
     ${INS} = concat "  ${PTEMP0} = find_lib_url(${STEMP1}, ${STEMP2})\n"
     ${INS} = concat "  "
     ${INS} = concat ${DEST0}
@@ -424,7 +424,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = constants.translate(${INLINE})
     ${CONST}[$S1] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [LOAD_CONST]
@@ -445,7 +445,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = constants.translate(${ARG1})
     ${CONST}[$S1] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [LOAD_CONST_W]
@@ -466,7 +466,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = constants.translate(${ARG1})
     ${CONST}[$S1] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [CONST_0]
@@ -481,7 +481,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_0\n  new const_0, .WmlsInteger\n  set const_0, 
0\n"
     ${CONST}['const_0'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [CONST_1]
@@ -496,7 +496,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_1\n  new const_1, .WmlsInteger\n  set const_1, 
1\n"
     ${CONST}['const_1'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [CONST_M1]
@@ -511,7 +511,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_m1\n  new const_m1, .WmlsInteger\n  set 
const_m1, -1\n"
     ${CONST}['const_m1'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [CONST_ES]
@@ -526,7 +526,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_es\n  new const_es, .WmlsString, ''\n"
     ${CONST}['const_es'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [CONST_INVALID]
@@ -541,7 +541,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_invalid\n  new const_invalid, .WmlsInvalid\n"
     ${CONST}['const_invalid'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [CONST_TRUE]
@@ -556,7 +556,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_true\n  new const_true, .WmlsBoolean\n  set 
const_true, 1\n"
     ${CONST}['const_true'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 [CONST_FALSE]
@@ -571,7 +571,7 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_false\n  new const_false, .WmlsBoolean\n  set 
const_false, 0\n"
     ${CONST}['const_false'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
 PIR
 
 ## Arithmetic Instructions
@@ -837,12 +837,12 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_true\n  new const_true, .WmlsBoolean\n  set 
const_true, 1\n"
     ${CONST}['const_true'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
     $I0 = exists ${CONST}['const_false']
     if $I0 goto L2_${CURIC}
     $S0 = "  .local pmc const_false\n  new const_false, .WmlsBoolean\n  set 
const_false, 0\n"
     ${CONST}['const_false'] = $S0
-L2_${CURIC}:
+  L2_${CURIC}:
 PIR
 
 [SCOR]
@@ -891,12 +891,12 @@
     if $I0 goto L1_${CURIC}
     $S0 = "  .local pmc const_true\n  new const_true, .WmlsBoolean\n  set 
const_true, 1\n"
     ${CONST}['const_true'] = $S0
-L1_${CURIC}:
+  L1_${CURIC}:
     $I0 = exists ${CONST}['const_false']
     if $I0 goto L2_${CURIC}
     $S0 = "  .local pmc const_false\n  new const_false, .WmlsBoolean\n  set 
const_false, 0\n"
     ${CONST}['const_false'] = $S0
-L2_${CURIC}:
+  L2_${CURIC}:
 PIR
 
 [TOBOOL]

Modified: trunk/languages/WMLScript/src/wmlsstdlibs.pir
==============================================================================
--- trunk/languages/WMLScript/src/wmlsstdlibs.pir       (original)
+++ trunk/languages/WMLScript/src/wmlsstdlibs.pir       Mon Jun  4 00:53:36 2007
@@ -71,7 +71,7 @@
     $P1 = $P0[lindex]
     $P2 = $P1[findex]
     .return ($P2)
-_handler:
+  _handler:
     .const .Sub not_implemented = 'not_implemented'
     .return (not_implemented)
 .end
@@ -112,7 +112,7 @@
     entry = global $S0
     if_null entry, _handler_2
     .return (entry)
-_handler_1:
+  _handler_1:
     .local pmc e
     .local string s
     .get_results (e, s)
@@ -124,7 +124,7 @@
     $S0 .= "')"
     ex['_message'] = $S0
     throw ex
-_handler_2:
+  _handler_2:
     new ex, .Exception
     $S0 = "external function '"
     $S0 .= function
@@ -133,7 +133,7 @@
     $S0 .= "'"
     ex['_message'] = $S0
     throw ex
-L1:
+  L1:
     new ex, .Exception
     $S0 = "unable to load compilation unit"
     ex['_message'] = $S0
@@ -154,8 +154,8 @@
     print "' ("
     print $S0
     print ")\n"
-L1:
-_handler:
+  L1:
+  _handler:
     .return (content)
 .end
 
@@ -174,10 +174,10 @@
     print $S0
     print ")\n"
     goto L2
-L1:
+  L1:
     print fh, pbc_out
     close fh
-L2:
+  L2:
     .return (output)
 .end
 
@@ -196,10 +196,10 @@
     print $S0
     print ")\n"
     goto L2
-L1:
+  L1:
     print fh, gen_pir
     close fh
-L2:
+  L2:
 .end
 
 =back

Modified: trunk/languages/WMLScript/wmls2pbc.pir
==============================================================================
--- trunk/languages/WMLScript/wmls2pbc.pir      (original)
+++ trunk/languages/WMLScript/wmls2pbc.pir      Mon Jun  4 00:53:36 2007
@@ -55,15 +55,15 @@
     pbc_out = pir_comp(gen_pir)
     save_pbc(pbc_out, filename)
     end
-_handler:
+  _handler:
     .local pmc e
     .local string s
     .get_results (e, s)
     print s
     print "\n"
-L1:
+  L1:
     end
-USAGE:
+  USAGE:
     printerr "Usage: parrot wmls2pir.pbc filename\n"
     exit -1
 .end

Modified: trunk/languages/WMLScript/wmls2pir.pir
==============================================================================
--- trunk/languages/WMLScript/wmls2pir.pir      (original)
+++ trunk/languages/WMLScript/wmls2pir.pir      Mon Jun  4 00:53:36 2007
@@ -51,15 +51,15 @@
     gen_pir = script.translate()
     save_pir(gen_pir, filename)
     end
-_handler:
+  _handler:
     .local pmc e
     .local string s
     .get_results (e, s)
     print s
     print "\n"
-L1:
+  L1:
     end
-USAGE:
+  USAGE:
     printerr "Usage: parrot wmls2pir.pbc filename\n"
     exit -1
 .end

Modified: trunk/languages/WMLScript/wmlsd.pir
==============================================================================
--- trunk/languages/WMLScript/wmlsd.pir (original)
+++ trunk/languages/WMLScript/wmlsd.pir Mon Jun  4 00:53:36 2007
@@ -48,15 +48,15 @@
     script['filename'] = filename
     script.dump()
     end
-_handler:
+  _handler:
     .local pmc e
     .local string s
     .get_results (e, s)
     print s
     print "\n"
-L1:
+  L1:
     end
-USAGE:
+  USAGE:
     printerr "Usage: parrot wmlsd.pbc filename\n"
     exit -1
 .end

Modified: trunk/languages/WMLScript/wmlsi.pir
==============================================================================
--- trunk/languages/WMLScript/wmlsi.pir (original)
+++ trunk/languages/WMLScript/wmlsi.pir Mon Jun  4 00:53:36 2007
@@ -60,14 +60,14 @@
     load_bytecode $S0
     .local pmc params
     params = new .ResizablePMCArray
-L2:
+  L2:
     unless argv goto L3
     $S0 = shift argv
     new $P0, .WmlsString
     $P0 = $S0
     push params, $P0
     goto L2
-L3:
+  L3:
     .local pmc entry
     $S0 = filename
     $S0 .= ':'
@@ -75,15 +75,15 @@
     entry = global $S0
     entry(params :flat)
     end
-_handler:
+  _handler:
     .local pmc e
     .local string s
     .get_results (e, s)
     print s
     print "\n"
-L1:
+  L1:
     end
-USAGE:
+  USAGE:
     printerr "Usage: parrot wmlsi.pbc filename entry\n"
     exit -1
 .end

Reply via email to