mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Compile QueueUnused modify-while-iterating fix
This commit is contained in:
parent
b1717a0722
commit
e606b18a0c
1 changed files with 28 additions and 21 deletions
|
@ -7045,6 +7045,8 @@ bool BfCompiler::DoCompile(const StringImpl& outputDirectory)
|
||||||
mContext->mUnreifiedModule->ResolveTypeDef(typeDef, BfPopulateType_Full);
|
mContext->mUnreifiedModule->ResolveTypeDef(typeDef, BfPopulateType_Full);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Array<BfTypeInstance*> typeWorkList;
|
||||||
|
|
||||||
for (auto type : mContext->mResolvedTypes)
|
for (auto type : mContext->mResolvedTypes)
|
||||||
{
|
{
|
||||||
auto module = type->GetModule();
|
auto module = type->GetModule();
|
||||||
|
@ -7066,6 +7068,12 @@ bool BfCompiler::DoCompile(const StringImpl& outputDirectory)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!typeInst->IsSpecializedType())
|
if (!typeInst->IsSpecializedType())
|
||||||
|
{
|
||||||
|
typeWorkList.Add(typeInst);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto typeInst : typeWorkList)
|
||||||
{
|
{
|
||||||
// Find any remaining methods for unreified processing
|
// Find any remaining methods for unreified processing
|
||||||
for (auto&& methodInstGroup : typeInst->mMethodInstanceGroups)
|
for (auto&& methodInstGroup : typeInst->mMethodInstanceGroups)
|
||||||
|
@ -7091,7 +7099,6 @@ bool BfCompiler::DoCompile(const StringImpl& outputDirectory)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ((!queuedMoreMethods) && (startTypeInitCount == mTypeInitCount))
|
if ((!queuedMoreMethods) && (startTypeInitCount == mTypeInitCount))
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue