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

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

From:
fperrad
Date:
December 10, 2008 04:54
Subject:
[svn:parrot] r33760 - trunk/languages/lua/src/lib
Message ID:
20081210125437.37BF1CBA89@x12.develooper.com
Author: fperrad
Date: Wed Dec 10 04:54:36 2008
New Revision: 33760

Modified:
   trunk/languages/lua/src/lib/luabytecode.pir
   trunk/languages/lua/src/lib/luabytecode.rules

Log:
[Lua] box
- refactor bytecode translation with the opcode 'box'

Modified: trunk/languages/lua/src/lib/luabytecode.pir
==============================================================================
--- trunk/languages/lua/src/lib/luabytecode.pir	(original)
+++ trunk/languages/lua/src/lib/luabytecode.pir	Wed Dec 10 04:54:36 2008
@@ -331,9 +331,7 @@
     pir = "    .local pmc k_"
     $S0 = i
     pir .= $S0
-    pir .= "\n    new k_"
-    pir .= $S0
-    pir .= ", 'LuaNumber'\n    set k_"
+    pir .= "\n    box k_"
     pir .= $S0
     pir .= ", "
     $S0 = self
@@ -362,9 +360,7 @@
     pir = "    .local pmc k_"
     $S0 = i
     pir .= $S0
-    pir .= "\n    new k_"
-    pir .= $S0
-    pir .= ", 'LuaString'\n    set k_"
+    pir .= "\n    box k_"
     pir .= $S0
     pir .= ", \""
     $S0 = self

Modified: trunk/languages/lua/src/lib/luabytecode.rules
==============================================================================
--- trunk/languages/lua/src/lib/luabytecode.rules	(original)
+++ trunk/languages/lua/src/lib/luabytecode.rules	Wed Dec 10 04:54:36 2008
@@ -986,8 +986,7 @@
         format => 'ABC',
         synopsis => 'R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B',
         pir => <<'PIR',
-    ${INS} = concat "  new ${PTEMP}0, 'LuaNumber'\n"
-    ${INS} = concat "  set ${PTEMP}0, "
+    ${INS} = concat "  box ${PTEMP}0, "
     $I0 = ${C} - 1
     $I0 *= ${FPF}
     inc $I0



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