Author: ankit
Date: 2006-01-17 05:51:28 -0500 (Tue, 17 Jan 2006)
New Revision: 55672
Modified:
trunk/mono/mono/dis/ChangeLog
trunk/mono/mono/dis/get.c
trunk/mono/mono/dis/main.c
Log:
* 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: trunk/mono/mono/dis/ChangeLog
===================================================================
--- trunk/mono/mono/dis/ChangeLog 2006-01-17 09:40:55 UTC (rev 55671)
+++ trunk/mono/mono/dis/ChangeLog 2006-01-17 10:51:28 UTC (rev 55672)
@@ -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: trunk/mono/mono/dis/get.c
===================================================================
--- trunk/mono/mono/dis/get.c 2006-01-17 09:40:55 UTC (rev 55671)
+++ trunk/mono/mono/dis/get.c 2006-01-17 10:51:28 UTC (rev 55672)
@@ -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: trunk/mono/mono/dis/main.c
===================================================================
--- trunk/mono/mono/dis/main.c 2006-01-17 09:40:55 UTC (rev 55671)
+++ trunk/mono/mono/dis/main.c 2006-01-17 10:51:28 UTC (rev 55672)
@@ -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