Commit 7872d297 authored by Narihiro Nakamura's avatar Narihiro Nakamura

These places need the write barrier

parent ba9ca03e
......@@ -710,6 +710,7 @@ mrb_mod_cv_set(mrb_state *mrb, struct RClass * c, mrb_sym sym, mrb_value v)
iv_tbl *t = c->iv;
if (iv_get(mrb, t, sym, NULL)) {
mrb_write_barrier(mrb, (struct RBasic*)c);
iv_put(mrb, t, sym, v);
return;
}
......@@ -721,6 +722,7 @@ mrb_mod_cv_set(mrb_state *mrb, struct RClass * c, mrb_sym sym, mrb_value v)
cls->iv = iv_new(mrb);
}
mrb_write_barrier(mrb, (struct RBasic*)cls);
iv_put(mrb, cls->iv, sym, v);
}
......@@ -771,6 +773,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
iv_tbl *t = c->iv;
if (iv_get(mrb, t, sym, NULL)) {
mrb_write_barrier(mrb, (struct RBasic*)c);
iv_put(mrb, t, sym, v);
return;
}
......@@ -781,6 +784,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
if (!c->iv) {
c->iv = iv_new(mrb);
}
mrb_write_barrier(mrb, (struct RBasic*)c);
iv_put(mrb, c->iv, sym, v);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment