/**
* mono_marshal_get_isinst_with_cache:
- * This does the equivalent of \c mono_object_isinst_with_cache.
+ * This does the equivalent of \c mono_marshal_isinst_with_cache.
*/
MonoMethod *
mono_marshal_get_isinst_with_cache (void)
break;
case STELEMREF_CLASS: {
- int b_fast;
-
/*
the method:
<ldelema (bound check)>
/* vklass = value->vtable->klass */
load_value_class (mb, vklass);
- /* fastpath */
- mono_mb_emit_ldloc (mb, vklass);
- mono_mb_emit_ldloc (mb, aklass);
- b_fast = mono_mb_emit_branch (mb, CEE_BEQ);
-
- /*if (mono_object_isinst (value, aklass)) */
- mono_mb_emit_ldarg (mb, 2);
- mono_mb_emit_ldloc (mb, aklass);
- mono_mb_emit_icall (mb, mono_object_isinst_icall);
- b2 = mono_mb_emit_branch (mb, CEE_BRFALSE);
-
/* if (vklass->idepth < aklass->idepth) goto failue */
mono_mb_emit_ldloc (mb, vklass);
mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
/* do_store: */
mono_mb_patch_branch (mb, b1);
- mono_mb_patch_branch (mb, b_fast);
mono_mb_emit_ldloc (mb, array_slot_addr);
mono_mb_emit_ldarg (mb, 2);
mono_mb_emit_byte (mb, CEE_STIND_REF);
mono_mb_emit_byte (mb, CEE_RET);
/* do_exception: */
- mono_mb_patch_branch (mb, b2);
mono_mb_patch_branch (mb, b3);
mono_mb_patch_branch (mb, b4);