ruby-changes:67085
From: Nobuyoshi <ko1@a...>
Date: Mon, 9 Aug 2021 11:22:11 +0900 (JST)
Subject: [ruby-changes:67085] 6736323194 (master): Suppress a clobbered warning
https://git.ruby-lang.org/ruby.git/commit/?id=6736323194 From 6736323194e6cfd417468375669211c03d43d13e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 8 Aug 2021 21:20:44 +0900 Subject: Suppress a clobbered warning --- eval.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eval.c b/eval.c index b890c6a..bf57d0f 100644 --- a/eval.c +++ b/eval.c @@ -232,11 +232,9 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0) https://github.com/ruby/ruby/blob/trunk/eval.c#L232 EC_PUSH_TAG(ec); if ((state = EC_EXEC_TAG()) == TAG_NONE) { - th = th0; SAVE_ROOT_JMPBUF(th, { RUBY_VM_CHECK_INTS(ec); }); step_0: step++; - th = th0; errs[1] = ec->errinfo; if (THROW_DATA_P(ec->errinfo)) ec->errinfo = Qnil; ruby_init_stack(&errs[STACK_UPPER(errs, 0, 1)]); @@ -244,7 +242,6 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0) https://github.com/ruby/ruby/blob/trunk/eval.c#L242 SAVE_ROOT_JMPBUF(th, rb_ec_teardown(ec)); step_1: step++; - th = th0; /* protect from Thread#raise */ th->status = THREAD_KILLED; @@ -252,13 +249,13 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0) https://github.com/ruby/ruby/blob/trunk/eval.c#L249 SAVE_ROOT_JMPBUF(th, rb_ractor_terminate_all()); } else { + th = th0; switch (step) { case 0: goto step_0; case 1: goto step_1; } if (ex == 0) ex = state; } - th = th0; ec->errinfo = errs[1]; sysex = error_handle(ec, ex); @@ -297,7 +294,9 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0) https://github.com/ruby/ruby/blob/trunk/eval.c#L294 /* unlock again if finalizer took mutexes. */ rb_threadptr_unlock_all_locking_mutexes(th); + th = th0; EC_POP_TAG(); + th = th0; rb_thread_stop_timer_thread(); ruby_vm_destruct(th->vm); if (state) ruby_default_signal(state); -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/