res = mono_class_inflate_generic_method (res, &context);
}
- if (mono_method_needs_static_rgctx_invoke (res, FALSE))
- res = mono_marshal_get_static_rgctx_invoke (res);
+ /* An rgctx wrapper is added by the trampolines no need to do it here */
return mono_ldftn (res);
}
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);
g_assert (!vmethod->klass->generic_container);
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))
- vmethod = mono_marshal_get_static_rgctx_invoke (vmethod);
+
addr = mono_compile_method (vmethod);
+ if (mono_method_needs_static_rgctx_invoke (vmethod, FALSE))
+ addr = mono_create_static_rgctx_trampoline (vmethod, addr);
+
/* Since this is a virtual call, have to unbox vtypes */
if (obj->vtable->klass->valuetype)
*this_arg = mono_object_unbox (obj);