Author: raja
Date: 2005-11-28 06:31:22 -0500 (Mon, 28 Nov 2005)
New Revision: 53546

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/loader.c
Log:
* loader.c (method_from_memberref): Don't use the current context
when parsing signatures.
(method_from_methodspec, mono_get_method_from_token): Update to changes.


Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2005-11-28 11:24:12 UTC (rev 53545)
+++ trunk/mono/mono/metadata/ChangeLog  2005-11-28 11:31:22 UTC (rev 53546)
@@ -1,5 +1,9 @@
 2005-11-28  Raja R Harinath  <[EMAIL PROTECTED]>
 
+       * loader.c (method_from_memberref): Don't use the current context
+       when parsing signatures.
+       (method_from_methodspec, mono_get_method_from_token): Update to changes.
+
        * metadata.c (do_mono_metadata_parse_generic_class): Avoid
        side-effects in g_assert.
        * loader.c (mono_get_method_from_token): Resolve klass earlier so

Modified: trunk/mono/mono/metadata/loader.c
===================================================================
--- trunk/mono/mono/metadata/loader.c   2005-11-28 11:24:12 UTC (rev 53545)
+++ trunk/mono/mono/metadata/loader.c   2005-11-28 11:31:22 UTC (rev 53546)
@@ -471,9 +471,9 @@
 }
 
 static MonoMethod *
-method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext 
*context,
-                      MonoGenericContext *typespec_context)
+method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext 
*typespec_context)
 {
+       MonoGenericContext *context = NULL;
        MonoClass *klass = NULL;
        MonoMethod *method = NULL;
        MonoTableInfo *tables = image->tables;
@@ -542,10 +542,8 @@
         * `typespec_context' and thus `klass' may have different generic 
instantiations.
         *
         * After parsing the `klass', we have to distinguish two cases:
-        * Either this class introduces new type parameters (or a new generic 
instantiation)
-        * or it does not.  If it does, we parse the signature in this new 
context; otherwise
-        * we parse it in the current context.
-        *
+        * If this class introduces new type parameters (or a new generic 
instantiation)
+        * we parse the signature in this new context.
         */
        if (klass->generic_class)
                context = klass->generic_class->context;
@@ -695,7 +693,7 @@
        if ((token & MONO_METHODDEFORREF_MASK) == MONO_METHODDEFORREF_METHODDEF)
                method = mono_get_method_full (image, MONO_TOKEN_METHOD_DEF | 
nindex, NULL, context);
        else
-               method = method_from_memberref (image, nindex, container, 
context);
+               method = method_from_memberref (image, nindex, context);
 
        method = mono_get_inflated_method (method);
 
@@ -1128,7 +1126,7 @@
                if (table != MONO_TABLE_MEMBERREF)
                        g_print("got wrong token: 0x%08x\n", token);
                g_assert (table == MONO_TABLE_MEMBERREF);
-               result = method_from_memberref (image, idx, context, context);
+               result = method_from_memberref (image, idx, context);
 
                return result;
        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to