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