- implemented VMCallWithDefaults and used it for all calls with variable arguments.

This isn't used for the 3 action function calls because it requires an array allocation which would be a bit too costly for something as frequently called as action functions.
They will need a different approach.
This commit is contained in:
Christoph Oelckers 2018-11-16 19:18:33 +01:00
commit 97573a0452
6 changed files with 23 additions and 12 deletions

View file

@ -175,13 +175,13 @@ bool FState::CallAction(AActor *self, AActor *stateowner, FStateParamInfo *info,
if (stateret == nullptr)
{
VMCallWithDefaults(ActionFunc, params, ActionFunc->ImplicitArgs, nullptr, 0);
VMCallAction(ActionFunc, params, ActionFunc->ImplicitArgs, nullptr, 0);
}
else
{
VMReturn ret;
ret.PointerAt((void **)stateret);
VMCallWithDefaults(ActionFunc, params, ActionFunc->ImplicitArgs, &ret, 1);
VMCallAction(ActionFunc, params, ActionFunc->ImplicitArgs, &ret, 1);
}
}
catch (CVMAbortException &err)