Refactor call stack and its use throughout. CallFrame now does all bytecode processing, and the callframe is reinitialized anytime something might have changed, like a function call.

This commit is contained in:
James Roseborough
2007-06-27 06:43:33 +00:00
parent 93fc4699a9
commit c8e1934916
20 changed files with 548 additions and 136 deletions

View File

@@ -10,8 +10,8 @@ import lua.value.LDouble;
import lua.value.LInteger;
import lua.value.LNil;
import lua.value.LNumber;
import lua.value.LValue;
import lua.value.LString;
import lua.value.LValue;
/*
** Function Prototypes
@@ -350,7 +350,7 @@ public class LoadState {
// }
public Proto loadFunction(LString p) throws IOException {
Proto f = new Proto(this.L);
this.L.push(f);
// this.L.push(f);
f.source = loadString();
f.linedefined = loadInt();
f.lastlinedefined = loadInt();
@@ -366,7 +366,7 @@ public class LoadState {
// see ldebug.c
// IF (!luaG_checkcode(f), "bad code");
this.L.pop();
// this.L.pop();
return f;
}
//