Improve call stack handling to prepare for propert tail call handling.
This commit is contained in:
@@ -2,6 +2,8 @@ package lua.value;
|
||||
|
||||
public class LFunction extends LValue {
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "function: "+hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user