Author: ankit
Date: 2006-01-17 06:08:05 -0500 (Tue, 17 Jan 2006)
New Revision: 55673

Modified:
   branches/mono-1-1-13/mono/mono/dis/ChangeLog
   branches/mono-1-1-13/mono/mono/dis/get.c
   branches/mono-1-1-13/mono/mono/dis/main.c
Log:
Backporting r55672.

* get.c (get_method_override): Use '.override method' syntax if the class or
or the method itself is generic.
* main.c (dis_code): Emit '.override' only, 'method' gets handled by 
get_method_override.


Modified: branches/mono-1-1-13/mono/mono/dis/ChangeLog
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/ChangeLog        2006-01-17 10:51:28 UTC 
(rev 55672)
+++ branches/mono-1-1-13/mono/mono/dis/ChangeLog        2006-01-17 11:08:05 UTC 
(rev 55673)
@@ -1,5 +1,11 @@
 2006-01-17  Ankit Jain  <[EMAIL PROTECTED]>
 
+       * get.c (get_method_override): Use '.override method' syntax if the 
class or
+       or the method itself is generic.
+       * main.c (dis_code): Emit '.override' only, 'method' gets handled by 
get_method_override.
+
+2006-01-17  Ankit Jain  <[EMAIL PROTECTED]>
+
        * get.c (init_key_table): Add keywords 'bestfit', 'charmaperror', 'off' 
& 'on'.
 
 2006-01-16  Ankit Jain  <[EMAIL PROTECTED]>

Modified: branches/mono-1-1-13/mono/mono/dis/get.c
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/get.c    2006-01-17 10:51:28 UTC (rev 
55672)
+++ branches/mono-1-1-13/mono/mono/dis/get.c    2006-01-17 11:08:05 UTC (rev 
55673)
@@ -2967,8 +2967,24 @@
                impl = method_dor_to_token (cols [MONO_METHODIMPL_BODY]);
                decl = method_dor_to_token (cols [MONO_METHODIMPL_DECLARATION]);
 
-               if (token == impl)
-                       return get_method_core (m, decl, TRUE, context);
+               if (token == impl) {
+                       MonoMethod *mh = NULL;
+                       mh = mono_get_method_full (m, decl, NULL, context);
+                       mh = mono_get_inflated_method (mh);
+
+                       if ((mh && (mh->is_inflated || mh->generic_container)) 
|| 
+                           (mh->klass && (mh->klass->generic_class || 
mh->klass->generic_container))) {
+                               char *meth_str;
+                               char *ret;
+                               
+                               meth_str = get_method_core (m, decl, TRUE, 
context);
+                               ret = g_strdup_printf ("method %s", meth_str);
+                               g_free (meth_str);
+                               return ret;
+                       } else {
+                               return get_method_core (m, decl, FALSE, 
context);
+                       }
+               }
        }
 
        return NULL;

Modified: branches/mono-1-1-13/mono/mono/dis/main.c
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/main.c   2006-01-17 10:51:28 UTC (rev 
55672)
+++ branches/mono-1-1-13/mono/mono/dis/main.c   2006-01-17 11:08:05 UTC (rev 
55673)
@@ -679,7 +679,7 @@
 
        override = get_method_override (m, token, context);
        if (override) {
-               fprintf (output, "\t.override method %s\n", override);
+               fprintf (output, "\t.override %s\n", override);
                g_free (override);
        }
 

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

Reply via email to