- modify the VM calling convention so that the callee sets up its own VM frame

This commit is contained in:
Magnus Norddahl 2018-10-09 02:08:15 +02:00
commit 137ef034d1
5 changed files with 54 additions and 106 deletions

View file

@ -417,19 +417,7 @@ int JitCompiler::DoCall(VMFrameStack *stack, VMFunction *call, int b, int c, VMV
else
{
VMCalls[0]++;
VMScriptFunction *script = static_cast<VMScriptFunction *>(call);
VMFrame *newf = stack->AllocFrame(script);
VMFillParams(param, newf, b);
try
{
numret = VMExec(stack, script->Code, returns, c);
}
catch (...)
{
stack->PopFrame();
throw;
}
stack->PopFrame();
numret = VMExec(static_cast<VMScriptFunction *>(call), param, b, returns, c);
}
return numret;