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

Method GetGenericParamAndReturnCount

IDEHelper/Compiler/BfModule.cpp:11436–11449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11434}
11435
11436int BfModule::GetGenericParamAndReturnCount(BfMethodInstance* methodInstance)
11437{
11438 int genericCount = 0;
11439 auto unspecializedMethodInstance = GetUnspecializedMethodInstance(methodInstance);
11440 for (int paramIdx = 0; paramIdx < unspecializedMethodInstance->GetParamCount(); paramIdx++)
11441 {
11442 auto param = unspecializedMethodInstance->GetParamType(paramIdx);
11443 if (param->IsGenericParam())
11444 genericCount++;
11445 }
11446 if (unspecializedMethodInstance->mReturnType->IsGenericParam())
11447 genericCount++;
11448 return genericCount;
11449}
11450
11451BfModule* BfModule::GetSpecializedMethodModule(const SizedArrayImpl<BfProject*>& projectList)
11452{

Callers

nothing calls this directly

Calls 3

GetParamCountMethod · 0.45
GetParamTypeMethod · 0.45
IsGenericParamMethod · 0.45

Tested by

no test coverage detected