mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Fixed a BB issue with fake caller methods
This commit is contained in:
parent
61d9edea83
commit
ae3ea7f209
1 changed files with 13 additions and 7 deletions
|
@ -1098,8 +1098,8 @@ void BfModule::EnsureIRBuilder(bool dbgVerifyCodeGen)
|
||||||
//mBfIRBuilder->mDbgVerifyCodeGen = true;
|
//mBfIRBuilder->mDbgVerifyCodeGen = true;
|
||||||
if (
|
if (
|
||||||
(mModuleName == "-")
|
(mModuleName == "-")
|
||||||
//|| (mModuleName == "System_Internal")
|
//|| (mModuleName == "Vec2")
|
||||||
//|| (mModuleName == "vdata")
|
//|| (mModuleName == "System_Int32")
|
||||||
//|| (mModuleName == "Hey_Dude_Bro_TestClass")
|
//|| (mModuleName == "Hey_Dude_Bro_TestClass")
|
||||||
)
|
)
|
||||||
mBfIRBuilder->mDbgVerifyCodeGen = true;
|
mBfIRBuilder->mDbgVerifyCodeGen = true;
|
||||||
|
@ -3883,6 +3883,10 @@ void BfModule::CreateFakeCallerMethod(const String& funcName)
|
||||||
auto entryBlock = mBfIRBuilder->CreateBlock("main", true);
|
auto entryBlock = mBfIRBuilder->CreateBlock("main", true);
|
||||||
mBfIRBuilder->SetInsertPoint(entryBlock);
|
mBfIRBuilder->SetInsertPoint(entryBlock);
|
||||||
|
|
||||||
|
BfMethodState methodState;
|
||||||
|
methodState.mIRHeadBlock = entryBlock;
|
||||||
|
SetAndRestoreValue<BfMethodState*> prevMethodState(mCurMethodState, &methodState);
|
||||||
|
|
||||||
SizedArray<BfIRValue, 8> args;
|
SizedArray<BfIRValue, 8> args;
|
||||||
BfExprEvaluator exprEvaluator(this);
|
BfExprEvaluator exprEvaluator(this);
|
||||||
|
|
||||||
|
@ -15277,13 +15281,15 @@ void BfModule::ProcessMethod_SetupParams(BfMethodInstance* methodInstance, BfTyp
|
||||||
paramVar->mValue = mBfIRBuilder->GetArgument(argIdx);
|
paramVar->mValue = mBfIRBuilder->GetArgument(argIdx);
|
||||||
else
|
else
|
||||||
paramVar->mValue = mBfIRBuilder->GetFakeVal();
|
paramVar->mValue = mBfIRBuilder->GetFakeVal();
|
||||||
if (thisType->IsComposite())
|
|
||||||
|
|
||||||
|
if ((thisType->IsSplattable()) && (methodInstance->AllowsThisSplatting()))
|
||||||
{
|
{
|
||||||
if ((thisType->IsSplattable()) && (methodInstance->AllowsThisSplatting()))
|
if (!thisType->IsTypedPrimitive())
|
||||||
paramVar->mIsSplat = true;
|
paramVar->mIsSplat = true;
|
||||||
else
|
|
||||||
paramVar->mIsLowered = thisType->GetLoweredType() != BfTypeCode_None;
|
|
||||||
}
|
}
|
||||||
|
else if (!methodDef->mIsMutating)
|
||||||
|
paramVar->mIsLowered = thisType->GetLoweredType() != BfTypeCode_None;
|
||||||
|
|
||||||
auto thisTypeInst = thisType->ToTypeInstance();
|
auto thisTypeInst = thisType->ToTypeInstance();
|
||||||
paramVar->mIsStruct = isThisStruct;
|
paramVar->mIsStruct = isThisStruct;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue