| 812 | } |
| 813 | |
| 814 | BfMethodFlags BfMethodInstance::GetMethodFlags() |
| 815 | { |
| 816 | BfMethodFlags methodFlags = (BfMethodFlags)0; |
| 817 | |
| 818 | if (mMethodDef->mProtection == BfProtection_Protected) |
| 819 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Protected); |
| 820 | if (mMethodDef->mProtection == BfProtection_Public) |
| 821 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Public); |
| 822 | if (mMethodDef->mIsStatic) |
| 823 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Static); |
| 824 | if ((mMethodDef->mIsVirtual) || (mVirtualTableIdx != -1)) |
| 825 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Virtual); |
| 826 | if (mMethodDef->mCallingConvention == BfCallingConvention_Fastcall) |
| 827 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_FastCall); |
| 828 | if (mMethodDef->mIsMutating) |
| 829 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Mutating); |
| 830 | if (mMethodDef->mMethodType == BfMethodType_Ctor) |
| 831 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Constructor); |
| 832 | if (mMethodDef->mIsReadOnly) |
| 833 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_ReadOnly); |
| 834 | if (mMethodDef->mMethodType == BfMethodType_Mixin) |
| 835 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Mixin); |
| 836 | |
| 837 | auto callingConvention = GetOwner()->mModule->GetIRCallingConvention(this); |
| 838 | if (callingConvention == BfIRCallingConv_ThisCall) |
| 839 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_ThisCall); |
| 840 | else if (callingConvention == BfIRCallingConv_StdCall) |
| 841 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_StdCall); |
| 842 | else if (callingConvention == BfIRCallingConv_FastCall) |
| 843 | methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_FastCall); |
| 844 | |
| 845 | methodFlags = (BfMethodFlags)(methodFlags | (mMethodDef->mAppendKind * BfMethodFlags_AppendBit0)); |
| 846 | methodFlags = (BfMethodFlags)(methodFlags | (mMethodDef->mCheckedKind * BfMethodFlags_CheckedBit0)); |
| 847 | |
| 848 | return methodFlags; |
| 849 | } |
| 850 | |
| 851 | BfComptimeMethodFlags BfMethodInstance::GetComptimeMethodFlags() |
| 852 | { |
no test coverage detected