1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed inifnite work loop populating IsSpecializedByAutoCompleteMethod

This commit is contained in:
Brian Fiete 2021-01-22 07:50:17 -08:00
parent 20d51e0929
commit c0dd9b0e09
2 changed files with 13 additions and 12 deletions

View file

@ -695,17 +695,18 @@ bool BfContext::ProcessWorkList(bool onlyReifiedTypes, bool onlyReifiedMethods)
// but it has been referenced now so we need to complete it, OR
// if this is from a newly-reified module
// if (false)
// {
// // For debugging
// mScratchModule->PopulateType(type, BfPopulateType_Full);
// }
BfTypeProcessRequest* typeProcessRequest = mPopulateTypeWorkList.Alloc();
typeProcessRequest->mType = type;
mCompiler->mStats.mTypesQueued++;
mCompiler->UpdateCompletion();
didWork = true;
if ((type->IsSpecializedByAutoCompleteMethod()) && (type->mDefineState >= BfTypeDefineState_Defined))
{
// We don't process methods for these
}
else
{
BfTypeProcessRequest* typeProcessRequest = mPopulateTypeWorkList.Alloc();
typeProcessRequest->mType = type;
mCompiler->mStats.mTypesQueued++;
mCompiler->UpdateCompletion();
didWork = true;
}
}
}
}

View file

@ -23683,7 +23683,7 @@ bool BfModule::Finish()
{
for (auto type : mOwnedTypeInstances)
{
BF_ASSERT(!type->IsIncomplete());
BF_ASSERT((!type->IsIncomplete()) || (type->IsSpecializedByAutoCompleteMethod()));
}
}