diff --git a/oscar64/InterCode.cpp b/oscar64/InterCode.cpp index e38ea70..a37c0ae 100644 --- a/oscar64/InterCode.cpp +++ b/oscar64/InterCode.cpp @@ -16064,7 +16064,7 @@ InterCodeProcedure::InterCodeProcedure(InterCodeModule * mod, const Location & l mInterrupt(false), mHardwareInterrupt(false), mCompiled(false), mInterruptCalled(false), mDynamicStack(false), mSaveTempsLinkerObject(nullptr), mValueReturn(false), mFramePointer(false), mCheckUnreachable(true), mReturnType(IT_NONE), mCheapInline(false), - mDeclaration(nullptr), mGlobalsChecked(false) + mDeclaration(nullptr), mGlobalsChecked(false), mDispatchedCall(false) { mID = mModule->mProcedures.Size(); mModule->mProcedures.Push(this); diff --git a/oscar64/InterCode.h b/oscar64/InterCode.h index f2d8026..fbe4d86 100644 --- a/oscar64/InterCode.h +++ b/oscar64/InterCode.h @@ -602,6 +602,7 @@ public: int mTempSize, mCommonFrameSize, mCallerSavedTemps, mFreeCallerSavedTemps, mFastCallBase; bool mLeafProcedure, mNativeProcedure, mCallsFunctionPointer, mHasDynamicStack, mHasInlineAssembler, mCallsByteCode, mFastCallProcedure; bool mInterrupt, mHardwareInterrupt, mCompiled, mInterruptCalled, mValueReturn, mFramePointer, mDynamicStack; + bool mDispatchedCall; bool mCheckUnreachable; GrowingInterCodeProcedurePtrArray mCalledFunctions; bool mCheapInline; diff --git a/oscar64/InterCodeGenerator.cpp b/oscar64/InterCodeGenerator.cpp index 3d40258..16aafc4 100644 --- a/oscar64/InterCodeGenerator.cpp +++ b/oscar64/InterCodeGenerator.cpp @@ -4266,6 +4266,7 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration* Declaration* dinit = exp->mLeft->mLeft->mDecValue->mValue->mDecValue->mParams; while (dinit) { + proc->mModule->mProcedures[dinit->mValue->mDecValue->mVarIndex]->mDispatchedCall = true; proc->AddCalledFunction(proc->mModule->mProcedures[dinit->mValue->mDecValue->mVarIndex]); dinit = dinit->mNext; } diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index 7c25e9b..539d07a 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -40993,7 +40993,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc) mEntryBlock->mTrueJump = CompileBlock(mInterProc, mInterProc->mBlocks[0]); mEntryBlock->mBranch = ASMIT_JMP; - if (proc->mLeafProcedure && proc->mFastCallProcedure && !proc->mInterrupt && mNoFrame && mStackExpand == 0 && commonFrameSize == 0 && (mGenerator->mCompilerOptions & COPT_NATIVE)) + if (proc->mLeafProcedure && proc->mFastCallProcedure && !proc->mInterrupt && !proc->mDispatchedCall && mNoFrame && mStackExpand == 0 && commonFrameSize == 0 && (mGenerator->mCompilerOptions & COPT_NATIVE)) { #if 1 if (proc->mParamVars.Size() == 1 && proc->mParamVars[0]->mSize == 1)