develooper Front page | perl.cvs.parrot | Postings from November 2008

[svn:parrot] r32577 - in trunk/t: op pmc stm

From:
coke
Date:
November 12, 2008 11:51
Subject:
[svn:parrot] r32577 - in trunk/t: op pmc stm
Message ID:
20081112195139.DA99ECB9AF@x12.develooper.com
Author: coke
Date: Wed Nov 12 11:51:38 2008
New Revision: 32577

Modified:
   trunk/t/op/calling.t
   trunk/t/op/exceptions.t
   trunk/t/pmc/exception.t
   trunk/t/pmc/object-meths.t
   trunk/t/stm/llqueue.t
   trunk/t/stm/runtime.t

Log:
using .return as a synonym of .tailcall is [DEPRECATED]



Modified: trunk/t/op/calling.t
==============================================================================
--- trunk/t/op/calling.t	(original)
+++ trunk/t/op/calling.t	Wed Nov 12 11:51:38 2008
@@ -783,7 +783,7 @@
 .sub foo
     .const 'Sub' b = "bar"
     print "foo\n"
-    .return b("from_foo\n")
+    .tailcall b("from_foo\n")
 .end
 .sub bar
     .param string s
@@ -964,7 +964,7 @@
     .param pmc b
     $P0 = new 'Integer'
     $P0 = 3
-    .return bar($P0, a, b)
+    .tailcall bar($P0, a, b)
 .end
 
 .sub bar
@@ -1082,7 +1082,7 @@
 .end
 .sub foo
     .param pmc p :slurpy
-    .return bar(p)
+    .tailcall bar(p)
 .end
 .sub bar
     .param pmc p
@@ -1278,7 +1278,7 @@
     code = ".sub main :main :anon\n" . code
     code = code . "\n.end\n"
     $P0 = compreg "PIR"
-    .return $P0(code)
+    .tailcall $P0(code)
 .end
 CODE
 Foo!
@@ -1351,7 +1351,7 @@
 .end
 .sub foo
     .const 'Sub' b = "bar"
-    .return b(10, 20)
+    .tailcall b(10, 20)
 .end
 .sub bar
     .param int a
@@ -1382,7 +1382,7 @@
 .end
 .sub foo
     .const 'Sub' b = "bar"
-    .return b(10, 20, 30)
+    .tailcall b(10, 20, 30)
 .end
 .sub bar
     .param int a
@@ -1607,7 +1607,7 @@
     .param pmc cc
     .param string s
     print s
-    .return cc()
+    .tailcall cc()
 .end
 CODE
 ok 1
@@ -1636,7 +1636,7 @@
 L3:
         .const 'Sub' $P49 = "___internal_main_test_"
         newclosure $P48, $P49
-        .return _try_it($I42, $P48)
+        .tailcall _try_it($I42, $P48)
 .end
 
 .sub ___internal_main_test_ :outer('_main')
@@ -2429,7 +2429,7 @@
     P1 = newclosure P2
     # There is a closure depending on our current context, so this shouldn't
     # free it.
-    .return P1()
+    .tailcall P1()
 .end
 
 .sub myclosure :outer(create_closure_and_run_it)

Modified: trunk/t/op/exceptions.t
==============================================================================
--- trunk/t/op/exceptions.t	(original)
+++ trunk/t/op/exceptions.t	Wed Nov 12 11:51:38 2008
@@ -432,7 +432,7 @@
     push_eh handler
     exit 0
 handler:
-    .return exit_handler()
+    .tailcall exit_handler()
 .end
 
 .sub exit_handler :outer(main)

Modified: trunk/t/pmc/exception.t
==============================================================================
--- trunk/t/pmc/exception.t	(original)
+++ trunk/t/pmc/exception.t	Wed Nov 12 11:51:38 2008
@@ -543,7 +543,7 @@
     push_eh handler
     exit 0
 handler:
-    .return exit_handler()
+    .tailcall exit_handler()
 .end
 
 .sub exit_handler :outer(main)

Modified: trunk/t/pmc/object-meths.t
==============================================================================
--- trunk/t/pmc/object-meths.t	(original)
+++ trunk/t/pmc/object-meths.t	Wed Nov 12 11:51:38 2008
@@ -811,7 +811,7 @@
     n = getattribute self, [ "Foo" ], "n"
     dec n
     unless n goto done
-    .return self."go"()
+    .tailcall self."go"()
 done:
 .end
 CODE

Modified: trunk/t/stm/llqueue.t
==============================================================================
--- trunk/t/stm/llqueue.t	(original)
+++ trunk/t/stm/llqueue.t	Wed Nov 12 11:51:38 2008
@@ -188,11 +188,11 @@
 .end
 
 .sub get_next :method
-    .return _do_get(self, 'next')
+    .tailcall _do_get(self, 'next')
 .end
 
 .sub get_prev :method
-    .return _do_get(self, 'prev')
+    .tailcall _do_get(self, 'prev')
 .end
 
 .sub get_value :method
@@ -215,12 +215,12 @@
 
 .sub set_next :method
     .param pmc new_next
-    .return _do_set(self, 'next', new_next)
+    .tailcall _do_set(self, 'next', new_next)
 .end
 
 .sub set_prev :method
     .param pmc new_prev
-    .return _do_set(self, 'prev', new_prev)
+    .tailcall _do_set(self, 'prev', new_prev)
 .end
 
 .namespace [ 'STMLLQueue' ]
@@ -295,7 +295,7 @@
     $P3 = new 'Undef'
     tail_tail_node.'set_next'($P3)
 do_return:
-    .return tail_node.'get_value'()
+    .tailcall tail_node.'get_value'()
 no_tail:
     $P0 = get_hll_global ['STM'], 'retry'
     $P0()

Modified: trunk/t/stm/runtime.t
==============================================================================
--- trunk/t/stm/runtime.t	(original)
+++ trunk/t/stm/runtime.t	Wed Nov 12 11:51:38 2008
@@ -393,7 +393,7 @@
 
     $P0 = get_hll_global ['STM'], 'transaction'
     $P1 = global '_fetchHead'
-    .return $P0($P1, self, removep, blockp)
+    .tailcall $P0($P1, self, removep, blockp)
 .end
 
 .sub _fetchHead :method



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About