Improve call stack handling to prepare for propert tail call handling.

This commit is contained in:
James Roseborough
2007-06-15 06:41:40 +00:00
parent 19bd995ba6
commit be20581731
10 changed files with 21 additions and 33 deletions

View File

@@ -2,6 +2,8 @@ package lua.value;
public class LFunction extends LValue {
public String toString() {
return "function: "+hashCode();
}
}

View File

@@ -50,7 +50,7 @@ public class LTable extends LValue {
}
// perform a lua call
public void luaStackCall(StackState state, int base) {
public void luaStackCall(StackState state, int base, int top) {
if ( e.hasMoreElements() ) {
LValue key = (LValue) e.nextElement();
state.adjustTop(base+2);

View File

@@ -16,7 +16,7 @@ public class LValue {
}
// perform a lua call, return number of results actually produced
public void luaStackCall(StackState state, int base) {
public void luaStackCall(StackState state, int base, int top) {
luaUnsupportedOperation();
}