Improve bytecode generation.
This commit is contained in:
@@ -170,7 +170,7 @@ public class Slots {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Lua.OP_JMP: /* sBx pc+=sBx */
|
case Lua.OP_JMP: /* sBx pc+=sBx */
|
||||||
if ( sbx < 0 )
|
//if ( sbx < 0 )
|
||||||
branchdest[index+1+sbx] = true;
|
branchdest[index+1+sbx] = true;
|
||||||
ins = p.code[index+0+sbx];
|
ins = p.code[index+0+sbx];
|
||||||
if ( Lua.GET_OPCODE(ins) == Lua.OP_TFORLOOP ) {
|
if ( Lua.GET_OPCODE(ins) == Lua.OP_TFORLOOP ) {
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ public class TestLuaJC {
|
|||||||
// create the script
|
// create the script
|
||||||
public static String name = "script";
|
public static String name = "script";
|
||||||
public static String script =
|
public static String script =
|
||||||
"local a = unpack()\n"+
|
"local t = a or nil\n"+
|
||||||
"local b = c and { d = e }\n"+
|
"local t\n" +
|
||||||
"local f\n"+
|
"b = function()\n"+
|
||||||
"local function g()\n"+
|
" return t\n"+
|
||||||
" return f\n"+
|
|
||||||
"end\n"+
|
"end\n"+
|
||||||
|
"return t\n"+
|
||||||
"";
|
"";
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user