| 857 | } |
| 858 | |
| 859 | void BfMethodInstance::UndoDeclaration(bool keepIRFunction) |
| 860 | { |
| 861 | if (mMethodInfoEx != NULL) |
| 862 | { |
| 863 | for (auto genericParam : mMethodInfoEx->mGenericParams) |
| 864 | genericParam->Release(); |
| 865 | mMethodInfoEx->mGenericParams.Clear(); |
| 866 | delete mMethodInfoEx->mMethodCustomAttributes; |
| 867 | mMethodInfoEx->mMethodCustomAttributes = NULL; |
| 868 | mMethodInfoEx->mGenericTypeBindings.Clear(); |
| 869 | } |
| 870 | |
| 871 | mReturnType = NULL; |
| 872 | if (!keepIRFunction) |
| 873 | mIRFunction = BfIRValue(); |
| 874 | mParams.Clear(); |
| 875 | |
| 876 | mDefaultValues.Clear(); |
| 877 | if (mMethodProcessRequest != NULL) |
| 878 | { |
| 879 | BF_ASSERT(mMethodProcessRequest->mMethodInstance == this); |
| 880 | mMethodProcessRequest->mMethodInstance = NULL; |
| 881 | } |
| 882 | mHasStartedDeclaration = false; |
| 883 | mHasBeenDeclared = false; |
| 884 | mHasBeenProcessed = false; |
| 885 | mIsUnspecialized = false; |
| 886 | mIsUnspecializedVariation = false; |
| 887 | mDisallowCalling = false; |
| 888 | mIsIntrinsic = false; |
| 889 | mHasFailed = false; |
| 890 | mFailedConstraints = false; |
| 891 | } |
| 892 | |
| 893 | BfTypeInstance* BfMethodInstance::GetOwner() |
| 894 | { |
no test coverage detected