1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Perform PopulateReified pass after ProcessPurgatory

This commit is contained in:
Brian Fiete 2022-06-05 17:46:28 -07:00
parent a82130352a
commit 6f51eca72c
3 changed files with 22 additions and 7 deletions

View file

@ -6423,6 +6423,7 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
if ((methodInstance != NULL) && (!methodInstance->mMethodDef->mIsAbstract))
{
BF_ASSERT(methodInstance->mIsReified);
// This doesn't work because we may have FOREIGN methods from implicit interface methods
//auto moduleMethodInst = GetMethodInstanceAtIdx(methodRef.mTypeInstance, methodRef.mMethodNum);
auto moduleMethodInst = ReferenceExternalMethodInstance(methodInstance, BfGetMethodInstanceFlag_NoInline);
@ -13911,6 +13912,8 @@ BfModuleMethodInstance BfModule::GetMethodInstance(BfTypeInstance* typeInst, BfM
auto _SetReified = [&]()
{
if (!mCompiler->mIsResolveOnly)
BF_ASSERT(mCompiler->mCompileState <= BfCompiler::CompileState_Normal);
methodInstance->mIsReified = true;
};