Author: raja
Date: 2008-02-20 02:16:39 -0500 (Wed, 20 Feb 2008)
New Revision: 96221
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/icall.c
Log:
* icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
Compute correct value, to prepare for imethod->reflection_info going away.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2008-02-20 06:53:59 UTC (rev 96220)
+++ trunk/mono/mono/metadata/ChangeLog 2008-02-20 07:16:39 UTC (rev 96221)
@@ -1,3 +1,8 @@
+2008-02-20 Raja R Harinath <[EMAIL PROTECTED]>
+
+ * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
+ Compute correct value, to prepare for imethod->reflection_info going
away.
+
2008-02-19 Zoltan Varga <[EMAIL PROTECTED]>
* class.c (mono_class_setup_vtable_general): Ignore static methods in
interfaces.
Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c 2008-02-20 06:53:59 UTC (rev 96220)
+++ trunk/mono/mono/metadata/icall.c 2008-02-20 07:16:39 UTC (rev 96221)
@@ -2711,6 +2711,7 @@
ves_icall_MonoMethod_GetGenericMethodDefinition (MonoReflectionMethod *method)
{
MonoMethodInflated *imethod;
+ MonoMethod *result;
MONO_ARCH_SAVE_REGS;
@@ -2721,12 +2722,19 @@
return NULL;
imethod = (MonoMethodInflated *) method->method;
-
if (imethod->reflection_info)
return imethod->reflection_info;
- else
- return mono_method_get_object (
- mono_object_domain (method), imethod->declaring, NULL);
+
+ result = imethod->declaring;
+ /* Not a generic method. */
+ if (!result->generic_container)
+ return NULL;
+ if (imethod->context.class_inst) {
+ MonoClass *klass = ((MonoMethod *) imethod)->klass;
+ result = mono_class_inflate_generic_method_full (result, klass,
mono_class_get_context (klass));
+ }
+
+ return mono_method_get_object (mono_object_domain (method), result,
NULL);
}
static gboolean
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches