2010-02-07 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / aot-runtime.c
index abd9a4dc4622403cbdd3aafbaf06a6c6e3559a1e..9c8fdc07d8897868a711bc739bff5634f9648d8f 100644 (file)
@@ -586,6 +586,9 @@ decode_method_ref (MonoAotModule *module, guint32 *token, MonoMethod **method, g
                        *method = mono_gc_get_managed_allocator_by_type (atype);
                        break;
                }
+               case MONO_WRAPPER_WRITE_BARRIER:
+                       *method = mono_gc_get_write_barrier ();
+                       break;
                case MONO_WRAPPER_STELEMREF:
                        *method = mono_marshal_get_stelemref ();
                        break;
@@ -2520,10 +2523,15 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
                if (mono_jit_stats.methods_aot >= mono_last_aot_method)
                                return NULL;
                else if (mono_jit_stats.methods_aot == mono_last_aot_method - 1) {
-                       if (method)
-                               printf ("LAST AOT METHOD: %s%s%s.%s.\n", method->klass->name_space, method->klass->name_space [0] ? "." : "", method->klass->name, method->name);
-                       else
+                       if (!method)
+                               method = mono_get_method (image, token, NULL);
+                       if (method) {
+                               char *name = mono_method_full_name (method, TRUE);
+                               printf ("LAST AOT METHOD: %s.\n", name);
+                               g_free (name);
+                       } else {
                                printf ("LAST AOT METHOD: %p %d\n", code, method_index);
+                       }
                }
        }