[jit] Don't emit a write barrier when writing to the delegate->method field, its...
authorZoltan Varga <vargaz@gmail.com>
Wed, 11 Jun 2014 17:09:01 +0000 (19:09 +0200)
committerZoltan Varga <vargaz@gmail.com>
Wed, 11 Jun 2014 17:09:13 +0000 (19:09 +0200)
mono/mini/method-to-ir.c

index 78c25126a41136f9a1325dbc179a66c35aef2c4d..e667acb1664d222b395ec77452d428da21591e29 100644 (file)
@@ -4526,11 +4526,6 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
        /* Set method field */
        method_ins = emit_get_rgctx_method (cfg, context_used, method, MONO_RGCTX_INFO_METHOD);
        MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, method), method_ins->dreg);
-       if (cfg->gen_write_barriers) {
-               dreg = alloc_preg (cfg);
-               EMIT_NEW_BIALU_IMM (cfg, ptr, OP_PADD_IMM, dreg, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, method));
-               emit_write_barrier (cfg, ptr, method_ins);
-       }
        /* 
         * To avoid looking up the compiled code belonging to the target method
         * in mono_delegate_trampoline (), we allocate a per-domain memory slot to