{
if (!IsGenericMethodPointer(functionPointerA))
{
- IntPtr codeTargetA = RuntimeAugments.GetCodeTarget(functionPointerA);
- IntPtr codeTargetB = RuntimeAugments.GetCodeTarget(functionPointerB);
- return codeTargetA == codeTargetB;
+ return functionPointerA == functionPointerB;
}
- else
+
+ if (!IsGenericMethodPointer(functionPointerB))
{
- if (!IsGenericMethodPointer(functionPointerB))
- return false;
+ return false;
+ }
- GenericMethodDescriptor* pointerDefA = ConvertToGenericDescriptor(functionPointerA);
- GenericMethodDescriptor* pointerDefB = ConvertToGenericDescriptor(functionPointerB);
+ GenericMethodDescriptor* pointerDefA = ConvertToGenericDescriptor(functionPointerA);
+ GenericMethodDescriptor* pointerDefB = ConvertToGenericDescriptor(functionPointerB);
- if (pointerDefA->InstantiationArgument != pointerDefB->InstantiationArgument)
- return false;
-
- IntPtr codeTargetA = RuntimeAugments.GetCodeTarget(pointerDefA->MethodFunctionPointer);
- IntPtr codeTargetB = RuntimeAugments.GetCodeTarget(pointerDefB->MethodFunctionPointer);
- return codeTargetA == codeTargetB;
+ if (pointerDefA->InstantiationArgument != pointerDefB->InstantiationArgument)
+ {
+ return false;
}
+
+ return pointerDefA->MethodFunctionPointer == pointerDefB->MethodFunctionPointer;
}
}
}