mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed static search for method params (fixes int[SIZE]
resolution)
This commit is contained in:
parent
0d0d98f6d6
commit
a4a5d99fd0
1 changed files with 8 additions and 3 deletions
|
@ -17192,9 +17192,12 @@ void BfModule::EmitCtorBody(bool& skipBody)
|
||||||
auto localVal = exprEvaluator.LoadLocal(localVar);
|
auto localVal = exprEvaluator.LoadLocal(localVar);
|
||||||
localVal = LoadOrAggregateValue(localVal);
|
localVal = LoadOrAggregateValue(localVal);
|
||||||
|
|
||||||
auto thisVal = GetThis();
|
if (!localVal.mType->IsVar())
|
||||||
auto fieldPtr = mBfIRBuilder->CreateInBoundsGEP(thisVal.mValue, 0, fieldInstance.mDataIdx);
|
{
|
||||||
mBfIRBuilder->CreateAlignedStore(localVal.mValue, fieldPtr, localVar->mResolvedType->mAlign);
|
auto thisVal = GetThis();
|
||||||
|
auto fieldPtr = mBfIRBuilder->CreateInBoundsGEP(thisVal.mValue, 0, fieldInstance.mDataIdx);
|
||||||
|
mBfIRBuilder->CreateAlignedStore(localVal.mValue, fieldPtr, localVar->mResolvedType->mAlign);
|
||||||
|
}
|
||||||
MarkFieldInitialized(&fieldInstance);
|
MarkFieldInitialized(&fieldInstance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22049,6 +22052,8 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
|
||||||
SetAndRestoreValue<bool> prevIgnoreWrites(mBfIRBuilder->mIgnoreWrites, mWantsIRIgnoreWrites || mCurMethodInstance->mIsUnspecialized || mCurTypeInstance->mResolvingVarField);
|
SetAndRestoreValue<bool> prevIgnoreWrites(mBfIRBuilder->mIgnoreWrites, mWantsIRIgnoreWrites || mCurMethodInstance->mIsUnspecialized || mCurTypeInstance->mResolvingVarField);
|
||||||
SetAndRestoreValue<bool> prevIsCapturingMethodMatchInfo;
|
SetAndRestoreValue<bool> prevIsCapturingMethodMatchInfo;
|
||||||
SetAndRestoreValue<bool> prevAllowLockYield(mContext->mAllowLockYield, false);
|
SetAndRestoreValue<bool> prevAllowLockYield(mContext->mAllowLockYield, false);
|
||||||
|
BfTypeState typeState(mCurTypeInstance);
|
||||||
|
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
|
||||||
|
|
||||||
if (mCompiler->IsAutocomplete())
|
if (mCompiler->IsAutocomplete())
|
||||||
prevIsCapturingMethodMatchInfo.Init(mCompiler->mResolvePassData->mAutoComplete->mIsCapturingMethodMatchInfo, false);
|
prevIsCapturingMethodMatchInfo.Init(mCompiler->mResolvePassData->mAutoComplete->mIsCapturingMethodMatchInfo, false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue