| 14341 | } |
| 14342 | |
| 14343 | void BfModule::AddMethodReference(const BfMethodRef& methodRef, BfGetMethodInstanceFlags flags) |
| 14344 | { |
| 14345 | BfMethodInstance* methodInstance = methodRef; |
| 14346 | |
| 14347 | if ((mCurTypeInstance != NULL) && (!mCompiler->IsAutocomplete())) |
| 14348 | { |
| 14349 | auto methodInstanceGroup = methodInstance->mMethodInstanceGroup; |
| 14350 | if ((methodInstance->IsSpecializedGenericMethod()) || (methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_AlwaysInclude)) |
| 14351 | { |
| 14352 | BF_ASSERT(!methodRef.mTypeInstance->IsFunction()); |
| 14353 | |
| 14354 | // This ensures we rebuild - there are some cases where we get a method reference but never call it, so this is required here |
| 14355 | AddDependency(methodInstance->GetOwner(), mCurTypeInstance, BfDependencyMap::DependencyFlag_Calls); |
| 14356 | |
| 14357 | BfMethodRef methodRef = methodInstance; |
| 14358 | BfSpecializedMethodRefInfo* specializedMethodRefInfo = NULL; |
| 14359 | bool isNew = mCurTypeInstance->mSpecializedMethodReferences.TryAdd(methodRef, NULL, &specializedMethodRefInfo); |
| 14360 | |
| 14361 | if (((flags & BfGetMethodInstanceFlag_Unreified) == 0) && |
| 14362 | ((flags & BfGetMethodInstanceFlag_NoForceReification) == 0) && |
| 14363 | (mIsReified)) |
| 14364 | { |
| 14365 | specializedMethodRefInfo->mHasReifiedRef = true; |
| 14366 | } |
| 14367 | } |
| 14368 | } |
| 14369 | } |
| 14370 | |
| 14371 | BfModuleMethodInstance BfModule::ReferenceExternalMethodInstance(BfMethodInstance* methodInstance, BfGetMethodInstanceFlags flags) |
| 14372 | { |
nothing calls this directly
no test coverage detected