diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-28 14:27:49 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-28 14:27:49 +0000 |
commit | 8dd9c12c585375cc9d89441d7518a7846044deb0 (patch) | |
tree | fb3e3b2351ee24ff78d21116d18b9604c4a53fa0 /vm_eval.c | |
parent | 75392e45f1f09f7f0e6036dcb1fb6513707d35e8 (diff) |
move fields to ec.
* vm_core.h (rb_thread.h): move errinfo and trace_arg to
rb_execution_context_t.
* cont.c (fiber_switch, rb_cont_call): do not restore "trace_arg" here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1129,7 +1129,7 @@ rb_iterate0(VALUE (* it_proc) (VALUE), VALUE data1, retval = (*it_proc) (data1); } else if (state == TAG_BREAK || state == TAG_RETRY) { - const struct vm_throw_data *const err = (struct vm_throw_data *)th->errinfo; + const struct vm_throw_data *const err = (struct vm_throw_data *)th->ec.errinfo; const rb_control_frame_t *const escape_cfp = THROW_DATA_CATCH_FRAME(err); if (cfp == escape_cfp) { @@ -1137,7 +1137,7 @@ rb_iterate0(VALUE (* it_proc) (VALUE), VALUE data1, state = 0; th->ec.tag->state = TAG_NONE; - th->errinfo = Qnil; + th->ec.errinfo = Qnil; if (state == TAG_RETRY) goto iter_retry; retval = THROW_DATA_VAL(err); @@ -1296,7 +1296,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, rb_cref_t *const cref_ iseq = rb_iseq_compile_with_option(src, fname, realpath, INT2FIX(line), base_block, Qnil); if (!iseq) { - rb_exc_raise(adjust_backtrace_in_eval(th, th->errinfo)); + rb_exc_raise(adjust_backtrace_in_eval(th, th->ec.errinfo)); } /* TODO: what the code checking? */ @@ -1335,7 +1335,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, rb_cref_t *const cref_ if (state) { if (state == TAG_RAISE) { - adjust_backtrace_in_eval(th, th->errinfo); + adjust_backtrace_in_eval(th, th->ec.errinfo); } TH_JUMP_TAG(th, state); } @@ -1870,7 +1870,7 @@ rb_throw_obj(VALUE tag, VALUE value) rb_exc_raise(rb_class_new_instance(numberof(desc), desc, rb_eUncaughtThrow)); } - th->errinfo = (VALUE)THROW_DATA_NEW(tag, NULL, TAG_THROW); + th->ec.errinfo = (VALUE)THROW_DATA_NEW(tag, NULL, TAG_THROW); TH_JUMP_TAG(th, TAG_THROW); } @@ -1974,10 +1974,10 @@ vm_catch_protect(VALUE tag, rb_block_call_func *func, VALUE data, /* call with argc=1, argv = [tag], block = Qnil to insure compatibility */ val = (*func)(tag, data, 1, (const VALUE *)&tag, Qnil); } - else if (state == TAG_THROW && THROW_DATA_VAL((struct vm_throw_data *)th->errinfo) == tag) { + else if (state == TAG_THROW && THROW_DATA_VAL((struct vm_throw_data *)th->ec.errinfo) == tag) { rb_vm_rewind_cfp(th, saved_cfp); val = th->ec.tag->retval; - th->errinfo = Qnil; + th->ec.errinfo = Qnil; state = 0; } TH_POP_TAG(); |