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

Method RebuildMethods

IDEHelper/Compiler/BfModuleTypeUtils.cpp:7530–7556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7528}
7529
7530void BfModule::RebuildMethods(BfTypeInstance* typeInstance)
7531{
7532 if (typeInstance->IsIncomplete())
7533 return;
7534
7535 BfLogSysM("RebuildMethods setting mNeedsMethodProcessing=true on %p\n", typeInstance);
7536
7537 BF_ASSERT_REL(typeInstance->mDefineState != BfTypeDefineState_DefinedAndMethodsSlotting);
7538 typeInstance->mNeedsMethodProcessing = true;
7539 typeInstance->mDefineState = BfTypeDefineState_Defined;
7540 typeInstance->mTypeIncomplete = true;
7541
7542 for (auto& methodInstanceGroup : typeInstance->mMethodInstanceGroups)
7543 {
7544 delete methodInstanceGroup.mDefault;
7545 methodInstanceGroup.mDefault = NULL;
7546 delete methodInstanceGroup.mMethodSpecializationMap;
7547 methodInstanceGroup.mMethodSpecializationMap = NULL;
7548 methodInstanceGroup.mOnDemandKind = BfMethodOnDemandKind_NotSet;
7549 }
7550
7551 BfTypeProcessRequest* typeProcessRequest = mContext->mPopulateTypeWorkList.Alloc();
7552 typeProcessRequest->mType = typeInstance;
7553 BF_ASSERT(typeInstance->mContext == mContext);
7554 mCompiler->mStats.mTypesQueued++;
7555 mCompiler->UpdateCompletion();
7556}
7557
7558BfModule* BfModule::GetModuleFor(BfType* type)
7559{

Callers

nothing calls this directly

Calls 3

UpdateCompletionMethod · 0.80
IsIncompleteMethod · 0.45
AllocMethod · 0.45

Tested by

no test coverage detected