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

[svn:parrot] r32603 - trunk/languages/lua/src/lib

From:
fperrad
Date:
November 13, 2008 02:52
Subject:
[svn:parrot] r32603 - trunk/languages/lua/src/lib
Message ID:
20081113105218.0B01BCB9AF@x12.develooper.com
Author: fperrad
Date: Thu Nov 13 02:52:16 2008
New Revision: 32603

Modified:
   trunk/languages/lua/src/lib/luaaux.pir
   trunk/languages/lua/src/lib/luabasic.pir
   trunk/languages/lua/src/lib/luadebug.pir
   trunk/languages/lua/src/lib/luafile.pir
   trunk/languages/lua/src/lib/luaio.pir
   trunk/languages/lua/src/lib/luaperl.pir
   trunk/languages/lua/src/lib/luaregex.pir
   trunk/languages/lua/src/lib/luastring.pir

Log:
[Lua] lib
use .tailcall


Modified: trunk/languages/lua/src/lib/luaaux.pir
==============================================================================
--- trunk/languages/lua/src/lib/luaaux.pir	(original)
+++ trunk/languages/lua/src/lib/luaaux.pir	Thu Nov 13 02:52:16 2008
@@ -567,9 +567,9 @@
   L1:
     $S0 = substr data, 0, 4
     unless $S0 == "\033Lua" goto L2
-    .return undump(data, chunkname)
+    .tailcall undump(data, chunkname)
   L2:
-    .return parser(data, chunkname)
+    .tailcall parser(data, chunkname)
 .end
 
 .sub 'parser' :anon
@@ -628,7 +628,7 @@
 .sub 'lua_loadbuffer'
     .param string buff
     .param string chunkname
-    .return lua_load(buff, chunkname)
+    .tailcall lua_load(buff, chunkname)
 .end
 
 
@@ -659,7 +659,7 @@
     if filename == '' goto L4
     close f
   L4:
-    .return lua_load($S0, chunkname)
+    .tailcall lua_load($S0, chunkname)
   L3:
     $S0 = 'cannot open '
     $S0 .= filename

Modified: trunk/languages/lua/src/lib/luabasic.pir
==============================================================================
--- trunk/languages/lua/src/lib/luabasic.pir	(original)
+++ trunk/languages/lua/src/lib/luabasic.pir	Thu Nov 13 02:52:16 2008
@@ -203,7 +203,7 @@
     $S1 = lua_optstring(1, filename, '')
     ($P0, $S0) = lua_loadfile($S1)
     if null $P0 goto L1
-    .return $P0()
+    .tailcall $P0()
   L1:
     lua_error($S0)
 .end
@@ -262,7 +262,7 @@
     res = get_hll_global '_G'
     .return (res)
   L3:
-    .return lua_getfenv(f)
+    .tailcall lua_getfenv(f)
 .end
 
 .sub 'getfunc' :anon
@@ -388,7 +388,7 @@
     lua_checktype(1, func, 'function')
     $S2 = lua_optstring(2, chunkname, '=(load)')
     not_implemented()
-    .return load_aux($P0, $S0)
+    .tailcall load_aux($P0, $S0)
 .end
 
 .sub 'load_aux' :anon
@@ -417,7 +417,7 @@
     .param pmc extra :slurpy
     $S1 = lua_optstring(1, filename, '')
     ($P0, $S0) = lua_loadfile($S1)
-    .return load_aux($P0, $S0)
+    .tailcall load_aux($P0, $S0)
 .end
 
 
@@ -438,7 +438,7 @@
     $S1 = lua_checkstring(1, s)
     $S2 = lua_optstring(2, chunkname, $S1)
     ($P0, $S0) = lua_loadbuffer($S1, $S2)
-    .return load_aux($P0, $S0)
+    .tailcall load_aux($P0, $S0)
 .end
 
 

Modified: trunk/languages/lua/src/lib/luadebug.pir
==============================================================================
--- trunk/languages/lua/src/lib/luadebug.pir	(original)
+++ trunk/languages/lua/src/lib/luadebug.pir	Thu Nov 13 02:52:16 2008
@@ -118,7 +118,7 @@
 .sub 'getfenv'
     .param pmc o :optional
     .param pmc extra :slurpy
-    .return lua_getfenv(o)
+    .tailcall lua_getfenv(o)
 .end
 
 

Modified: trunk/languages/lua/src/lib/luafile.pir
==============================================================================
--- trunk/languages/lua/src/lib/luafile.pir	(original)
+++ trunk/languages/lua/src/lib/luafile.pir	Thu Nov 13 02:52:16 2008
@@ -101,7 +101,7 @@
 .sub 'lines' :method
     .param pmc extra :slurpy
     tofile(self)
-    .return aux_lines(self, 0)
+    .tailcall aux_lines(self, 0)
 .end
 
 
@@ -149,7 +149,7 @@
     tofile(self)
     f = getattribute self, 'data'
     if formats goto L1
-    .return read_line(f)
+    .tailcall read_line(f)
   L1:
     .local int narg
     .local int i

Modified: trunk/languages/lua/src/lib/luaio.pir
==============================================================================
--- trunk/languages/lua/src/lib/luaio.pir	(original)
+++ trunk/languages/lua/src/lib/luaio.pir	Thu Nov 13 02:52:16 2008
@@ -333,7 +333,7 @@
     env = file.'getfenv'()
     .const 'LuaString' key = '__close'
     $P0 = env[key]
-    .return $P0(file)
+    .tailcall $P0(file)
 .end
 
 .sub 'aux_lines' :lex
@@ -396,7 +396,7 @@
     .const 'LuaString' key = 'flush'
     file = getiofile(IO_OUTPUT)
     $P0 = file[key]
-    .return $P0(file)
+    .tailcall $P0(file)
 .end
 
 
@@ -466,7 +466,7 @@
     .const 'LuaString' key = 'lines'
     file = getiofile(IO_INPUT)
     $P0 = file[key]
-    .return $P0(file)
+    .tailcall $P0(file)
   L1:
     $S1 = lua_checkstring(1, filename)
     f = open $S1, '<'
@@ -474,7 +474,7 @@
     lua_argerror(1, $S1)
   L2:
     file = newfile(f)
-    .return aux_lines(file, 1)
+    .tailcall aux_lines(file, 1)
 .end
 
 
@@ -626,7 +626,7 @@
     .const 'LuaString' key = 'read'
     file = getiofile(IO_INPUT)
     $P0 = file[key]
-    .return $P0(file, argv :flat)
+    .tailcall $P0(file, argv :flat)
 .end
 
 
@@ -710,7 +710,7 @@
     .const 'LuaString' key = 'write'
     file = getiofile(IO_OUTPUT)
     $P0 = file[key]
-    .return $P0(file, argv :flat)
+    .tailcall $P0(file, argv :flat)
 .end
 
 

Modified: trunk/languages/lua/src/lib/luaperl.pir
==============================================================================
--- trunk/languages/lua/src/lib/luaperl.pir	(original)
+++ trunk/languages/lua/src/lib/luaperl.pir	Thu Nov 13 02:52:16 2008
@@ -141,7 +141,7 @@
     setprop self, 'num', $P0
     $S1 = $S0 . '.lua'
     save_lua(source, $S1)
-    .return compile_file($S1)
+    .tailcall compile_file($S1)
 .end
 
 =back

Modified: trunk/languages/lua/src/lib/luaregex.pir
==============================================================================
--- trunk/languages/lua/src/lib/luaregex.pir	(original)
+++ trunk/languages/lua/src/lib/luaregex.pir	Thu Nov 13 02:52:16 2008
@@ -656,7 +656,7 @@
 
   super:
     $P0 = get_hll_global ['PGE';'Exp';'CGroup'], 'pir'
-    .return $P0(self, code, label, next)
+    .tailcall $P0(self, code, label, next)
 .end
 
 

Modified: trunk/languages/lua/src/lib/luastring.pir
==============================================================================
--- trunk/languages/lua/src/lib/luastring.pir	(original)
+++ trunk/languages/lua/src/lib/luastring.pir	Thu Nov 13 02:52:16 2008
@@ -225,7 +225,7 @@
 
 .sub 'find'
     .param pmc argv :slurpy
-    .return str_find_aux(1, argv :flat)
+    .tailcall str_find_aux(1, argv :flat)
 .end
 
 .sub 'str_find_aux' :anon
@@ -722,11 +722,11 @@
     $I0 = isa repl, 'LuaNumber'
     unless $I0 goto L1
     $P0 = repl.'tostring'()
-    .return add_s(b, s, match, $P0)
+    .tailcall add_s(b, s, match, $P0)
   L1:
     $I0 = isa repl, 'LuaString'
     unless $I0 goto L2
-    .return add_s(b, s, match, repl)
+    .tailcall add_s(b, s, match, repl)
   L2:
     $I0 = isa repl, 'LuaClosure'
     if $I0 goto L3
@@ -881,7 +881,7 @@
 
 .sub 'match'
     .param pmc argv :slurpy
-    .return str_find_aux(0, argv :flat)
+    .tailcall str_find_aux(0, argv :flat)
 .end
 
 



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