Author: coke
Date: Mon Nov 10 21:19:19 2008
New Revision: 32509

Modified:
   trunk/compilers/json/JSON.pir
   trunk/compilers/nqp/nqp.pir
   trunk/compilers/pct/src/PAST/Compiler.pir
   trunk/compilers/pct/src/PAST/Node.pir
   trunk/compilers/pct/src/PCT/HLLCompiler.pir
   trunk/compilers/pct/src/PCT/Node.pir
   trunk/compilers/pct/src/POST/Compiler.pir
   trunk/compilers/pct/src/POST/Node.pir
   trunk/compilers/pge/PGE/Match.pir
   trunk/compilers/pge/PGE/P5Regex.pir
   trunk/compilers/pge/PGE/Perl6Regex.pir
   trunk/compilers/pge/PGE/Regex.pir
   trunk/runtime/parrot/library/CGI/QueryHash.pir
   trunk/runtime/parrot/library/Config/JSON.pir
   trunk/runtime/parrot/library/Crow.pir
   trunk/runtime/parrot/library/JSON.pir
   trunk/runtime/parrot/library/P6object.pir
   trunk/runtime/parrot/library/PGE/Glob.pir
   trunk/runtime/parrot/library/PGE/Perl6Grammar.pir
   trunk/runtime/parrot/library/Parrot/Capture_PIR.pir
   trunk/runtime/parrot/library/Parrot/Coroutine.pir
   trunk/runtime/parrot/library/STM.pir
   trunk/runtime/parrot/library/Tcl/Glob.pir
   trunk/runtime/parrot/library/Test/Builder/TestPlan.pir
   trunk/runtime/parrot/library/uuid.pir

Log:
RT #58974 - .return is deprecated when .tailcall could be used.

This covers all the cases invoked during 'make'



Modified: trunk/compilers/json/JSON.pir
==============================================================================
--- trunk/compilers/json/JSON.pir       (original)
+++ trunk/compilers/json/JSON.pir       Mon Nov 10 21:19:19 2008
@@ -67,7 +67,7 @@
    .local pmc pirc, result
    pirc = compreg "PIR"
    result = pirc(pir)
-   .return result()
+   .tailcall result()
 
   failed:
    P0 = new 'Exception'

Modified: trunk/compilers/nqp/nqp.pir
==============================================================================
--- trunk/compilers/nqp/nqp.pir (original)
+++ trunk/compilers/nqp/nqp.pir Mon Nov 10 21:19:19 2008
@@ -19,7 +19,7 @@
 .sub 'main' :main
     .param pmc args
     $P0 = compreg 'NQP'
-    .return $P0.'command_line'(args, 'encoding'=>'utf8', 'transcode'=>'ascii')
+    .tailcall $P0.'command_line'(args, 'encoding'=>'utf8', 
'transcode'=>'ascii')
 .end
 
 .include 'src/Grammar_gen.pir'

Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir   (original)
+++ trunk/compilers/pct/src/PAST/Compiler.pir   Mon Nov 10 21:19:19 2008
@@ -125,7 +125,7 @@
   have_blockpast:
     null $P0
     set_global '$?SUB', $P0                                # see RT#49758
-    .return self.'as_post'(past, 'rtype'=>'v')
+    .tailcall self.'as_post'(past, 'rtype'=>'v')
 .end
 
 =item escape(str)
@@ -181,7 +181,7 @@
     reg = substr 'SSSNNNII', $I0, 1
   reg_psin:
     reg = concat '$', reg
-    .return self.'unique'(reg)
+    .tailcall self.'unique'(reg)
   reg_void:
     .return ('')
   err_nortype:
@@ -452,7 +452,7 @@
     .local string result
     $P0 = get_hll_global ['POST'], 'Ops'
     result = self.'uniquereg'('P')
-    .return $P0.'new'('result'=>result)
+    .tailcall $P0.'new'('result'=>result)
 .end
 
 =item as_post(String class)
@@ -471,7 +471,7 @@
     $P0 = get_hll_global ['POST'], 'Op'
     result = self.'uniquereg'('P')
     $S0 = self.'escape'(node)
-    .return $P0.'new'(result, $S0, 'pirop'=>'new', 'result'=>result)
+    .tailcall $P0.'new'(result, $S0, 'pirop'=>'new', 'result'=>result)
 .end
 
 =item as_post(PAST::Node node)
@@ -746,22 +746,22 @@
     pasttype = node.'pasttype'()
     unless pasttype goto post_pirop
     $P0 = find_method self, pasttype
-    .return self.$P0(node, options :flat :named)
+    .tailcall self.$P0(node, options :flat :named)
 
   post_pirop:
     .local pmc pirop
     pirop = node.'pirop'()
     unless pirop goto post_inline
-    .return self.'pirop'(node, options :flat :named)
+    .tailcall self.'pirop'(node, options :flat :named)
 
   post_inline:
     .local pmc inline
     inline = node.'inline'()
     unless inline goto post_call
-    .return self.'inline'(node, options :flat :named)
+    .tailcall self.'inline'(node, options :flat :named)
 
   post_call:
-    .return self.'call'(node, options :flat :named)
+    .tailcall self.'call'(node, options :flat :named)
 .end
 
 
@@ -877,7 +877,7 @@
 .sub 'callmethod' :method :multi(_, ['PAST';'Op'])
     .param pmc node
     .param pmc options         :slurpy :named
-    .return self.'call'(node, options :flat :named)
+    .tailcall self.'call'(node, options :flat :named)
 .end
 
 
@@ -993,7 +993,7 @@
 .sub 'unless' :method :multi(_, ['PAST';'Op'])
     .param pmc node
     .param pmc options         :slurpy :named
-    .return self.'if'(node, options :flat :named)
+    .tailcall self.'if'(node, options :flat :named)
 .end
 
 
@@ -1067,7 +1067,7 @@
 .sub 'until' :method :multi(_, ['PAST';'Op'])
     .param pmc node
     .param pmc options         :slurpy :named
-    .return self.'while'(node, options :flat :named)
+    .tailcall self.'while'(node, options :flat :named)
 .end
 
 =item repeat_while(PAST::Op node)
@@ -1127,7 +1127,7 @@
 .sub 'repeat_until' :method :multi(_, ['PAST';'Op'])
     .param pmc node
     .param pmc options         :slurpy :named
-    .return self.'repeat_while'(node, options :flat :named)
+    .tailcall self.'repeat_while'(node, options :flat :named)
 .end
 
 
@@ -1664,7 +1664,7 @@
   have_scope:
     push_eh scope_error_ex
     $P0 = find_method self, scope
-    .return self.$P0(node, bindpost)
+    .tailcall self.$P0(node, bindpost)
   scope_error_ex:
     pop_eh
   scope_error:
@@ -1672,7 +1672,7 @@
     scope = concat " '", scope
     scope = concat scope, "'"
   scope_error_1:
-    .return self.'panic'("Scope", scope, " not found for PAST::Var '", name, 
"'")
+    .tailcall self.'panic'("Scope", scope, " not found for PAST::Var '", name, 
"'")
 .end
 
 
@@ -1768,18 +1768,18 @@
     if bindpost goto package_bind
     fetchop = $P0.'new'(ops, name, 'pirop'=>'get_global')
     storeop = $P0.'new'(name, ops, 'pirop'=>'set_global')
-    .return self.'vivify'(node, ops, fetchop, storeop)
+    .tailcall self.'vivify'(node, ops, fetchop, storeop)
   package_bind:
-    .return $P0.'new'(name, bindpost, 'pirop'=>'set_global', 
'result'=>bindpost)
+    .tailcall $P0.'new'(name, bindpost, 'pirop'=>'set_global', 
'result'=>bindpost)
 
   package_hll:
     if ns goto package_ns
     if bindpost goto package_hll_bind
     fetchop = $P0.'new'(ops, name, 'pirop'=>'get_hll_global')
     storeop = $P0.'new'(name, ops, 'pirop'=>'set_hll_global')
-    .return self.'vivify'(node, ops, fetchop, storeop)
+    .tailcall self.'vivify'(node, ops, fetchop, storeop)
   package_hll_bind:
-    .return $P0.'new'(name, bindpost, 'pirop'=>'set_hll_global', 
'result'=>bindpost)
+    .tailcall $P0.'new'(name, bindpost, 'pirop'=>'set_hll_global', 
'result'=>bindpost)
 
   package_ns:
     $P1 = new 'CodeString'
@@ -1787,9 +1787,9 @@
     if bindpost goto package_ns_bind
     fetchop = $P0.'new'(ops, ns, name, 'pirop'=>'get_hll_global')
     storeop = $P0.'new'(ns, name, ops, 'pirop'=>'set_hll_global')
-    .return self.'vivify'(node, ops, fetchop, storeop)
+    .tailcall self.'vivify'(node, ops, fetchop, storeop)
   package_ns_bind:
-    .return $P0.'new'(ns, name, bindpost, 'pirop'=>'set_hll_global', 
'result'=>bindpost)
+    .tailcall $P0.'new'(ns, name, bindpost, 'pirop'=>'set_hll_global', 
'result'=>bindpost)
 .end
 
 
@@ -1814,7 +1814,7 @@
     $P0 = get_hll_global ['POST'], 'Op'
     fetchop = $P0.'new'(ops, name, 'pirop'=>'find_lex')
     storeop = $P0.'new'(name, ops, 'pirop'=>'store_lex')
-    .return self.'vivify'(node, ops, fetchop, storeop)
+    .tailcall self.'vivify'(node, ops, fetchop, storeop)
 
   lexical_decl:
     ops = $P0.'new'('node'=>node)
@@ -1829,9 +1829,9 @@
   lexical_bind:
     $P0 = get_hll_global ['POST'], 'Op'
     if isdecl goto lexical_bind_decl
-    .return $P0.'new'(name, bindpost, 'pirop'=>'store_lex', 'result'=>bindpost)
+    .tailcall $P0.'new'(name, bindpost, 'pirop'=>'store_lex', 
'result'=>bindpost)
   lexical_bind_decl:
-    .return $P0.'new'(name, bindpost, 'pirop'=>'.lex', 'result'=>bindpost)
+    .tailcall $P0.'new'(name, bindpost, 'pirop'=>'.lex', 'result'=>bindpost)
 .end
 
 
@@ -1888,7 +1888,7 @@
     if bindpost goto keyed_bind
     fetchop = $P0.'new'(ops, name, 'pirop'=>'set')
     storeop = $P0.'new'(name, ops, 'pirop'=>'set')
-    .return self.'vivify'(node, ops, fetchop, storeop)
+    .tailcall self.'vivify'(node, ops, fetchop, storeop)
   keyed_bind:
     ops.'result'(bindpost)
     ops.'push_pirop'('set', name, ops)
@@ -1899,7 +1899,7 @@
 .sub 'keyed_int' :method :multi(_, ['PAST';'Var'])
     .param pmc node
     .param pmc bindpost
-    .return self.'keyed'(node, bindpost, 'i')
+    .tailcall self.'keyed'(node, bindpost, 'i')
 .end
 
 
@@ -1935,17 +1935,17 @@
     $P0 = get_hll_global ['POST'], 'Op'
     fetchop = $P0.'new'(ops, call_on, name, 'pirop'=>'getattribute')
     storeop = $P0.'new'(call_on, name, ops, 'pirop'=>'setattribute')
-    .return self.'vivify'(node, ops, fetchop, storeop)
+    .tailcall self.'vivify'(node, ops, fetchop, storeop)
 
   attribute_decl:
-    .return $P0.'new'('node'=>node)
+    .tailcall $P0.'new'('node'=>node)
 
   attribute_bind:
     $P0 = get_hll_global ['POST'], 'Op'
     if isdecl goto attribute_bind_decl
-    .return $P0.'new'(call_on, name, bindpost, 'pirop'=>'setattribute', 
'result'=>bindpost)
+    .tailcall $P0.'new'(call_on, name, bindpost, 'pirop'=>'setattribute', 
'result'=>bindpost)
   attribute_bind_decl:
-    .return $P0.'new'(call_on, name, bindpost, 'pirop'=>'setattribute', 
'result'=>bindpost)
+    .tailcall $P0.'new'(call_on, name, bindpost, 'pirop'=>'setattribute', 
'result'=>bindpost)
 .end
 
 

Modified: trunk/compilers/pct/src/PAST/Node.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Node.pir       (original)
+++ trunk/compilers/pct/src/PAST/Node.pir       Mon Nov 10 21:19:19 2008
@@ -57,7 +57,7 @@
 .sub 'returns' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('returns', value, has_value)
+    .tailcall self.'attr'('returns', value, has_value)
 .end
 
 
@@ -71,7 +71,7 @@
 .sub 'arity' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('arity', value, has_value)
+    .tailcall self.'attr'('arity', value, has_value)
 .end
 
 
@@ -85,7 +85,7 @@
 .sub 'named' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('named', value, has_value)
+    .tailcall self.'attr'('named', value, has_value)
 .end
 
 
@@ -98,7 +98,7 @@
 .sub 'flat' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('flat', value, has_value)
+    .tailcall self.'attr'('flat', value, has_value)
 .end
 
 
@@ -123,7 +123,7 @@
 .sub 'value' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('value', value, has_value)
+    .tailcall self.'attr'('value', value, has_value)
 .end
 
 =back
@@ -151,7 +151,7 @@
 .sub 'scope' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('scope', value, has_value)
+    .tailcall self.'attr'('scope', value, has_value)
 .end
 
 
@@ -167,7 +167,7 @@
 .sub 'isdecl' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('isdecl', value, has_value)
+    .tailcall self.'attr'('isdecl', value, has_value)
 .end
 
 
@@ -181,7 +181,7 @@
 .sub 'lvalue' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('lvalue', value, has_value)
+    .tailcall self.'attr'('lvalue', value, has_value)
 .end
 
 
@@ -196,7 +196,7 @@
 .sub 'namespace' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('namespace', value, has_value)
+    .tailcall self.'attr'('namespace', value, has_value)
 .end
 
 
@@ -212,7 +212,7 @@
 .sub 'slurpy' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('slurpy', value, has_value)
+    .tailcall self.'attr'('slurpy', value, has_value)
 .end
 
 
@@ -227,7 +227,7 @@
 .sub 'viviself' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('viviself', value, has_value)
+    .tailcall self.'attr'('viviself', value, has_value)
 .end
 
 
@@ -242,7 +242,7 @@
 .sub 'vivibase' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('vivibase', value, has_value)
+    .tailcall self.'attr'('vivibase', value, has_value)
 .end
 
 
@@ -325,7 +325,7 @@
 .sub 'pasttype' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('pasttype', value, has_value)
+    .tailcall self.'attr'('pasttype', value, has_value)
 .end
 
 
@@ -344,7 +344,7 @@
 .sub 'pirop' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('pirop', value, has_value)
+    .tailcall self.'attr'('pirop', value, has_value)
 .end
 
 
@@ -358,7 +358,7 @@
 .sub 'lvalue' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('lvalue', value, has_value)
+    .tailcall self.'attr'('lvalue', value, has_value)
 .end
 
 =item inline([STRING code])
@@ -388,7 +388,7 @@
 .sub 'inline' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('inline', value, has_value)
+    .tailcall self.'attr'('inline', value, has_value)
 .end
 
 
@@ -453,7 +453,7 @@
 .sub 'blocktype' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('blocktype', value, has_value)
+    .tailcall self.'attr'('blocktype', value, has_value)
 .end
 
 
@@ -468,7 +468,7 @@
 .sub 'control' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('control', value, has_value)
+    .tailcall self.'attr'('control', value, has_value)
 .end
 
 
@@ -497,7 +497,7 @@
     value = $P0.'new'()
     has_value = 1
   getset_value:
-    .return self.'attr'('loadinit', value, has_value)
+    .tailcall self.'attr'('loadinit', value, has_value)
 .end
 
 
@@ -511,7 +511,7 @@
 .sub 'namespace' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('namespace', value, has_value)
+    .tailcall self.'attr'('namespace', value, has_value)
 .end
 
 
@@ -563,7 +563,7 @@
 
 .sub 'symbol_defaults' :method
     .param pmc attr            :slurpy :named
-    .return self.'symbol'('', attr :flat :named)
+    .tailcall self.'symbol'('', attr :flat :named)
 .end
 
 
@@ -577,7 +577,7 @@
 .sub 'symtable' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('symtable', value, has_value)
+    .tailcall self.'attr'('symtable', value, has_value)
 .end
 
 
@@ -593,7 +593,7 @@
 .sub 'lexical' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('lexical', value, has_value, 1)
+    .tailcall self.'attr'('lexical', value, has_value, 1)
 .end
 
 
@@ -608,7 +608,7 @@
 .sub 'compiler' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('compiler', value, has_value)
+    .tailcall self.'attr'('compiler', value, has_value)
 .end
 
 =item compiler_args()
@@ -623,7 +623,7 @@
     .param pmc value           :named :slurpy
     .local int have_value
     have_value = elements value
-    .return self.'attr'('compiler_args', value, have_value)
+    .tailcall self.'attr'('compiler_args', value, have_value)
 .end
 
 =item pirflags([pirflags])
@@ -635,7 +635,7 @@
 .sub 'pirflags' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('pirflags', value, has_value)
+    .tailcall self.'attr'('pirflags', value, has_value)
 .end
 
 
@@ -644,7 +644,7 @@
 .sub 'bindvalue' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('bindvalue', value, has_value)
+    .tailcall self.'attr'('bindvalue', value, has_value)
 .end
 
 

Modified: trunk/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/HLLCompiler.pir (original)
+++ trunk/compilers/pct/src/PCT/HLLCompiler.pir Mon Nov 10 21:19:19 2008
@@ -150,37 +150,37 @@
 .sub 'stages' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('@stages', value, has_value)
+    .tailcall self.'attr'('@stages', value, has_value)
 .end
 
 .sub 'parsegrammar' :method
     .param string value        :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('$parsegrammar', value, has_value)
+    .tailcall self.'attr'('$parsegrammar', value, has_value)
 .end
 
 .sub 'parseactions' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('$parseactions', value, has_value)
+    .tailcall self.'attr'('$parseactions', value, has_value)
 .end
 
 .sub 'astgrammar' :method
     .param string value        :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('$astgrammar', value, has_value)
+    .tailcall self.'attr'('$astgrammar', value, has_value)
 .end
 
 .sub 'commandline_banner' :method
     .param string value        :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('$commandline_banner', value, has_value)
+    .tailcall self.'attr'('$commandline_banner', value, has_value)
 .end
 
 .sub 'commandline_prompt' :method
     .param string value        :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('$commandline_prompt', value, has_value)
+    .tailcall self.'attr'('$commandline_prompt', value, has_value)
 .end
 
 =item removestage(string stagename)
@@ -419,7 +419,7 @@
     unless astgrammar_namelist goto err_past
     astgrammar = new astgrammar_namelist
     astbuilder = astgrammar.'apply'(source)
-    .return astbuilder.'get'('past')
+    .tailcall astbuilder.'get'('past')
 
   compile_match:
     push_eh err_past
@@ -433,7 +433,7 @@
   err_past:
     pop_eh
     $S0 = typeof source
-    .return self.'panic'('Unable to obtain PAST from ', $S0)
+    .tailcall self.'panic'('Unable to obtain PAST from ', $S0)
 .end
 
 
@@ -447,7 +447,7 @@
     .param pmc source
     .param pmc adverbs         :slurpy :named
     $P0 = compreg 'PAST'
-    .return $P0.'to_post'(source, adverbs :flat :named)
+    .tailcall $P0.'to_post'(source, adverbs :flat :named)
 .end
 
 
@@ -456,7 +456,7 @@
     .param pmc adverbs         :slurpy :named
 
     $P0 = compreg 'POST'
-    .return $P0.'to_pir'(source, adverbs :flat :named)
+    .tailcall $P0.'to_pir'(source, adverbs :flat :named)
 .end
 
 
@@ -636,7 +636,7 @@
     .return ($P0)
 
   err_infile:
-    .return self.'panic'('Error: file cannot be read: ', iname)
+    .tailcall self.'panic'('Error: file cannot be read: ', iname)
 .end
 
 
@@ -665,7 +665,7 @@
     push getopts, $S0
     goto getopts_loop
   getopts_end:
-    .return getopts.'get_options'(args)
+    .tailcall getopts.'get_options'(args)
 .end
 
 
@@ -750,7 +750,7 @@
     .return ()
 
   err_output:
-    .return self.'panic'('Error: file cannot be written: ', output)
+    .tailcall self.'panic'('Error: file cannot be written: ', output)
   usage:
     self.'usage'(arg0)
     goto end

Modified: trunk/compilers/pct/src/PCT/Node.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/Node.pir        (original)
+++ trunk/compilers/pct/src/PCT/Node.pir        Mon Nov 10 21:19:19 2008
@@ -249,7 +249,7 @@
 .sub 'name' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('name', value, has_value)
+    .tailcall self.'attr'('name', value, has_value)
 .end
 
 

Modified: trunk/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/POST/Compiler.pir   (original)
+++ trunk/compilers/pct/src/POST/Compiler.pir   Mon Nov 10 21:19:19 2008
@@ -94,7 +94,7 @@
 
 .sub 'pir' :method :multi(_,_)
     .param pmc node
-    .return self.'pir_children'(node)
+    .tailcall self.'pir_children'(node)
 .end
 
 
@@ -306,9 +306,9 @@
     compiler = compreg $S0
     $I0 = isa compiler, 'Sub'
     if $I0 goto compiler_sub
-    .return compiler.'compile'(source, options :flat :named)
+    .tailcall compiler.'compile'(source, options :flat :named)
   compiler_sub:
-    .return compiler(source, options :flat :named)
+    .tailcall compiler(source, options :flat :named)
 .end
 
 =back

Modified: trunk/compilers/pct/src/POST/Node.pir
==============================================================================
--- trunk/compilers/pct/src/POST/Node.pir       (original)
+++ trunk/compilers/pct/src/POST/Node.pir       Mon Nov 10 21:19:19 2008
@@ -70,7 +70,7 @@
     if $I0 goto result_node
     .return (value)
   result_node:
-    .return value.'result'()
+    .tailcall value.'result'()
   result_null:
     .return ('')
   set_value:
@@ -143,13 +143,13 @@
 .sub 'pirop' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('pirop', value, has_value)
+    .tailcall self.'attr'('pirop', value, has_value)
 .end
 
 .sub 'inline' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('inline', value, has_value)
+    .tailcall self.'attr'('inline', value, has_value)
 .end
 
 
@@ -176,49 +176,49 @@
 .sub 'blocktype' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('blocktype', value, has_value)
+    .tailcall self.'attr'('blocktype', value, has_value)
 .end
 
 
 .sub 'namespace' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('namespace', value, has_value)
+    .tailcall self.'attr'('namespace', value, has_value)
 .end
 
 
 .sub 'outer' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('outer', value, has_value)
+    .tailcall self.'attr'('outer', value, has_value)
 .end
 
 
 .sub 'lexid' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('lexid', value, has_value)
+    .tailcall self.'attr'('lexid', value, has_value)
 .end
 
 
 .sub 'pirflags' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('pirflags', value, has_value)
+    .tailcall self.'attr'('pirflags', value, has_value)
 .end
 
 
 .sub 'compiler' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('compiler', value, has_value)
+    .tailcall self.'attr'('compiler', value, has_value)
 .end
 
 
 .sub 'compiler_args' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
-    .return self.'attr'('compiler_args', value, has_value)
+    .tailcall self.'attr'('compiler_args', value, has_value)
 .end
 
 

Modified: trunk/compilers/pge/PGE/Match.pir
==============================================================================
--- trunk/compilers/pge/PGE/Match.pir   (original)
+++ trunk/compilers/pge/PGE/Match.pir   Mon Nov 10 21:19:19 2008
@@ -242,13 +242,13 @@
 =cut
 
 .sub 'item' :method
-    .return self.'result_object'()
+    .tailcall self.'result_object'()
 .end
 
 
 # deprecated RT#54000
 .sub 'get_scalar' :method
-    .return self.'item'()
+    .tailcall self.'item'()
 .end
 
 
@@ -270,7 +270,7 @@
     if null obj goto ret_null
     .return (obj)
   ret_null:
-    .return self.'text'()
+    .tailcall self.'text'()
 .end
 
 

Modified: trunk/compilers/pge/PGE/P5Regex.pir
==============================================================================
--- trunk/compilers/pge/PGE/P5Regex.pir (original)
+++ trunk/compilers/pge/PGE/P5Regex.pir Mon Nov 10 21:19:19 2008
@@ -36,7 +36,7 @@
     pad = new 'Hash'
     pad['subpats'] = 0
     exp = exp.'p5analyze'(pad)
-    .return exp.'compile'(adverbs :flat :named)
+    .tailcall exp.'compile'(adverbs :flat :named)
 .end
 
 

Modified: trunk/compilers/pge/PGE/Perl6Regex.pir
==============================================================================
--- trunk/compilers/pge/PGE/Perl6Regex.pir      (original)
+++ trunk/compilers/pge/PGE/Perl6Regex.pir      Mon Nov 10 21:19:19 2008
@@ -111,7 +111,7 @@
     pad['lexscope'] = $P0
     exp = exp.'perl6exp'(pad)
     if null exp goto err_null
-    .return exp.'compile'(adverbs :flat :named)
+    .tailcall exp.'compile'(adverbs :flat :named)
 
   err_null:
     $I0 = match.'from'()
@@ -332,7 +332,7 @@
     .return (mob)
 
   term_ws:
-    .return 'parse_term_ws'(mob)
+    .tailcall 'parse_term_ws'(mob)
 
   end_noterm:
     (mob) = mob.'new'(mob, 'grammar'=>'PGE::Exp::Literal')
@@ -1395,14 +1395,14 @@
     ##   reduce and return it.
     $I0 = defined self[1]
     if $I0 goto with_rhs
-    .return exp0.'perl6exp'(pad)
+    .tailcall exp0.'perl6exp'(pad)
   with_rhs:
 
     ##   if lhs is whitespace, then this is a prefix-alt and
     ##   we ignore it (by simply returning its rhs)
     $I0 = isa exp0, ['PGE';'Exp';'WS']
     if $I0 == 0 goto with_lhs
-    .return exp1.'perl6exp'(pad)
+    .tailcall exp1.'perl6exp'(pad)
   with_lhs:
 
     .local pmc lexscope, savescope, iter

Modified: trunk/compilers/pge/PGE/Regex.pir
==============================================================================
--- trunk/compilers/pge/PGE/Regex.pir   (original)
+++ trunk/compilers/pge/PGE/Regex.pir   Mon Nov 10 21:19:19 2008
@@ -79,7 +79,7 @@
 
 .sub "fail" :method
     $P0 = get_hll_global ['PGE'], 'Match'
-    .return $P0.'new'(self)
+    .tailcall $P0.'new'(self)
 .end
 
 
@@ -90,7 +90,7 @@
 =cut
 
 .sub 'upper' :method
-    .return '!cclass'(self, .CCLASS_UPPERCASE)
+    .tailcall '!cclass'(self, .CCLASS_UPPERCASE)
 .end
 
 
@@ -101,7 +101,7 @@
 =cut
 
 .sub "lower" :method
-    .return '!cclass'(self, .CCLASS_LOWERCASE)
+    .tailcall '!cclass'(self, .CCLASS_LOWERCASE)
 .end
 
 
@@ -112,7 +112,7 @@
 =cut
 
 .sub "alpha" :method
-    .return '!cclass'(self, .CCLASS_ALPHABETIC)
+    .tailcall '!cclass'(self, .CCLASS_ALPHABETIC)
 .end
 
 =item C<digit()>
@@ -122,7 +122,7 @@
 =cut
 
 .sub "digit" :method
-    .return '!cclass'(self, .CCLASS_NUMERIC)
+    .tailcall '!cclass'(self, .CCLASS_NUMERIC)
 .end
 
 =item C<xdigit()>
@@ -132,7 +132,7 @@
 =cut
 
 .sub "xdigit" :method
-    .return '!cclass'(self, .CCLASS_HEXADECIMAL)
+    .tailcall '!cclass'(self, .CCLASS_HEXADECIMAL)
 .end
 
 =item C<space()>
@@ -142,7 +142,7 @@
 =cut
 
 .sub "space" :method
-    .return '!cclass'(self, .CCLASS_WHITESPACE)
+    .tailcall '!cclass'(self, .CCLASS_WHITESPACE)
 .end
 
 =item C<print()>
@@ -152,7 +152,7 @@
 =cut
 
 .sub "print" :method
-    .return '!cclass'(self, .CCLASS_PRINTING)
+    .tailcall '!cclass'(self, .CCLASS_PRINTING)
 .end
 
 =item C<graph()>
@@ -162,7 +162,7 @@
 =cut
 
 .sub "graph" :method
-    .return '!cclass'(self, .CCLASS_GRAPHICAL)
+    .tailcall '!cclass'(self, .CCLASS_GRAPHICAL)
 .end
 
 =item C<blank()>
@@ -172,7 +172,7 @@
 =cut
 
 .sub "blank" :method
-    .return '!cclass'(self, .CCLASS_BLANK)
+    .tailcall '!cclass'(self, .CCLASS_BLANK)
 .end
 
 =item C<cntrl()>
@@ -182,7 +182,7 @@
 =cut
 
 .sub "cntrl" :method
-    .return '!cclass'(self, .CCLASS_CONTROL)
+    .tailcall '!cclass'(self, .CCLASS_CONTROL)
 .end
 
 =item C<punct()>
@@ -192,7 +192,7 @@
 =cut
 
 .sub "punct" :method
-    .return '!cclass'(self, .CCLASS_PUNCTUATION)
+    .tailcall '!cclass'(self, .CCLASS_PUNCTUATION)
 .end
 
 =item C<alnum()>
@@ -202,7 +202,7 @@
 =cut
 
 .sub "alnum" :method
-    .return '!cclass'(self, .CCLASS_ALPHANUMERIC)
+    .tailcall '!cclass'(self, .CCLASS_ALPHANUMERIC)
 .end
 
 =item C<sp()>
@@ -212,7 +212,7 @@
 =cut
 
 .sub "sp" :method
-    .return '!literal'(self, ' ')
+    .tailcall '!literal'(self, ' ')
 .end
 
 =item C<lt()>
@@ -222,7 +222,7 @@
 =cut
 
 .sub "lt" :method
-    .return '!literal'(self, '<')
+    .tailcall '!literal'(self, '<')
 .end
 
 =item C<gt()>
@@ -232,7 +232,7 @@
 =cut
 
 .sub "gt" :method
-    .return '!literal'(self, '>')
+    .tailcall '!literal'(self, '>')
 .end
 
 =item C<dot()>
@@ -242,7 +242,7 @@
 =cut
 
 .sub "dot" :method
-    .return '!literal'(self, '.')
+    .tailcall '!literal'(self, '.')
 .end
 
 =item C<ws()>

Modified: trunk/runtime/parrot/library/CGI/QueryHash.pir
==============================================================================
--- trunk/runtime/parrot/library/CGI/QueryHash.pir      (original)
+++ trunk/runtime/parrot/library/CGI/QueryHash.pir      Mon Nov 10 21:19:19 2008
@@ -203,7 +203,7 @@
 .sub hex_to_int
     .param pmc hex
 
-    .return hex.'to_int'(16)
+    .tailcall hex.'to_int'(16)
 .end
 
 =back

Modified: trunk/runtime/parrot/library/Config/JSON.pir
==============================================================================
--- trunk/runtime/parrot/library/Config/JSON.pir        (original)
+++ trunk/runtime/parrot/library/Config/JSON.pir        Mon Nov 10 21:19:19 2008
@@ -38,7 +38,7 @@
     .local pmc JSON, config
     JSON = compreg "JSON"
 
-    .return JSON(text)
+    .tailcall JSON(text)
 .end
 
 =head2 WriteConfig(config, filename, ?:compact)

Modified: trunk/runtime/parrot/library/Crow.pir
==============================================================================
--- trunk/runtime/parrot/library/Crow.pir       (original)
+++ trunk/runtime/parrot/library/Crow.pir       Mon Nov 10 21:19:19 2008
@@ -23,7 +23,7 @@
     .return (opts)
 
   help:
-    .return 'help'(prog)
+    .tailcall 'help'(prog)
 .end
 
 

Modified: trunk/runtime/parrot/library/JSON.pir
==============================================================================
--- trunk/runtime/parrot/library/JSON.pir       (original)
+++ trunk/runtime/parrot/library/JSON.pir       Mon Nov 10 21:19:19 2008
@@ -89,19 +89,19 @@
     # Default to a null. We could in the future make this more
     # clever, or conditional.
 json_null:
-    .return _json_null(thing,pretty,indent)
+    .tailcall _json_null(thing,pretty,indent)
 json_string:
-    .return _json_string(thing,pretty,indent)
+    .tailcall _json_string(thing,pretty,indent)
 json_array:
-    .return _json_array(thing,pretty,indent)
+    .tailcall _json_array(thing,pretty,indent)
 json_hash:
-    .return _json_hash(thing,pretty,indent)
+    .tailcall _json_hash(thing,pretty,indent)
 json_boolean:
-    .return _json_boolean(thing,pretty,indent)
+    .tailcall _json_boolean(thing,pretty,indent)
 json_integer:
-    .return _json_number(thing,pretty,indent)
+    .tailcall _json_number(thing,pretty,indent)
 json_float:
-    .return _json_number(thing,pretty,indent)
+    .tailcall _json_number(thing,pretty,indent)
 
 .end
 

Modified: trunk/runtime/parrot/library/P6object.pir
==============================================================================
--- trunk/runtime/parrot/library/P6object.pir   (original)
+++ trunk/runtime/parrot/library/P6object.pir   Mon Nov 10 21:19:19 2008
@@ -109,7 +109,7 @@
 .sub 'WHAT' :method
     .local pmc how, what
     how = self.'HOW'()
-    .return how.'WHAT'()
+    .tailcall how.'WHAT'()
 .end
 
 
@@ -481,7 +481,7 @@
     goto iter_loop
   iter_end:
   attr_done:
-    .return self.'register'(parrotclass, options :named :flat)
+    .tailcall self.'register'(parrotclass, options :named :flat)
 .end
 
 

Modified: trunk/runtime/parrot/library/PGE/Glob.pir
==============================================================================
--- trunk/runtime/parrot/library/PGE/Glob.pir   (original)
+++ trunk/runtime/parrot/library/PGE/Glob.pir   Mon Nov 10 21:19:19 2008
@@ -66,7 +66,7 @@
     $P0.'result_object'('$')
     exp[$I0] = $P0
 
-    .return exp.'compile'(adverbs :flat :named)
+    .tailcall exp.'compile'(adverbs :flat :named)
 .end
 
 
@@ -77,7 +77,7 @@
     load_bytecode 'PGE/Dumper.pbc'
 
     $P0 = compreg 'PGE::Glob'
-    .return $P0.'command_line'(args)
+    .tailcall $P0.'command_line'(args)
 .end
 
 
@@ -371,7 +371,7 @@
     #   $!compsub is deprecated
     compsub = getattribute self, '$!compsub'
 
-    .return compsub(source, adverbs :flat :named)
+    .tailcall compsub(source, adverbs :flat :named)
 .end
 
 =back

Modified: trunk/runtime/parrot/library/PGE/Perl6Grammar.pir
==============================================================================
--- trunk/runtime/parrot/library/PGE/Perl6Grammar.pir   (original)
+++ trunk/runtime/parrot/library/PGE/Perl6Grammar.pir   Mon Nov 10 21:19:19 2008
@@ -221,7 +221,7 @@
 
   compile_pir:
     $P0 = compreg 'PIR'
-    .return $P0(out)
+    .tailcall $P0(out)
 .end
 
 
@@ -304,7 +304,7 @@
         .param pmc mob
         .param pmc adverbs :named :slurpy
         $P0 = get_hll_global %0, "$optable"
-        .return $P0.'parse'(mob, 'rulename'=>"%1", adverbs :named :flat)
+        .tailcall $P0.'parse'(mob, 'rulename'=>"%1", adverbs :named :flat)
       .end
       END
   with_rulepir:
@@ -322,14 +322,14 @@
     .param pmc stmt
     .param pmc namespace
     .param pmc nstable
-    .return 'regex_stmt'(stmt, namespace, nstable)
+    .tailcall 'regex_stmt'(stmt, namespace, nstable)
 .end
 
 .sub 'rule_stmt'
     .param pmc stmt
     .param pmc namespace
     .param pmc nstable
-    .return 'regex_stmt'(stmt, namespace, nstable)
+    .tailcall 'regex_stmt'(stmt, namespace, nstable)
 .end
 
 

Modified: trunk/runtime/parrot/library/Parrot/Capture_PIR.pir
==============================================================================
--- trunk/runtime/parrot/library/Parrot/Capture_PIR.pir (original)
+++ trunk/runtime/parrot/library/Parrot/Capture_PIR.pir Mon Nov 10 21:19:19 2008
@@ -41,12 +41,12 @@
 
 # deprecated RT#54000
 .sub 'get_array' :method
-    .return self.'list'()
+    .tailcall self.'list'()
 .end
 
 # deprecated RT#54000
 .sub 'get_hash' :method
-    .return self.'hash'()
+    .tailcall self.'hash'()
 .end
 
 

Modified: trunk/runtime/parrot/library/Parrot/Coroutine.pir
==============================================================================
--- trunk/runtime/parrot/library/Parrot/Coroutine.pir   (original)
+++ trunk/runtime/parrot/library/Parrot/Coroutine.pir   Mon Nov 10 21:19:19 2008
@@ -176,7 +176,7 @@
     ## changed magically behind our backs by a subsequent yield/resume, so
     ## we can't just return directly.
     cc = getattribute self, 'yield_cont'
-    .return cc(result :flat)
+    .tailcall cc(result :flat)
 
 dead:
     ## Complain about attempted zombie creation.
@@ -207,7 +207,7 @@
 
     ## Return to the coro caller.
     cc = getattribute self, 'yield_cont'
-    .return cc(args :flat)
+    .tailcall cc(args :flat)
 .end
 
 =head1 BUGS

Modified: trunk/runtime/parrot/library/STM.pir
==============================================================================
--- trunk/runtime/parrot/library/STM.pir        (original)
+++ trunk/runtime/parrot/library/STM.pir        Mon Nov 10 21:19:19 2008
@@ -126,7 +126,7 @@
     the_cont = interpinfo .INTERPINFO_CURRENT_CONT
     ends = global 'ends'
     push ends, the_cont
-    .return closure(args :flat)
+    .tailcall closure(args :flat)
 .end
 
 .sub _end_tx

Modified: trunk/runtime/parrot/library/Tcl/Glob.pir
==============================================================================
--- trunk/runtime/parrot/library/Tcl/Glob.pir   (original)
+++ trunk/runtime/parrot/library/Tcl/Glob.pir   Mon Nov 10 21:19:19 2008
@@ -66,7 +66,7 @@
     $P0.'result_object'('$')
     exp[$I0] = $P0
 
-    .return exp.'compile'(adverbs :flat :named)
+    .tailcall exp.'compile'(adverbs :flat :named)
 .end
 
 
@@ -76,7 +76,7 @@
     load_bytecode 'PGE.pbc'
 
     $P0 = compreg 'Tcl::Glob'
-    .return $P0.'command_line'(args)
+    .tailcall $P0.'command_line'(args)
 .end
 
 
@@ -363,7 +363,7 @@
     #   $!compsub is deprecated
     compsub = getattribute self, '$!compsub'
 
-    .return compsub(source, adverbs :flat :named)
+    .tailcall compsub(source, adverbs :flat :named)
 .end
 
 =back

Modified: trunk/runtime/parrot/library/Test/Builder/TestPlan.pir
==============================================================================
--- trunk/runtime/parrot/library/Test/Builder/TestPlan.pir      (original)
+++ trunk/runtime/parrot/library/Test/Builder/TestPlan.pir      Mon Nov 10 
21:19:19 2008
@@ -71,7 +71,7 @@
 .sub 'header' :method
     .local pmc plan
     plan = getattribute self, 'plan'
-    .return plan.'header'()
+    .tailcall plan.'header'()
 .end
 
 .sub 'footer' :method
@@ -79,7 +79,7 @@
 
     .local pmc plan
     plan = getattribute self, 'plan'
-    .return plan.'footer'( ran )
+    .tailcall plan.'footer'( ran )
 .end
 
 .namespace [ 'Test'; 'Builder'; 'ActivePlan' ]

Modified: trunk/runtime/parrot/library/uuid.pir
==============================================================================
--- trunk/runtime/parrot/library/uuid.pir       (original)
+++ trunk/runtime/parrot/library/uuid.pir       Mon Nov 10 21:19:19 2008
@@ -160,7 +160,7 @@
 =cut
 
 .sub 'generate'
-    .return 'generate_random'()
+    .tailcall 'generate_random'()
 .end
 
 

Reply via email to