Implement Static Function Pointers

This commit is contained in:
Ricardo Luís Vaz Silva 2023-02-10 09:44:32 -03:00 committed by Christoph Oelckers
commit e3704605d8
23 changed files with 876 additions and 51 deletions

View file

@ -309,7 +309,8 @@ static bool UnravelVarArgAJump(FxVMFunctionCall *func, FCompileContext &ctx)
static bool AJumpProcessing(FxVMFunctionCall *func, FCompileContext &ctx)
{
// Unfortunately the PrintableName is the only safe thing to catch this special case here.
if (stricmp(func->Function->Variants[0].Implementation->QualifiedName, "Actor.A_Jump") == 0)
// [RL0] It's not valid to access Variant::Implementation on function pointer calls, so skip this
if (!func->FnPtrCall && stricmp(func->Function->Variants[0].Implementation->QualifiedName, "Actor.A_Jump") == 0)
{
// Unravel the varargs part of this function here so that the VM->native interface does not have to deal with it anymore.
if (func->ArgList.Size() > 2)