MCPcopy Create free account
hub / github.com/beefytech/Beef / RebuildDependentTypes_MidCompile

Method RebuildDependentTypes_MidCompile

IDEHelper/Compiler/BfContext.cpp:1344–1377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1342}
1343
1344void BfContext::RebuildDependentTypes_MidCompile(BfDependedType* dType, const String& reason)
1345{
1346 BF_ASSERT(!dType->IsDeleting());
1347 auto module = dType->GetModule();
1348 if ((module != NULL) && (!module->mIsSpecialModule))
1349 {
1350 BF_ASSERT(!module->mIsDeleting);
1351 BF_ASSERT(!module->mOwnedTypeInstances.IsEmpty());
1352 }
1353
1354 mCompiler->mStats.mMidCompileRebuilds++;
1355 dType->mRebuildFlags = (BfTypeRebuildFlags)(dType->mRebuildFlags | BfTypeRebuildFlag_ChangedMidCompile);
1356 int prevDeletedTypes = mCompiler->mStats.mTypesDeleted;
1357 if (mCompiler->mIsResolveOnly)
1358 {
1359 if (mCompiler->mLastMidCompileRefreshRevision == mCompiler->mRevision - 1)
1360 {
1361 // Don't repeatedly full refresh in the case of non-deterministic emits
1362 }
1363 else
1364 {
1365 mCompiler->mNeedsFullRefresh = true;
1366 mCompiler->mLastMidCompileRefreshRevision = mCompiler->mRevision;
1367 }
1368 }
1369 BfLogSysM("Rebuilding dependent types MidCompile Type:%p Reason:%s\n", dType, reason.c_str());
1370 RebuildDependentTypes(dType);
1371
1372 if (mCompiler->mStats.mTypesDeleted != prevDeletedTypes)
1373 {
1374 BfLogSysM("Rebuilding dependent types MidCompile Type:%p Reason:%s - updating after deleting types\n", dType, reason.c_str());
1375 UpdateAfterDeletingTypes();
1376 }
1377}
1378
1379bool BfContext::IsRebuilding(BfType* type)
1380{

Callers

nothing calls this directly

Calls 4

IsDeletingMethod · 0.80
GetModuleMethod · 0.45
IsEmptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected