2007-10-19 Marek Habersack <mhabersack@novell.com>
[mono.git] / mono / mini / jit-icalls.c
index c41997b0fb27b665922c248dac8de3447a2859ba..300aa729adf569711448fdf310f780cff6039cd4 100644 (file)
@@ -786,6 +786,8 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, MonoGen
        MonoMethod *vmethod, *inflated;
        gpointer addr;
 
+       mono_jit_stats.generic_virtual_invocations++;
+
        if (obj == NULL)
                mono_raise_exception (mono_get_exception_null_reference ());
        vmethod = mono_object_get_virtual_method (obj, method);
@@ -797,10 +799,9 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, MonoGen
           the same context.
        */
        g_assert (!vmethod->klass->generic_container);
-       g_assert (!vmethod->klass->generic_class || !vmethod->klass->generic_class->inst->is_open);
-       g_assert (!context->gmethod || !context->gmethod->inst->is_open);
+       g_assert (!vmethod->klass->generic_class || !vmethod->klass->generic_class->context.class_inst->is_open);
+       g_assert (!context->method_inst || !context->method_inst->is_open);
        inflated = mono_class_inflate_generic_method (vmethod, context);
-       inflated = mono_get_inflated_method (inflated);
        addr = mono_compile_method (inflated);
 
        /* Since this is a virtual call, have to unbox vtypes */