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

Method GetThisType

IDEHelper/Compiler/BfResolvedTypeUtils.cpp:1122–1134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1120}
1121
1122BfType* BfMethodInstance::GetThisType()
1123{
1124 BF_ASSERT(!mMethodDef->mIsStatic);
1125 if (mMethodDef->mHasExplicitThis)
1126 {
1127 auto thisType = mParams[0].mResolvedType;
1128 auto owner = GetOwner();
1129 if ((thisType->IsValueType()) && ((mMethodDef->mIsMutating) || (!AllowsSplatting(-1))) && (!thisType->GetLoweredType(BfTypeUsage_Parameter)))
1130 return owner->mModule->mContext->mUnreifiedModule->CreatePointerType(thisType);
1131 return thisType;
1132 }
1133 return GetParamType(-1);
1134}
1135
1136int BfMethodInstance::GetThisIdx()
1137{

Callers 1

IsExactMatchMethod · 0.45

Calls 3

CreatePointerTypeMethod · 0.80
IsValueTypeMethod · 0.45
GetLoweredTypeMethod · 0.45

Tested by

no test coverage detected