Lua 5.2 compatibility fixes.

This commit is contained in:
James Roseborough
2012-09-04 16:29:12 +00:00
parent bbbfbce612
commit c4791e2e3e
2 changed files with 2 additions and 4 deletions

View File

@@ -279,8 +279,8 @@ public class FuncState extends LuaC {
// ============================================================= // =============================================================
void nil(int from, int n) { void nil(int from, int n) {
if (pc > 0 && GET_OPCODE(f.code[pc - 1]) == OP_LOADNIL) {
final int code_prev = f.code[pc - 1]; final int code_prev = f.code[pc - 1];
if (pc > 0 && GET_OPCODE(code_prev) == OP_LOADNIL) {
int l = from + n - 1; /* last register to set nil */ int l = from + n - 1; /* last register to set nil */
int pfrom = GETARG_A(code_prev); int pfrom = GETARG_A(code_prev);
int pl = pfrom + GETARG_B(code_prev); int pl = pfrom + GETARG_B(code_prev);
@@ -537,7 +537,6 @@ public class FuncState extends LuaC {
} }
void dischargevars(expdesc e) { void dischargevars(expdesc e) {
System.out.println(" discharg vars e.k " + e.k);
switch (e.k) { switch (e.k) {
case LexState.VLOCAL: { case LexState.VLOCAL: {
e.k = LexState.VNONRELOC; e.k = LexState.VNONRELOC;

View File

@@ -699,7 +699,6 @@ public class LexState {
lookahead.token = TK_EOS; /* and discharge it */ lookahead.token = TK_EOS; /* and discharge it */
} else } else
t.token = llex(t.seminfo); /* read next token */ t.token = llex(t.seminfo); /* read next token */
System.out.println("---- next t.token " + t.token + " (" + txtToken(t.token) + ") " + linenumber );
} }
void lookahead() { void lookahead() {