mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +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())
|
||||
return;
|
||||
|
||||
if (!methodInstance->AllowsThisSplatting())
|
||||
if ((!methodInstance->AllowsThisSplatting()) && (methodDef->mIsMutating))
|
||||
{
|
||||
argVal = mModule->MakeAddressable(argVal);
|
||||
irArgs.push_back(argVal.mValue);
|
||||
|
@ -5010,7 +5010,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
|
|||
if (!mModule->mCompiler->mIsResolveOnly)
|
||||
sCallIdx++;
|
||||
int callIdx = sCallIdx;
|
||||
if (callIdx == 44)
|
||||
if (callIdx == 4348)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
|
|
@ -737,7 +737,7 @@ BfType* BfMethodInstance::GetParamType(int paramIdx, bool useResolvedType)
|
|||
return mMethodInfoEx->mClosureInstanceInfo->mThisOverride;
|
||||
BF_ASSERT(!mMethodDef->mIsStatic);
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue