Author: ankit
Date: 2006-01-17 04:21:16 -0500 (Tue, 17 Jan 2006)
New Revision: 55670

Added:
   branches/mono-1-1-13/mono/mono/dis/tests/gen-type.cs
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
   branches/mono-1-1-13/mono/mono/dis/tests/Changelog
Log:
Backporting fixes for mono/dis (r55667)

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]>

        * get.c (get_method_core): Handle a MemberRef with a TypeSpec parent.
        Inflate MonoMethod after getting it from mono_get_method_full.

2006-01-15  Ankit Jain  <[EMAIL PROTECTED]>

        * get.c (get_method_override): Get full signature of the method.
        * main.c (dis_code): Emit ".override method" for full signature
        of the method.



Modified: branches/mono-1-1-13/mono/mono/dis/ChangeLog
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/ChangeLog        2006-01-17 09:19:03 UTC 
(rev 55669)
+++ branches/mono-1-1-13/mono/mono/dis/ChangeLog        2006-01-17 09:21:16 UTC 
(rev 55670)
@@ -1,3 +1,18 @@
+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]>
+
+       * get.c (get_method_core): Handle a MemberRef with a TypeSpec parent.
+       Inflate MonoMethod after getting it from mono_get_method_full.
+
+2006-01-15  Ankit Jain  <[EMAIL PROTECTED]>
+
+       * get.c (get_method_override): Get full signature of the method.
+       * main.c (dis_code): Emit ".override method" for full signature
+       of the method.
+
 2006-01-06  Ankit Jain  <[EMAIL PROTECTED]>
 
        * get.c (get_generic_param): Generic param attributes can be any 
combination

Modified: branches/mono-1-1-13/mono/mono/dis/get.c
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/get.c    2006-01-17 09:19:03 UTC (rev 
55669)
+++ branches/mono-1-1-13/mono/mono/dis/get.c    2006-01-17 09:21:16 UTC (rev 
55670)
@@ -1831,6 +1831,7 @@
 
        mh = mono_get_method_full (m, token, NULL, context);
        if (mh) {
+               mh = mono_get_inflated_method (mh);
                if (mono_method_signature (mh)->is_inflated)
                        context = ((MonoMethodInflated *) mh)->context;
                esname = get_escaped_name (mh->name);
@@ -2543,6 +2544,7 @@
        g_hash_table_insert (key_table, (char *) "autochar", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "auto", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "beforefieldinit", 
GINT_TO_POINTER (TRUE));
+       g_hash_table_insert (key_table, (char *) "bestfit", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "beq", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "beq.s", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "bge", GINT_TO_POINTER (TRUE));
@@ -2597,6 +2599,7 @@
        g_hash_table_insert (key_table, (char *) "cgt", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "cgt.un", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "char", GINT_TO_POINTER 
(TRUE));
+       g_hash_table_insert (key_table, (char *) "charmaperror", 
GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "cil", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "ckfinite", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "class", GINT_TO_POINTER 
(TRUE));
@@ -2818,6 +2821,8 @@
        g_hash_table_insert (key_table, (char *) "nullref", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "object", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "objectref", GINT_TO_POINTER 
(TRUE));
+       g_hash_table_insert (key_table, (char *) "off", GINT_TO_POINTER (TRUE));
+       g_hash_table_insert (key_table, (char *) "on", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "opt", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "optil", GINT_TO_POINTER 
(TRUE));
        g_hash_table_insert (key_table, (char *) "or", GINT_TO_POINTER (TRUE));
@@ -2963,7 +2968,7 @@
                decl = method_dor_to_token (cols [MONO_METHODIMPL_DECLARATION]);
 
                if (token == impl)
-                       return get_method_core (m, decl, FALSE, context);
+                       return get_method_core (m, decl, TRUE, 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 09:19:03 UTC (rev 
55669)
+++ branches/mono-1-1-13/mono/mono/dis/main.c   2006-01-17 09:21:16 UTC (rev 
55670)
@@ -679,7 +679,7 @@
 
        override = get_method_override (m, token, context);
        if (override) {
-               fprintf (output, "\t.override %s\n", override);
+               fprintf (output, "\t.override method %s\n", override);
                g_free (override);
        }
 

Modified: branches/mono-1-1-13/mono/mono/dis/tests/Changelog
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/tests/Changelog  2006-01-17 09:19:03 UTC 
(rev 55669)
+++ branches/mono-1-1-13/mono/mono/dis/tests/Changelog  2006-01-17 09:21:16 UTC 
(rev 55670)
@@ -1,3 +1,8 @@
+2006-01-16  Ankit Jain  <[EMAIL PROTECTED]>
+
+       * gen-type.cs: New test case for handling a MemberRef with
+       a TypeSpec parent.
+
 2005-11-23  Ankit Jain  <[EMAIL PROTECTED]>
 
        * gen-cattr.cs: New test case for custom attributes on

Added: branches/mono-1-1-13/mono/mono/dis/tests/gen-type.cs
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/tests/gen-type.cs        2006-01-17 
09:19:03 UTC (rev 55669)
+++ branches/mono-1-1-13/mono/mono/dis/tests/gen-type.cs        2006-01-17 
09:21:16 UTC (rev 55670)
@@ -0,0 +1,16 @@
+// Test for a MemberRef with a TypeSpec parent
+
+class g<T>
+{
+       public void foo <A> (A _a)
+       {
+       }
+}
+
+class test {
+       public static void Main ()
+       {
+               g<int> _g = new g<int> ();
+               _g.foo ("abc");
+       }
+}

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

Reply via email to