diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-23 09:43:52 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-23 09:43:52 +0000 |
commit | 4a4627fb0d770269f876c711b642b7f7275b22d2 (patch) | |
tree | bf6fc088df929e6f1fadf9b6ee6eb16a81ae2632 /vm.c | |
parent | a64801c1e95e127ad47de1d6d8fdb3f3390a9687 (diff) | |
download | ruby-4a4627fb0d770269f876c711b642b7f7275b22d2.tar.gz |
move "state" to rb_vm_tag.
* vm_core.h (rb_thread_t::tag_state): move to "rb_vm_tag::state".
Lifetime of "state" should be same as current tag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1476,7 +1476,6 @@ vm_iter_break(rb_thread_t *th, VALUE val) } #endif - th->tag_state = TAG_BREAK; th->errinfo = (VALUE)THROW_DATA_NEW(val, target_cfp, TAG_BREAK); TH_JUMP_TAG(th, TAG_BREAK); } @@ -1787,9 +1786,10 @@ vm_exec(rb_thread_t *th) if ((state = EXEC_TAG()) == TAG_NONE) { vm_loop_start: result = vm_exec_core(th, initial); - if ((state = th->tag_state) != TAG_NONE) { + VM_ASSERT(th->tag == &_tag); + if ((state = _tag.state) != TAG_NONE) { err = (struct vm_throw_data *)result; - th->tag_state = TAG_NONE; + _tag.state = TAG_NONE; goto exception_handler; } } @@ -1939,7 +1939,7 @@ vm_exec(rb_thread_t *th) #endif } th->errinfo = Qnil; - th->tag_state = TAG_NONE; + VM_ASSERT(th->tag->state == TAG_NONE); goto vm_loop_start; } } @@ -1989,7 +1989,7 @@ vm_exec(rb_thread_t *th) catch_iseq->body->stack_max); state = 0; - th->tag_state = TAG_NONE; + th->tag->state = TAG_NONE; th->errinfo = Qnil; goto vm_loop_start; } |