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

Method CreatePointerType

IDEHelper/Compiler/BfModuleTypeUtils.cpp:7792–7817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7790}
7791
7792BfPointerType* BfModule::CreatePointerType(BfType* resolvedType)
7793{
7794 BF_ASSERT(!resolvedType->IsVar());
7795
7796 auto pointerType = mContext->mPointerTypePool.Get();
7797 pointerType->mContext = mContext;
7798 pointerType->mElementType = resolvedType;
7799 auto resolvedPointerType = (BfPointerType*)ResolveType(pointerType);
7800 if (resolvedPointerType != pointerType)
7801 {
7802 mContext->mPointerTypePool.GiveBack(pointerType);
7803 }
7804 else
7805 {
7806 if (resolvedType->IsDeleting())
7807 {
7808 mCompiler->RequestExtraCompile();
7809 InternalError("CreatePointerType using deleted type");
7810 mContext->DeleteType(resolvedPointerType);
7811 }
7812 }
7813
7814 BF_ASSERT(resolvedPointerType->mElementType == resolvedType);
7815
7816 return resolvedPointerType;
7817}
7818
7819BfConstExprValueType* BfModule::CreateConstExprValueType(const BfTypedValue& typedValue, bool allowCreate)
7820{

Callers 15

ReflectInitMethod · 0.80
EmitTestMethodMethod · 0.80
CreateVDataMethod · 0.80
GetLiteralMethod · 0.80
LookupIdentifierMethod · 0.80
LoadFieldMethod · 0.80
CreateCallMethod · 0.80
SplatArgsMethod · 0.80
PushArgMethod · 0.80
CheckEnumCreationMethod · 0.80

Calls 6

GiveBackMethod · 0.80
IsDeletingMethod · 0.80
RequestExtraCompileMethod · 0.80
DeleteTypeMethod · 0.80
IsVarMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected