mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixes to the lowering fixes
This commit is contained in:
parent
7701485fd4
commit
28c3179d4f
2 changed files with 3 additions and 3 deletions
|
@ -4955,7 +4955,7 @@ void BfExprEvaluator::PushThis(BfAstNode* targetSrc, BfTypedValue argVal, BfMeth
|
||||||
if (argVal.mType->IsValuelessType())
|
if (argVal.mType->IsValuelessType())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!methodInstance->AllowsThisSplatting())
|
if ((!methodInstance->AllowsThisSplatting()) && (methodDef->mIsMutating))
|
||||||
{
|
{
|
||||||
argVal = mModule->MakeAddressable(argVal);
|
argVal = mModule->MakeAddressable(argVal);
|
||||||
irArgs.push_back(argVal.mValue);
|
irArgs.push_back(argVal.mValue);
|
||||||
|
@ -5010,7 +5010,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
|
||||||
if (!mModule->mCompiler->mIsResolveOnly)
|
if (!mModule->mCompiler->mIsResolveOnly)
|
||||||
sCallIdx++;
|
sCallIdx++;
|
||||||
int callIdx = sCallIdx;
|
int callIdx = sCallIdx;
|
||||||
if (callIdx == 44)
|
if (callIdx == 4348)
|
||||||
{
|
{
|
||||||
NOP;
|
NOP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -737,7 +737,7 @@ BfType* BfMethodInstance::GetParamType(int paramIdx, bool useResolvedType)
|
||||||
return mMethodInfoEx->mClosureInstanceInfo->mThisOverride;
|
return mMethodInfoEx->mClosureInstanceInfo->mThisOverride;
|
||||||
BF_ASSERT(!mMethodDef->mIsStatic);
|
BF_ASSERT(!mMethodDef->mIsStatic);
|
||||||
auto owner = mMethodInstanceGroup->mOwner;
|
auto owner = mMethodInstanceGroup->mOwner;
|
||||||
if ((owner->IsValueType()) && ((mMethodDef->mIsMutating) || (!AllowsSplatting())))
|
if ((owner->IsValueType()) && ((mMethodDef->mIsMutating) || (!AllowsSplatting())) && (owner->GetLoweredType() == BfTypeCode_None))
|
||||||
return owner->mModule->CreatePointerType(owner);
|
return owner->mModule->CreatePointerType(owner);
|
||||||
return owner;
|
return owner;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue