From 442383788832f1347046cb70e082322c1c7bb3d5 Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:18:33 +0200 Subject: [PATCH] fixed varadic function inlining --- oscar64/InterCode.cpp | 4 ++-- oscar64/InterCodeGenerator.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oscar64/InterCode.cpp b/oscar64/InterCode.cpp index 6de798d..c60e0af 100644 --- a/oscar64/InterCode.cpp +++ b/oscar64/InterCode.cpp @@ -21975,7 +21975,7 @@ void InterCodeProcedure::Close(void) { GrowingTypeArray tstack(IT_NONE); - CheckFunc = !strcmp(mIdent->mString, "test"); + CheckFunc = !strcmp(mIdent->mString, "main"); CheckCase = false; mEntryBlock = mBlocks[0]; @@ -23819,7 +23819,7 @@ void InterCodeProcedure::Disassemble(FILE* file) void InterCodeProcedure::Disassemble(const char* name, bool dumpSets) { -#if 1 +#if 0 #ifdef _WIN32 FILE* file; static bool initial = true; diff --git a/oscar64/InterCodeGenerator.cpp b/oscar64/InterCodeGenerator.cpp index 7ea2c19..7552ede 100644 --- a/oscar64/InterCodeGenerator.cpp +++ b/oscar64/InterCodeGenerator.cpp @@ -5633,7 +5633,7 @@ InterCodeProcedure* InterCodeGenerator::TranslateProcedure(InterCodeModule * mod if (dec->mFlags & DTF_DYNSTACK) proc->mDynamicStack = true; - if (dec->mFlags & DTF_PREVENT_INLINE) + if ((dec->mFlags & DTF_PREVENT_INLINE) || (dec->mBase->mFlags & DTF_VARIADIC)) proc->mNoInline = true; if (dec->mBase->mFlags & DTF_FASTCALL)