improved stack cleanup for tailcalls
This commit is contained in:
parent
14cbc7b2dc
commit
a0e46fce11
@ -726,9 +726,13 @@ exception_restore:
|
||||
if (type(t) == OT_CLOSURE
|
||||
&& (!_closure(t)->_function->_bgenerator)){
|
||||
SQObjectPtr clo = t;
|
||||
SQInteger last_top = _top;
|
||||
if(_openouters) CloseOuters(&(_stack._vals[_stackbase]));
|
||||
for (SQInteger i = 0; i < arg3; i++) STK(i) = STK(arg2 + i);
|
||||
_GUARD(StartCall(_closure(clo), ci->_target, arg3, _stackbase, true));
|
||||
if (last_top >= _top) {
|
||||
_top = last_top;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user