Various changes to bring pm.lua test closer to passing:
* New and complete character class support * string.gsub implemented * rawset implemented * lua_call added (based on lua_pcall) * lua_pop added * newCall removed; luaGetTable and luaSetTable in LFunction updated to use lua_call instead. * StandardTest changed to avoid an ArrayIndexOutOfBoundsException Unfortunately I discovered a problem where execute() will loop around too many times and call exec() with a call frame that has already completed. This might be due to the lack of the "tailcalls" field in our CallInfo class that the C version maintains?
This commit is contained in:
@@ -12,27 +12,18 @@ public class LFunction extends LValue {
|
||||
}
|
||||
|
||||
public void luaSetTable(VM vm, LValue table, LValue key, LValue val) {
|
||||
vm.newCall();
|
||||
vm.push( this );
|
||||
vm.push( table );
|
||||
vm.push( key );
|
||||
vm.push( val );
|
||||
vm.setExpectedResultCount( 0 );
|
||||
if ( this.luaStackCall( vm ) )
|
||||
vm.execute();
|
||||
else
|
||||
vm.adjustResults();
|
||||
vm.lua_call( 3, 0 );
|
||||
}
|
||||
|
||||
public void luaGetTable(VM vm, LValue table, LValue key) {
|
||||
vm.newCall();
|
||||
vm.push( this );
|
||||
vm.push( table );
|
||||
vm.push( key );
|
||||
vm.setExpectedResultCount( 1 );
|
||||
if ( this.luaStackCall( vm ) )
|
||||
vm.execute();
|
||||
vm.adjustResults();
|
||||
vm.lua_call( 2, 1 );
|
||||
}
|
||||
|
||||
public LString luaGetType() {
|
||||
|
||||
Reference in New Issue
Block a user