Lua 5.2 compatibility fixes.
This commit is contained in:
@@ -122,10 +122,10 @@ public class JavaGen {
|
||||
builder.storeLocal( pc, a );
|
||||
break;
|
||||
|
||||
case Lua.OP_LOADNIL: /* A B R(A):= ...:= R(B):= nil */
|
||||
case Lua.OP_LOADNIL: /* A B R(A):= ...:= R(A+B):= nil */
|
||||
builder.loadNil();
|
||||
for ( ; a<=b; a++ ) {
|
||||
if ( a < b )
|
||||
for ( ; b>=0; a++, b-- ) {
|
||||
if ( b > 0 )
|
||||
builder.dup();
|
||||
builder.storeLocal( pc, a );
|
||||
}
|
||||
|
||||
@@ -265,10 +265,10 @@ public class ProtoInfo {
|
||||
v[a+3][pc] = new VarInfo(a+3,pc);
|
||||
break;
|
||||
|
||||
case Lua.OP_LOADNIL: /* A B R(A) := ... := R(B) := nil */
|
||||
case Lua.OP_LOADNIL: /* A B R(A) := ... := R(A+B) := nil */
|
||||
a = Lua.GETARG_A( ins );
|
||||
b = Lua.GETARG_B( ins );
|
||||
for ( ; a<=b; a++ )
|
||||
for ( ; b-->=0; a++ )
|
||||
v[a][pc] = new VarInfo(a,pc);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user