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

Method GetRawMethodByName

IDEHelper/Compiler/BfModule.cpp:11367–11393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11365}
11366
11367BfMethodInstance* BfModule::GetRawMethodByName(BfTypeInstance* typeInstance, const StringImpl& methodName, int paramCount, bool checkBase, bool allowMixin)
11368{
11369 PopulateType(typeInstance, BfPopulateType_DataAndMethods);
11370
11371 while (typeInstance != NULL)
11372 {
11373 typeInstance->mTypeDef->PopulateMemberSets();
11374 BfMemberSetEntry* entry = NULL;
11375 BfMethodDef* methodDef = NULL;
11376 if (typeInstance->mTypeDef->mMethodSet.TryGetWith(methodName, &entry))
11377 methodDef = (BfMethodDef*)entry->mMemberDef;
11378
11379 while (methodDef != NULL)
11380 {
11381 if (((allowMixin) || (methodDef->mMethodType != BfMethodType_Mixin)) &&
11382 (methodDef->mGenericParams.size() == 0) &&
11383 ((paramCount == -1) || (paramCount == (int)methodDef->mParams.size())))
11384 return GetRawMethodInstance(typeInstance, methodDef);
11385 methodDef = methodDef->mNextWithSameName;
11386 }
11387
11388 if (!checkBase)
11389 break;
11390 typeInstance = typeInstance->mBaseType;
11391 }
11392 return NULL;
11393}
11394
11395BfMethodInstance* BfModule::GetUnspecializedMethodInstance(BfMethodInstance* methodInstance, bool useUnspecializedType)
11396{

Callers 2

InferGenericArgumentMethod · 0.80
CreateObjectMethod · 0.80

Calls 3

PopulateMemberSetsMethod · 0.80
TryGetWithMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected