aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-06-26 10:17:26 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-07-01 11:23:03 +1200
commit42130a64f02294dc8025af3a51bda518c67ab33d (patch)
treee81c181770e4cc9d3e87e960a25a870e9a4774f5 /eval.c
parent9c9531950c007872d7726f050a1dc0cb6f8f0490 (diff)
downloadruby-42130a64f02294dc8025af3a51bda518c67ab33d.tar.gz
Replace copy coroutine with pthread implementation.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/eval.c b/eval.c
index fb3cab21c1..40beac2449 100644
--- a/eval.c
+++ b/eval.c
@@ -1112,13 +1112,9 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data, int *pstate)
volatile enum ruby_tag_type state;
rb_execution_context_t * volatile ec = GET_EC();
rb_control_frame_t *volatile cfp = ec->cfp;
- struct rb_vm_protect_tag protect_tag;
rb_jmpbuf_t org_jmpbuf;
- protect_tag.prev = ec->protect_tag;
-
EC_PUSH_TAG(ec);
- ec->protect_tag = &protect_tag;
MEMCPY(&org_jmpbuf, &rb_ec_thread_ptr(ec)->root_jmpbuf, rb_jmpbuf_t, 1);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
SAVE_ROOT_JMPBUF(rb_ec_thread_ptr(ec), result = (*proc) (data));
@@ -1127,7 +1123,6 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data, int *pstate)
rb_vm_rewind_cfp(ec, cfp);
}
MEMCPY(&rb_ec_thread_ptr(ec)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1);
- ec->protect_tag = protect_tag.prev;
EC_POP_TAG();
if (pstate != NULL) *pstate = state;