2009-12-04 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / jit-icalls.c
index 9e893edcc5e82241f3afa5f1ff194e9e51d70fa2..6accfcbe0fde6b25e80483a106b8e57e4bde9fb5 100644 (file)
@@ -743,7 +743,7 @@ mono_class_static_field_address (MonoDomain *domain, MonoClassField *field)
 
        mono_class_init (field->parent);
 
-       vtable = mono_class_vtable (domain, field->parent);
+       vtable = mono_class_vtable_full (domain, field->parent, TRUE);
        if (!vtable->initialized)
                mono_runtime_class_init (vtable);
 
@@ -902,7 +902,6 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointe
        MonoMethod *vmethod;
        gpointer addr;
        MonoGenericContext *context = mono_method_get_context (method);
-       gboolean need_rgctx_tramp = FALSE;
 
        mono_jit_stats.generic_virtual_invocations++;
 
@@ -913,19 +912,10 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointe
        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);
 
-       if (mono_method_needs_static_rgctx_invoke (vmethod, FALSE)) {
-#ifdef MONO_ARCH_HAVE_STATIC_RGCTX_TRAMPOLINE
-               need_rgctx_tramp = TRUE;
-#else
-               vmethod = mono_marshal_get_static_rgctx_invoke (vmethod);
-#endif
-       }
        addr = mono_compile_method (vmethod);
 
-#ifdef MONO_ARCH_HAVE_STATIC_RGCTX_TRAMPOLINE
-       if (need_rgctx_tramp)
+       if (mono_method_needs_static_rgctx_invoke (vmethod, FALSE))
                addr = mono_create_static_rgctx_trampoline (vmethod, addr);
-#endif 
 
        /* Since this is a virtual call, have to unbox vtypes */
        if (obj->vtable->klass->valuetype)