Author: chromatic
Date: Sun Feb 24 15:42:07 2008
New Revision: 26052

Modified:
   trunk/compilers/pct/src/PAST/Compiler.pir
   trunk/compilers/pct/src/PCT/HLLCompiler.pir

Log:
[PCT] Converted a few non-tail calls to tail calls.

Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir   (original)
+++ trunk/compilers/pct/src/PAST/Compiler.pir   Sun Feb 24 15:42:07 2008
@@ -1332,8 +1332,7 @@
     .return self.'vivify'(node, ops, fetchop, storeop)
 
   attribute_decl:
-    ops = $P0.'new'('node'=>node)
-    .return (ops)
+    .return $P0.'new'('node'=>node)
 
   attribute_bind:
     $P0 = get_hll_global ['POST'], 'Op'

Modified: trunk/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/HLLCompiler.pir (original)
+++ trunk/compilers/pct/src/PCT/HLLCompiler.pir Sun Feb 24 15:42:07 2008
@@ -413,8 +413,7 @@
     .param pmc adverbs         :slurpy :named
 
     $P0 = compreg 'POST'
-    $P1 = $P0.'to_pir'(source, adverbs :flat :named)
-    .return ($P1)
+    .return $P0.'to_pir'(source, adverbs :flat :named)
 .end
 
 
@@ -423,8 +422,7 @@
     .param pmc adverbs         :slurpy :named
 
     $P0 = compreg 'PIR'
-    $P1 = $P0(source)
-    .return ($P1)
+    .return $P0(source)
 .end
 
 
@@ -608,7 +606,7 @@
 
     .local string arg0
     arg0 = shift args
-    .local pmc getopts, opts
+    .local pmc getopts
     getopts = new 'Getopt::Obj'
     getopts.'notOptStop'(1)
     $P0 = getattribute self, '@cmdoptions'
@@ -620,9 +618,7 @@
     push getopts, $S0
     goto getopts_loop
   getopts_end:
-    opts = getopts.'get_options'(args)
-
-    .return (opts)
+    .return getopts.'get_options'(args)
 .end
 
 

Reply via email to