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

Method CheckFunctionKind

IDEHelper/Compiler/CeMachine.cpp:10047–10412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10045}
10046
10047void CeMachine::CheckFunctionKind(CeFunction* ceFunction)
10048{
10049 ceFunction->mFunctionKind = CeFunctionKind_Normal;
10050
10051 if (ceFunction->mMethodInstance != NULL)
10052 {
10053 auto methodDef = ceFunction->mMethodInstance->mMethodDef;
10054 if (methodDef->mIsExtern)
10055 {
10056 ceFunction->mFunctionKind = CeFunctionKind_Extern;
10057
10058 auto owner = ceFunction->mMethodInstance->GetOwner();
10059 if (owner == mCeModule->mContext->mBfObjectType)
10060 {
10061 if (methodDef->mName == "Comptime_GetType")
10062 {
10063 ceFunction->mFunctionKind = CeFunctionKind_GetReflectType;
10064 }
10065 }
10066 else if (owner->IsInstanceOf(mCeModule->mCompiler->mTypeTypeDef))
10067 {
10068 if (methodDef->mName == "Comptime_GetTypeDeclarationById")
10069 {
10070 ceFunction->mFunctionKind = CeFunctionKind_GetReflectTypeDeclById;
10071 }
10072 if (methodDef->mName == "Comptime_GetTypeDeclarationByName")
10073 {
10074 ceFunction->mFunctionKind = CeFunctionKind_GetReflectTypeDeclByName;
10075 }
10076 else if (methodDef->mName == "Comptime_GetNextTypeDeclaration")
10077 {
10078 ceFunction->mFunctionKind = CeFunctionKind_GetReflectNextTypeDecl;
10079 }
10080 else if (methodDef->mName == "Comptime_Type_GetBaseType")
10081 {
10082 ceFunction->mFunctionKind = CeFunctionKind_GetBaseType;
10083 }
10084 else if (methodDef->mName == "Comptime_Type_HasDeclaredMember")
10085 {
10086 ceFunction->mFunctionKind = CeFunctionKind_HasDeclaredMember;
10087 }
10088 else if (methodDef->mName == "Comptime_GetTypeById")
10089 {
10090 ceFunction->mFunctionKind = CeFunctionKind_GetReflectTypeById;
10091 }
10092 else if (methodDef->mName == "Comptime_GetWrappedType")
10093 {
10094 ceFunction->mFunctionKind = CeFunctionKind_GetWrappedType;
10095 }
10096 else if (methodDef->mName == "Comptime_GetTypeByName")
10097 {
10098 ceFunction->mFunctionKind = CeFunctionKind_GetReflectTypeByName;
10099 }
10100 else if (methodDef->mName == "Comptime_GetSpecializedType")
10101 {
10102 ceFunction->mFunctionKind = CeFunctionKind_GetReflectSpecializedType;
10103 }
10104 else if (methodDef->mName == "Comptime_Type_ToString")

Callers 1

BuildMethod · 0.80

Calls 3

GetOwnerMethod · 0.45
IsInstanceOfMethod · 0.45
GetParamCountMethod · 0.45

Tested by

no test coverage detected