mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
No longer need to insert write barriers for fibers.
Those barriers are inserted to fix #3699 but all living fibers are marked from `mark_context()` anyway now.
This commit is contained in:
@@ -175,9 +175,6 @@ fiber_check_cfunc(mrb_state *mrb, struct mrb_context *c)
|
||||
static void
|
||||
fiber_switch_context(mrb_state *mrb, struct mrb_context *c)
|
||||
{
|
||||
if (mrb->c->fib) {
|
||||
mrb_write_barrier(mrb, (struct RBasic*)mrb->c->fib);
|
||||
}
|
||||
c->status = MRB_FIBER_RUNNING;
|
||||
mrb->c = c;
|
||||
}
|
||||
|
||||
@@ -948,12 +948,7 @@ mrb_vm_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int stac
|
||||
if (c->ci - c->cibase > cioff) {
|
||||
c->ci = c->cibase + cioff;
|
||||
}
|
||||
if (mrb->c != c) {
|
||||
if (mrb->c->fib) {
|
||||
mrb_write_barrier(mrb, (struct RBasic*)mrb->c->fib);
|
||||
}
|
||||
mrb->c = c;
|
||||
}
|
||||
mrb->c = c;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1945,9 +1940,6 @@ RETRY_TRY_BLOCK:
|
||||
while (c->eidx > ci->epos) {
|
||||
ecall_adjust();
|
||||
}
|
||||
if (c->fib) {
|
||||
mrb_write_barrier(mrb, (struct RBasic*)c->fib);
|
||||
}
|
||||
mrb->c->status = MRB_FIBER_TERMINATED;
|
||||
mrb->c = c->prev;
|
||||
c->prev = NULL;
|
||||
|
||||
Reference in New Issue
Block a user