"mono_aot_init_gshared_method_this",
"mono_aot_init_gshared_method_rgctx",
"mono_llvm_throw_corlib_exception",
- "mono_resolve_vcall",
"mono_init_vtable_slot",
"mono_helper_ldstr_mscorlib"
};
* resolve_iface_call:
*
* Return the executable code for the iface method IMT_METHOD called on THIS.
+ * This function is called on a slowpath, so it doesn't need to be fast.
*/
static gpointer
resolve_iface_call (MonoObject *this_obj, int imt_slot, MonoMethod *imt_method, gpointer *out_arg, gboolean caller_gsharedvt)
gpointer addr, compiled_method, aot_addr;
gboolean need_rgctx_tramp = FALSE, need_unbox_tramp = FALSE;
- // FIXME: Optimize this
-
if (!this_obj)
/* The caller will handle it */
return NULL;
return addr;
}
-gpointer
-mono_resolve_iface_call (MonoObject *this_obj, int imt_slot, MonoMethod *imt_method, gpointer *out_arg)
-{
- return resolve_iface_call (this_obj, imt_slot, imt_method, out_arg, FALSE);
-}
-
gpointer
mono_resolve_iface_call_gsharedvt (MonoObject *this_obj, int imt_slot, MonoMethod *imt_method, gpointer *out_arg)
{
* resolve_vcall:
*
* Return the executable code for calling vt->vtable [slot].
+ * This function is called on a slowpath, so it doesn't need to be fast.
*/
static gpointer
resolve_vcall (MonoVTable *vt, int slot, MonoMethod *imt_method, gpointer *out_arg, gboolean gsharedvt)
gpointer addr, compiled_method;
gboolean need_unbox_tramp = FALSE;
- // FIXME: Optimize this
-
/* Same as in common_call_trampoline () */
/* Avoid loading metadata or creating a generic vtable if possible */
addr = mini_add_method_wrappers_llvmonly (m, addr, FALSE, need_unbox_tramp, out_arg);
- // FIXME: Unify this with mono_resolve_iface_call
-
if (gsharedvt) {
/*
* The callee uses the gsharedvt calling convention, have to add an out wrapper.
return addr;
}
-gpointer
-mono_resolve_vcall (MonoObject *this_obj, int slot, MonoMethod *imt_method, gpointer *out_rgctx_arg)
-{
- g_assert (this_obj);
-
- return resolve_vcall (this_obj->vtable, slot, imt_method, out_rgctx_arg, FALSE);
-}
-
gpointer
mono_resolve_vcall_gsharedvt (MonoObject *this_obj, int slot, MonoMethod *imt_method, gpointer *out_rgctx_arg)
{
gpointer mono_fill_method_rgctx (MonoMethodRuntimeGenericContext *mrgctx, int index);
-gpointer mono_resolve_iface_call (MonoObject *this_obj, int imt_slot, MonoMethod *imt_method, gpointer *out_arg);
-
-gpointer mono_resolve_vcall (MonoObject *this_obj, int slot, MonoMethod *imt_method, gpointer *out_arg);
-
gpointer mono_resolve_iface_call_gsharedvt (MonoObject *this_obj, int imt_slot, MonoMethod *imt_method, gpointer *out_arg);
gpointer mono_resolve_vcall_gsharedvt (MonoObject *this_obj, int imt_slot, MonoMethod *imt_method, gpointer *out_arg);
icall_args [2] = emit_get_rgctx_method (cfg, context_used,
cmethod, MONO_RGCTX_INFO_METHOD);
- // FIXME: For generic virtual calls, avoid computing the rgctx twice
-
arg_reg = alloc_preg (cfg);
MONO_EMIT_NEW_PCONST (cfg, arg_reg, NULL);
EMIT_NEW_VARLOADA_VREG (cfg, icall_args [3], arg_reg, &mono_defaults.int_class->byval_arg);
- if (is_gsharedvt) {
- if (is_iface)
- call_target = mono_emit_jit_icall (cfg, mono_resolve_iface_call_gsharedvt, icall_args);
- else
- call_target = mono_emit_jit_icall (cfg, mono_resolve_vcall_gsharedvt, icall_args);
- } else {
- if (is_iface)
- call_target = mono_emit_jit_icall (cfg, mono_resolve_iface_call, icall_args);
- else
- call_target = mono_emit_jit_icall (cfg, mono_resolve_vcall, icall_args);
- }
+ g_assert (is_gsharedvt);
+ if (is_iface)
+ call_target = mono_emit_jit_icall (cfg, mono_resolve_iface_call_gsharedvt, icall_args);
+ else
+ call_target = mono_emit_jit_icall (cfg, mono_resolve_vcall_gsharedvt, icall_args);
/*
* Pass the extra argument even if the callee doesn't receive it, most
register_icall (mono_aot_init_gshared_method_this, "mono_aot_init_gshared_method_this", "void ptr int object", TRUE);
register_icall (mono_aot_init_gshared_method_rgctx, "mono_aot_init_gshared_method_rgctx", "void ptr int ptr", TRUE);
- register_icall_no_wrapper (mono_resolve_iface_call, "mono_resolve_iface_call", "ptr object int ptr ptr");
- register_icall_no_wrapper (mono_resolve_vcall, "mono_resolve_vcall", "ptr object int ptr ptr");
register_icall_no_wrapper (mono_resolve_iface_call_gsharedvt, "mono_resolve_iface_call_gsharedvt", "ptr object int ptr ptr");
register_icall_no_wrapper (mono_resolve_vcall_gsharedvt, "mono_resolve_vcall_gsharedvt", "ptr object int ptr ptr");
register_icall_no_wrapper (mono_resolve_generic_virtual_call, "mono_resolve_generic_virtual_call", "ptr ptr int ptr");