Lua 5.2 compatibility fixes.

This commit is contained in:
James Roseborough
2012-09-09 16:26:17 +00:00
parent 8d1333c612
commit d5456b4b93
19 changed files with 111 additions and 152 deletions

View File

@@ -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 );
}

View File

@@ -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;