ruby-changes:48335
From: ko1 <ko1@a...>
Date: Thu, 26 Oct 2017 20:02:19 +0900 (JST)
Subject: [ruby-changes:48335] ko1:r60450 (trunk): introduce EC_*_TAG() instead of TH_*_TAG()
ko1 2017-10-26 20:02:13 +0900 (Thu, 26 Oct 2017) New Revision: 60450 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60450 Log: introduce EC_*_TAG() instead of TH_*_TAG() * eval_intern.h: introduce EC_*_TAG() macros instead of TH_*_TAG() macros. * TH_PUSH_TAG() -> EC_PUSH_TAG() * TH_POP_TAG() -> EC_POP_TAG() * TH_TMPPOP_TAG() -> EC_TMPPOP_TAG() * TH_REPUSH_TAG() -> EC_REPUSH_TAG() * TH_EXEC_TAG() -> EC_EXEC_TAG() * TH_JUMP_TAG() -> EC_JUMP_TAG() rb_threadptr_tag_state() , rb_ec_tag_jump() also accept `ec` instead of `th`. Modified files: trunk/cont.c trunk/eval.c trunk/eval_error.c trunk/eval_intern.h trunk/eval_jump.c trunk/gc.c trunk/load.c trunk/proc.c trunk/signal.c trunk/thread.c trunk/vm.c trunk/vm_backtrace.c trunk/vm_core.h trunk/vm_eval.c trunk/vm_insnhelper.c trunk/vm_trace.c Index: eval.c =================================================================== --- eval.c (revision 60449) +++ eval.c (revision 60450) @@ -169,7 +169,7 @@ ruby_cleanup(volatile int ex) https://github.com/ruby/ruby/blob/trunk/eval.c#L169 rb_threadptr_interrupt(th); rb_threadptr_check_signal(th); - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if ((state = EXEC_TAG()) == TAG_NONE) { SAVE_ROOT_JMPBUF(th, { RUBY_VM_CHECK_INTS(th); }); @@ -224,7 +224,7 @@ ruby_cleanup(volatile int ex) https://github.com/ruby/ruby/blob/trunk/eval.c#L224 /* unlock again if finalizer took mutexes. */ rb_threadptr_unlock_all_locking_mutexes(GET_THREAD()); - TH_POP_TAG(); + EC_POP_TAG(); rb_thread_stop_timer_thread(); ruby_vm_destruct(GET_VM()); if (state) ruby_default_signal(state); @@ -241,13 +241,13 @@ ruby_exec_internal(void *n) https://github.com/ruby/ruby/blob/trunk/eval.c#L241 if (!n) return 0; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if ((state = EXEC_TAG()) == TAG_NONE) { SAVE_ROOT_JMPBUF(th, { rb_iseq_eval_main(iseq); }); } - TH_POP_TAG(); + EC_POP_TAG(); return state; } @@ -479,7 +479,7 @@ exc_setup_message(rb_thread_t *th, VALUE https://github.com/ruby/ruby/blob/trunk/eval.c#L479 if (NIL_P(mesg)) { mesg = th->ec->errinfo; - if (INTERNAL_EXCEPTION_P(mesg)) TH_JUMP_TAG(th, TAG_FATAL); + if (INTERNAL_EXCEPTION_P(mesg)) EC_JUMP_TAG(th->ec, TAG_FATAL); nocause = 1; } if (NIL_P(mesg)) { @@ -508,7 +508,7 @@ setup_exception(rb_thread_t *th, int tag https://github.com/ruby/ruby/blob/trunk/eval.c#L508 if ((file && !NIL_P(mesg)) || (cause != Qundef)) { volatile int state = 0; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if (EXEC_TAG() == TAG_NONE && !(state = rb_threadptr_set_raised(th))) { VALUE bt = rb_get_backtrace(mesg); if (!NIL_P(bt) || cause == Qundef) { @@ -526,7 +526,7 @@ setup_exception(rb_thread_t *th, int tag https://github.com/ruby/ruby/blob/trunk/eval.c#L526 } rb_threadptr_reset_raised(th); } - TH_POP_TAG(); + EC_POP_TAG(); if (state) goto fatal; } @@ -539,7 +539,7 @@ setup_exception(rb_thread_t *th, int tag https://github.com/ruby/ruby/blob/trunk/eval.c#L539 enum ruby_tag_type state; mesg = e; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if ((state = EXEC_TAG()) == TAG_NONE) { th->ec->errinfo = Qnil; e = rb_obj_as_string(mesg); @@ -558,13 +558,13 @@ setup_exception(rb_thread_t *th, int tag https://github.com/ruby/ruby/blob/trunk/eval.c#L558 } warn_print_str(e); } - TH_POP_TAG(); + EC_POP_TAG(); if (state == TAG_FATAL && th->ec->errinfo == exception_error) { th->ec->errinfo = mesg; } else if (state) { rb_threadptr_reset_raised(th); - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); } } @@ -572,7 +572,7 @@ setup_exception(rb_thread_t *th, int tag https://github.com/ruby/ruby/blob/trunk/eval.c#L572 fatal: th->ec->errinfo = exception_error; rb_threadptr_reset_raised(th); - TH_JUMP_TAG(th, TAG_FATAL); + EC_JUMP_TAG(th->ec, TAG_FATAL); } if (tag != TAG_FATAL) { @@ -599,7 +599,7 @@ rb_longjmp(rb_thread_t *th, int tag, vol https://github.com/ruby/ruby/blob/trunk/eval.c#L599 mesg = exc_setup_message(th, mesg, &cause); setup_exception(th, tag, mesg, cause); rb_thread_raised_clear(th); - TH_JUMP_TAG(th, tag); + EC_JUMP_TAG(th->ec, tag); } static VALUE make_exception(int argc, const VALUE *argv, int isstr); @@ -902,8 +902,8 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), V https://github.com/ruby/ruby/blob/trunk/eval.c#L902 volatile VALUE e_info = th->ec->errinfo; va_list args; - TH_PUSH_TAG(th); - if ((state = TH_EXEC_TAG()) == TAG_NONE) { + EC_PUSH_TAG(th->ec); + if ((state = EC_EXEC_TAG()) == TAG_NONE) { retry_entry: result = (*b_proc) (data1); } @@ -942,9 +942,9 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), V https://github.com/ruby/ruby/blob/trunk/eval.c#L942 } } } - TH_POP_TAG(); + EC_POP_TAG(); if (state) - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); return result; } @@ -1000,10 +1000,10 @@ rb_protect(VALUE (* proc) (VALUE), VALUE https://github.com/ruby/ruby/blob/trunk/eval.c#L1000 protect_tag.prev = th->ec->protect_tag; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); th->ec->protect_tag = &protect_tag; MEMCPY(&org_jmpbuf, &(th)->root_jmpbuf, rb_jmpbuf_t, 1); - if ((state = TH_EXEC_TAG()) == TAG_NONE) { + if ((state = EC_EXEC_TAG()) == TAG_NONE) { SAVE_ROOT_JMPBUF(th, result = (*proc) (data)); } else { @@ -1011,7 +1011,7 @@ rb_protect(VALUE (* proc) (VALUE), VALUE https://github.com/ruby/ruby/blob/trunk/eval.c#L1011 } MEMCPY(&(th)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1); th->ec->protect_tag = protect_tag.prev; - TH_POP_TAG(); + EC_POP_TAG(); if (pstate != NULL) *pstate = state; return result; @@ -1044,11 +1044,11 @@ rb_ensure(VALUE (*b_proc)(ANYARGS), VALU https://github.com/ruby/ruby/blob/trunk/eval.c#L1044 ensure_list.entry.data2 = data2; ensure_list.next = th->ec->ensure_list; th->ec->ensure_list = &ensure_list; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if ((state = EXEC_TAG()) == TAG_NONE) { result = (*b_proc) (data1); } - TH_POP_TAG(); + EC_POP_TAG(); errinfo = th->ec->errinfo; if (!NIL_P(errinfo) && !RB_TYPE_P(errinfo, T_OBJECT)) { th->ec->errinfo = Qnil; @@ -1057,7 +1057,7 @@ rb_ensure(VALUE (*b_proc)(ANYARGS), VALU https://github.com/ruby/ruby/blob/trunk/eval.c#L1057 (*ensure_list.entry.e_proc)(ensure_list.entry.data2); th->ec->errinfo = errinfo; if (state) - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); return result; } Index: eval_error.c =================================================================== --- eval_error.c (revision 60449) +++ eval_error.c (revision 60450) @@ -174,8 +174,8 @@ rb_threadptr_error_print(rb_thread_t *vo https://github.com/ruby/ruby/blob/trunk/eval_error.c#L174 return; rb_thread_raised_clear(th); - TH_PUSH_TAG(th); - if (TH_EXEC_TAG() == TAG_NONE) { + EC_PUSH_TAG(th->ec); + if (EC_EXEC_TAG() == TAG_NONE) { errat = rb_get_backtrace(errinfo); } else if (errat == Qundef) { @@ -201,7 +201,7 @@ rb_threadptr_error_print(rb_thread_t *vo https://github.com/ruby/ruby/blob/trunk/eval_error.c#L201 print_backtrace(eclass, errat, FALSE); } error: - TH_POP_TAG(); + EC_POP_TAG(); th->ec->errinfo = errinfo; rb_thread_raised_set(th, raised_flag); } Index: cont.c =================================================================== --- cont.c (revision 60449) +++ cont.c (revision 60450) @@ -1408,7 +1408,7 @@ rb_fiber_start(void) https://github.com/ruby/ruby/blob/trunk/cont.c#L1408 VM_ASSERT(th->ec == ruby_current_execution_context_ptr); VM_ASSERT(FIBER_RESUMED_P(fib)); - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if ((state = EXEC_TAG()) == TAG_NONE) { rb_context_t *cont = &VAR_FROM_MEMORY(fib)->cont; int argc; @@ -1423,7 +1423,7 @@ rb_fiber_start(void) https://github.com/ruby/ruby/blob/trunk/cont.c#L1423 EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, 0, Qnil); cont->value = rb_vm_invoke_proc(th, proc, argc, argv, VM_BLOCK_HANDLER_NONE); } - TH_POP_TAG(); + EC_POP_TAG(); if (state) { VM_ASSERT(FIBER_RESUMED_P(fib)); Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 60449) +++ vm_insnhelper.c (revision 60450) @@ -43,7 +43,7 @@ threadptr_stack_overflow(rb_thread_t *th https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L43 rb_ivar_set(mesg, idBt_locations, at); } th->ec->errinfo = mesg; - TH_JUMP_TAG(th, TAG_RAISE); + EC_JUMP_TAG(th->ec, TAG_RAISE); } static void @@ -59,7 +59,7 @@ rb_threadptr_stack_overflow(rb_thread_t https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L59 if (crit || rb_during_gc()) { th->ec->raised_flag = RAISED_STACKOVERFLOW; th->ec->errinfo = th->vm->special_exceptions[ruby_error_stackfatal]; - TH_JUMP_TAG(th, TAG_RAISE); + EC_JUMP_TAG(th->ec, TAG_RAISE); } #ifdef USE_SIGALTSTACK threadptr_stack_overflow(th, TRUE); Index: signal.c =================================================================== --- signal.c (revision 60449) +++ signal.c (revision 60450) @@ -1001,18 +1001,18 @@ signal_exec(VALUE cmd, int safe, int sig https://github.com/ruby/ruby/blob/trunk/signal.c#L1001 return; cur_th->interrupt_mask |= TRAP_INTERRUPT_MASK; - TH_PUSH_TAG(cur_th); + EC_PUSH_TAG(cur_th->ec); if ((state = EXEC_TAG()) == TAG_NONE) { VALUE signum = INT2NUM(sig); rb_eval_cmd(cmd, rb_ary_new3(1, signum), safe); } - TH_POP_TAG(); + EC_POP_TAG(); cur_th = GET_THREAD(); cur_th->interrupt_mask = old_interrupt_mask; if (state) { /* XXX: should be replaced with rb_threadptr_pending_interrupt_enque() */ - TH_JUMP_TAG(cur_th, state); + EC_JUMP_TAG(cur_th->ec, state); } } Index: gc.c =================================================================== --- gc.c (revision 60449) +++ gc.c (revision 60450) @@ -2803,8 +2803,8 @@ run_finalizer(rb_objspace_t *objspace, V https://github.com/ruby/ruby/blob/trunk/gc.c#L2803 saved.cfp = th->ec->cfp; saved.finished = 0; - TH_PUSH_TAG(th); - state = TH_EXEC_TAG(); + EC_PUSH_TAG(th->ec); + state = EC_EXEC_TAG(); if (state != TAG_NONE) { ++saved.finished; /* skip failed finalizer */ } @@ -2813,7 +2813,7 @@ run_finalizer(rb_objspace_t *objspace, V https://github.com/ruby/ruby/blob/trunk/gc.c#L2813 saved.finished = ++i) { run_single_final(RARRAY_AREF(table, i), saved.objid); } - TH_POP_TAG(); + EC_POP_TAG(); #undef RESTORE_FINALIZER } @@ -7720,7 +7720,7 @@ rb_memerror(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L7720 exc = ruby_vm_special_exception_copy(exc); } th->ec->errinfo = exc; - TH_JUMP_TAG(th, TAG_RAISE); + EC_JUMP_TAG(th->ec, TAG_RAISE); } static void * Index: eval_jump.c =================================================================== --- eval_jump.c (revision 60449) +++ eval_jump.c (revision 60450) @@ -118,7 +118,7 @@ rb_exec_end_proc(void) https://github.com/ruby/ruby/blob/trunk/eval_jump.c#L118 rb_thread_t *th = GET_THREAD(); volatile VALUE errinfo = th->ec->errinfo; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if ((state = EXEC_TAG()) == TAG_NONE) { again: exec_end_procs_chain(&ephemeral_end_procs, &th->ec->errinfo); @@ -126,13 +126,13 @@ rb_exec_end_proc(void) https://github.com/ruby/ruby/blob/trunk/eval_jump.c#L126 } else { VAR_INITIALIZED(th); - TH_TMPPOP_TAG(); + EC_TMPPOP_TAG(); error_handle(state); if (!NIL_P(th->ec->errinfo)) errinfo = th->ec->errinfo; - TH_REPUSH_TAG(); + EC_REPUSH_TAG(); goto again; } - TH_POP_TAG(); + EC_POP_TAG(); rb_set_safe_level_force(safe); th->ec->errinfo = errinfo; Index: vm_core.h =================================================================== --- vm_core.h (revision 60449) +++ vm_core.h (revision 60450) @@ -686,7 +686,7 @@ enum rb_thread_status { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L686 typedef RUBY_JMP_BUF rb_jmpbuf_t; /* - the members which are written in TH_PUSH_TAG() should be placed at + the members which are written in EC_PUSH_TAG() should be placed at the beginning and the end, so that entire region is accessible. */ struct rb_vm_tag { Index: vm.c =================================================================== --- vm.c (revision 60449) +++ vm.c (revision 60450) @@ -1150,17 +1150,17 @@ vm_invoke_proc(rb_thread_t *th, rb_proc_ https://github.com/ruby/ruby/blob/trunk/vm.c#L1150 enum ruby_tag_type state; volatile int stored_safe = th->ec->safe_level; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if ((state = EXEC_TAG()) == TAG_NONE) { th->ec->safe_level = proc->safe_level; val = invoke_block_from_c_proc(th, proc, self, argc, argv, passed_block_handler, proc->is_lambda); } - TH_POP_TAG(); + EC_POP_TAG(); th->ec->safe_level = stored_safe; if (state) { - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); } return val; } @@ -1487,7 +1487,7 @@ vm_iter_break(rb_thread_t *th, VALUE val https://github.com/ruby/ruby/blob/trunk/vm.c#L1487 #endif th->ec->errinfo = (VALUE)THROW_DATA_NEW(val, target_cfp, TAG_BREAK); - TH_JUMP_TAG(th, TAG_BREAK); + EC_JUMP_TAG(th->ec, TAG_BREAK); } void @@ -1791,7 +1791,8 @@ vm_exec(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/vm.c#L1791 VALUE initial = 0; struct vm_throw_data *err; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); + _tag.retval = Qnil; if ((state = EXEC_TAG()) == TAG_NONE) { vm_loop_start: @@ -2010,8 +2011,8 @@ vm_exec(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/vm.c#L2011 if (VM_FRAME_FINISHED_P(th->ec->cfp)) { rb_vm_pop_frame(th->ec); th->ec->errinfo = (VALUE)err; - TH_TMPPOP_TAG(); - TH_JUMP_TAG(th, state); + EC_TMPPOP_TAG(); + EC_JUMP_TAG(th->ec, state); } else { rb_vm_pop_frame(th->ec); @@ -2020,7 +2021,7 @@ vm_exec(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/vm.c#L2021 } } finish_vme: - TH_POP_TAG(); + EC_POP_TAG(); return result; } Index: vm_eval.c =================================================================== --- vm_eval.c (revision 60449) +++ vm_eval.c (revision 60450) @@ -1114,8 +1114,8 @@ rb_iterate0(VALUE (* it_proc) (VALUE), V https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1114 volatile VALUE retval = Qnil; rb_control_frame_t *const cfp = th->ec->cfp; - TH_PUSH_TAG(th); - state = TH_EXEC_TAG(); + EC_PUSH_TAG(th->ec); + state = EC_EXEC_TAG(); if (state == 0) { iter_retry: { @@ -1151,10 +1151,10 @@ rb_iterate0(VALUE (* it_proc) (VALUE), V https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1151 SDR(); fprintf(stderr, "%p, %p\n", cfp, escape_cfp); } } - TH_POP_TAG(); + EC_POP_TAG(); if (state) { - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); } return retval; } @@ -1349,17 +1349,17 @@ eval_string_with_cref(VALUE self, VALUE https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1349 return vm_exec(th); } - TH_PUSH_TAG(th); - if ((state = TH_EXEC_TAG()) == TAG_NONE) { + EC_PUSH_TAG(th->ec); + if ((state = EC_EXEC_TAG()) == TAG_NONE) { result = vm_exec(th); } - TH_POP_TAG(); + EC_POP_TAG(); if (state) { if (state == TAG_RAISE) { adjust_backtrace_in_eval(th, th->ec->errinfo); } - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); } return result; } @@ -1505,7 +1505,7 @@ rb_eval_string_wrap(const char *str, int https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1505 *pstate = state; } else if (state != TAG_NONE) { - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); } return val; } @@ -1522,9 +1522,9 @@ rb_eval_cmd(VALUE cmd, VALUE arg, int le https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1522 level = RUBY_SAFE_LEVEL_MAX; } - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); rb_set_safe_level_force(level); - if ((state = TH_EXEC_TAG()) == TAG_NONE) { + if ((state = EC_EXEC_TAG()) == TAG_NONE) { if (!RB_TYPE_P(cmd, T_STRING)) { val = rb_funcallv(cmd, idCall, RARRAY_LENINT(arg), RARRAY_CONST_PTR(arg)); @@ -1533,10 +1533,10 @@ rb_eval_cmd(VALUE cmd, VALUE arg, int le https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1533 val = eval_string(rb_vm_top_self(), cmd, Qnil, 0, 0); } } - TH_POP_TAG(); + EC_POP_TAG(); rb_set_safe_level_force(safe); - if (state) TH_JUMP_TAG(th, state); + if (state) EC_JUMP_TAG(th->ec, state); return val; } @@ -1893,7 +1893,7 @@ rb_throw_obj(VALUE tag, VALUE value) https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1893 } th->ec->errinfo = (VALUE)THROW_DATA_NEW(tag, NULL, TAG_THROW); - TH_JUMP_TAG(th, TAG_THROW); + EC_JUMP_TAG(th->ec, TAG_THROW); } void @@ -1988,11 +1988,11 @@ vm_catch_protect(VALUE tag, rb_block_cal https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1988 VALUE val = Qnil; /* OK */ rb_control_frame_t *volatile saved_cfp = th->ec->cfp; - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); _tag.tag = tag; - if ((state = TH_EXEC_TAG()) == TAG_NONE) { + if ((state = EC_EXEC_TAG()) == TAG_NONE) { /* call with argc=1, argv = [tag], block = Qnil to insure compatibility */ val = (*func)(tag, data, 1, (const VALUE *)&tag, Qnil); } @@ -2002,7 +2002,7 @@ vm_catch_protect(VALUE tag, rb_block_cal https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L2002 th->ec->errinfo = Qnil; state = 0; } - TH_POP_TAG(); + EC_POP_TAG(); if (stateptr) *stateptr = state; @@ -2021,7 +2021,7 @@ rb_catch_obj(VALUE t, VALUE (*func)(), V https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L2021 enum ruby_tag_type state; rb_thread_t *th = GET_THREAD(); VALUE val = vm_catch_protect(t, (rb_block_call_func *)func, data, &state, th); - if (state) TH_JUMP_TAG(th, state); + if (state) EC_JUMP_TAG(th->ec, state); return val; } Index: vm_trace.c =================================================================== --- vm_trace.c (revision 60449) +++ vm_trace.c (revision 60450) @@ -285,11 +285,11 @@ exec_hooks_protected(rb_thread_t *th, rb https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L285 /* TODO: Support !RUBY_EVENT_HOOK_FLAG_SAFE hooks */ - TH_PUSH_TAG(th); - if ((state = TH_EXEC_TAG()) == TAG_NONE) { + EC_PUSH_TAG(th->ec); + if ((state = EC_EXEC_TAG()) == TAG_NONE) { exec_hooks_body(th, list, trace_arg); } - TH_POP_TAG(); + EC_POP_TAG(); if (raised) { rb_threadptr_set_raised(th); @@ -354,7 +354,7 @@ rb_threadptr_exec_event_hooks_orig(rb_tr https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L354 } rb_vm_pop_frame(th->ec); } - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); } } } @@ -388,11 +388,11 @@ rb_suppress_tracing(VALUE (*func)(VALUE) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L388 raised = rb_threadptr_reset_raised(th); - TH_PUSH_TAG(th); - if ((state = TH_EXEC_TAG()) == TAG_NONE) { + EC_PUSH_TAG(th->ec); + if ((state = EC_EXEC_TAG()) == TAG_NONE) { result = (*func)(arg); } - TH_POP_TAG(); + EC_POP_TAG(); if (raised) { rb_threadptr_set_raised(th); @@ -405,7 +405,7 @@ rb_suppress_tracing(VALUE (*func)(VALUE) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L405 #if defined RUBY_USE_SETJMPEX && RUBY_USE_SETJMPEX RB_GC_GUARD(result); #endif - TH_JUMP_TAG(th, state); + EC_JUMP_TAG(th->ec, state); } return result; @@ -1600,7 +1600,7 @@ rb_postponed_job_flush(rb_vm_t *vm) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1600 /* mask POSTPONED_JOB dispatch */ th->interrupt_mask |= block_mask; { - TH_PUSH_TAG(th); + EC_PUSH_TAG(th->ec); if (EXEC_TAG() == TAG_NONE) { int index; while ((index = vm->postponed_job_index) > 0) { @@ -1610,7 +1610,7 @@ rb_postponed_job_flush(rb_vm_t *vm) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1610 } } } - TH_POP_TAG(); + EC_POP_TAG(); } /* restore POSTPONED_JOB mask */ th->interrupt_mask &= ~(saved_mask ^ block_mask); Index: thread.c =================================================================== --- thread.c (revision 60449) +++ thread.c (revision 60450) @@ -490,8 +490,8 @@ rb_thread_terminate_all(void) https://github.com/ruby/ruby/blob/trunk/thread.c#L490 /* unlock all locking mutexes */ rb_threadptr_unlock_all_locking_mutexes(th); - TH_PUSH_TAG(th); - if (TH_EXEC_TAG() == TAG_NONE) { + (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/