From 9b02604cc685b059dcddbb2d3a2cb861665a9921 Mon Sep 17 00:00:00 2001 From: Alexander Kyte Date: Wed, 4 Jan 2017 17:00:34 -0500 Subject: [PATCH] [llvmonly] Use right IMT slow path for lazy array interfaces (#4199) --- mono/mini/method-to-ir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c index 6a72b4cad07..b6aa5b538cb 100644 --- a/mono/mini/method-to-ir.c +++ b/mono/mini/method-to-ir.c @@ -7009,6 +7009,7 @@ emit_llvmonly_virtual_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig gboolean variant_iface = FALSE; guint32 slot; int offset; + gboolean special_array_interface = cmethod->klass->is_array_special_interface; /* * In llvm-only mode, vtables contain function descriptors instead of @@ -7067,7 +7068,7 @@ emit_llvmonly_virtual_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig return emit_extra_arg_calli (cfg, fsig, sp, arg_reg, call_target); } - if (!fsig->generic_param_count && is_iface && !variant_iface && !is_gsharedvt) { + if (!fsig->generic_param_count && is_iface && !variant_iface && !is_gsharedvt && !special_array_interface) { /* * A simple interface call * @@ -7106,7 +7107,7 @@ emit_llvmonly_virtual_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig return emit_llvmonly_calli (cfg, fsig, sp, ftndesc_ins); } - if ((fsig->generic_param_count || variant_iface) && !is_gsharedvt) { + if ((fsig->generic_param_count || variant_iface || special_array_interface) && !is_gsharedvt) { /* * This is similar to the interface case, the vtable slot points to an imt thunk which is * dynamically extended as more instantiations are discovered. -- 2.25.1