When we are unsure of whether an old generic instance will survive, we RebuildType but don't put it in any worklist. One of three things happens: 1) It gets built on demand 2) It gets deleted in UpdateDependencyMap 3) It stays undefined and we need to build it here
| 2650 | // 2) It gets deleted in UpdateDependencyMap |
| 2651 | // 3) It stays undefined and we need to build it here |
| 2652 | bool BfCompiler::ProcessPurgatory(bool reifiedOnly) |
| 2653 | { |
| 2654 | BP_ZONE("BfCompiler::ProcessPurgatory"); |
| 2655 | |
| 2656 | bool didWork = false; |
| 2657 | |
| 2658 | while (true) |
| 2659 | { |
| 2660 | mContext->RemoveInvalidWorkItems(); |
| 2661 | |
| 2662 | //for (auto type : mGenericInstancePurgatory) |
| 2663 | for (int i = 0; i < (int)mGenericInstancePurgatory.size(); i++) |
| 2664 | { |
| 2665 | auto type = mGenericInstancePurgatory[i]; |
| 2666 | if ((reifiedOnly) && (!type->IsReified())) |
| 2667 | continue; |
| 2668 | |
| 2669 | if ((reifiedOnly) && ((type->mRebuildFlags & BfTypeRebuildFlag_AwaitingReference) != 0)) |
| 2670 | continue; |
| 2671 | |
| 2672 | if (!type->IsDeleting()) |
| 2673 | { |
| 2674 | auto module = type->GetModule(); |
| 2675 | if (module != NULL) |
| 2676 | { |
| 2677 | if (!module->mIsModuleMutable) |
| 2678 | module->StartExtension(); |
| 2679 | module->PopulateType(type, BfPopulateType_Full); |
| 2680 | } |
| 2681 | } |
| 2682 | |
| 2683 | if (reifiedOnly) |
| 2684 | { |
| 2685 | mGenericInstancePurgatory.RemoveAtFast(i); |
| 2686 | i--; |
| 2687 | } |
| 2688 | } |
| 2689 | |
| 2690 | if (!reifiedOnly) |
| 2691 | mGenericInstancePurgatory.Clear(); |
| 2692 | |
| 2693 | int prevPurgatorySize = (int)mGenericInstancePurgatory.size(); |
| 2694 | if (mContext->ProcessWorkList(reifiedOnly, reifiedOnly)) |
| 2695 | didWork = true; |
| 2696 | if (prevPurgatorySize == (int)mGenericInstancePurgatory.size()) |
| 2697 | break; |
| 2698 | } |
| 2699 | return didWork; |
| 2700 | } |
| 2701 | |
| 2702 | bool BfCompiler::VerifySlotNums() |
| 2703 | { |
nothing calls this directly
no test coverage detected