Always initialize a CallFrame's stack
This commit is contained in:
@@ -712,11 +712,13 @@ public class DebugLib extends TwoArgFunction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class CallFrame {
|
public static class CallFrame {
|
||||||
|
static final LuaValue[] EMPTY = {};
|
||||||
|
|
||||||
LuaFunction f;
|
LuaFunction f;
|
||||||
int pc;
|
int pc;
|
||||||
int top;
|
int top;
|
||||||
Varargs v;
|
Varargs v;
|
||||||
LuaValue[] stack;
|
LuaValue[] stack = EMPTY;
|
||||||
CallFrame previous;
|
CallFrame previous;
|
||||||
|
|
||||||
void set(LuaClosure function, Varargs varargs, LuaValue[] stack) {
|
void set(LuaClosure function, Varargs varargs, LuaValue[] stack) {
|
||||||
@@ -736,7 +738,7 @@ public class DebugLib extends TwoArgFunction {
|
|||||||
void reset() {
|
void reset() {
|
||||||
this.f = null;
|
this.f = null;
|
||||||
this.v = null;
|
this.v = null;
|
||||||
this.stack = null;
|
this.stack = EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void instr(int pc, Varargs v, int top) {
|
void instr(int pc, Varargs v, int top) {
|
||||||
|
|||||||
Reference in New Issue
Block a user