Implement Write Barriers on proc_entry
This commit is contained in:
parent
705a3c69d7
commit
40e67cb20e
@ -311,7 +311,7 @@ static const rb_data_type_t proc_entry_data_type = {
|
|||||||
proc_entry_memsize,
|
proc_entry_memsize,
|
||||||
proc_entry_compact,
|
proc_entry_compact,
|
||||||
},
|
},
|
||||||
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
|
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct proc_entry *
|
static struct proc_entry *
|
||||||
@ -1875,10 +1875,10 @@ lazy_add_method(VALUE obj, int argc, VALUE *argv, VALUE args, VALUE memo,
|
|||||||
VALUE entry_obj = TypedData_Make_Struct(rb_cObject, struct proc_entry,
|
VALUE entry_obj = TypedData_Make_Struct(rb_cObject, struct proc_entry,
|
||||||
&proc_entry_data_type, entry);
|
&proc_entry_data_type, entry);
|
||||||
if (rb_block_given_p()) {
|
if (rb_block_given_p()) {
|
||||||
entry->proc = rb_block_proc();
|
RB_OBJ_WRITE(entry_obj, &entry->proc, rb_block_proc());
|
||||||
}
|
}
|
||||||
entry->fn = fn;
|
entry->fn = fn;
|
||||||
entry->memo = args;
|
RB_OBJ_WRITE(entry_obj, &entry->memo, args);
|
||||||
|
|
||||||
lazy_set_args(entry_obj, memo);
|
lazy_set_args(entry_obj, memo);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user