2005-02-09 Ben Maurer <bmaurer@ximian.com>
authorBen Maurer <benm@mono-cvs.ximian.com>
Thu, 10 Feb 2005 02:02:39 +0000 (02:02 -0000)
committerBen Maurer <benm@mono-cvs.ximian.com>
Thu, 10 Feb 2005 02:02:39 +0000 (02:02 -0000)
* monograph.c (print_method): Don't use method->info, as this will
be removed soon.

svn path=/trunk/mono/; revision=40362

mono/monograph/ChangeLog
mono/monograph/monograph.c

index fc5cc59bcd1cacc923deecba2c13a802fc46f425..172ae827d0b6113d41c58254de1f932030b27007 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-09  Ben Maurer  <bmaurer@ximian.com>
+
+       * monograph.c (print_method): Don't use method->info, as this will
+       be removed soon.
+
 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
 
        * monograph.c: Fix warnings.
index 52e7135d1db62456176ac78c983913c2ba6c6bb1..61615bc3ab997420e74d1daf4d029b93f11ccd10 100644 (file)
@@ -514,14 +514,20 @@ print_method (MonoMethod *method, int depth) {
        const MonoOpcode *opcode;
        MonoMethodHeader *header;
        GHashTable *hash;
+       static GHashTable *visited = NULL;
        const unsigned char *ip;
        int i;
 
        if (depth++ > max_depth)
                return;
-       if (method->info) /* avoid recursion */
+       
+       if (! visited)
+               visited = g_hash_table_new (NULL, NULL);
+       
+       if (g_hash_table_lookup (visited, method))
                return;
-       method->info = method;
+       
+       g_hash_table_insert (visited, method, method);
 
        if (method->iflags & (METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL | METHOD_IMPL_ATTRIBUTE_RUNTIME))
                return;