mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Improved mid-compile deleted type handling
This commit is contained in:
parent
188ff74128
commit
4ba8f6b0f6
5 changed files with 39 additions and 5 deletions
|
@ -2036,9 +2036,10 @@ void BfContext::DeleteType(BfType* type, bool deferDepRebuilds)
|
|||
void BfContext::UpdateAfterDeletingTypes()
|
||||
{
|
||||
BP_ZONE("BfContext::UpdateAfterDeletingTypes");
|
||||
BfLogSysM("UpdateAfterDeletingTypes\n");
|
||||
BfLogSysM("UpdateAfterDeletingTypes\n");
|
||||
|
||||
int graveyardStart = (int)mTypeGraveyard.size();
|
||||
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
@ -2124,6 +2125,8 @@ void BfContext::UpdateAfterDeletingTypes()
|
|||
SaveDeletingType(type);
|
||||
}
|
||||
}
|
||||
|
||||
mCompiler->mStats.mTypesDeleted_LastUpdateAfterDeletingTypes = mCompiler->mStats.mTypesDeleted;
|
||||
}
|
||||
|
||||
// This happens before the old defs have been injected
|
||||
|
@ -3487,6 +3490,13 @@ void BfContext::Cleanup()
|
|||
|
||||
mCompiler->mCompileState = BfCompiler::CompileState_Cleanup;
|
||||
|
||||
if (mCompiler->mStats.mTypesDeleted_LastUpdateAfterDeletingTypes != mCompiler->mStats.mTypesDeleted)
|
||||
{
|
||||
// Should only occur for internal compiler errors
|
||||
BF_ASSERT(mCompiler->mExtraCompileRequested);
|
||||
UpdateAfterDeletingTypes();
|
||||
}
|
||||
|
||||
///
|
||||
{
|
||||
Array<BfLocalMethod*> survivingLocalMethods;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue