diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-04 02:09:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-04 02:09:47 +0000 |
commit | 76307c9023af307a4d5147b0826b0dcd2d3f38c7 (patch) | |
tree | bf5c0d4e9d38eb799a20092696da388f8bafd33c /vm.c | |
parent | 1124f13938bceaa0dcea8c06ea5a045f36ef899b (diff) | |
download | ruby-76307c9023af307a4d5147b0826b0dcd2d3f38c7.tar.gz |
vm.c: untangle goto loop
* vm.c (vm_exec): moved code to get rid of cross-jumps across
branches.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1807,15 +1807,7 @@ vm_exec(rb_execution_context_t *ec, int mjit_enable_p) if ((state = EC_EXEC_TAG()) == TAG_NONE) { if (mjit_enable_p) result = mjit_exec(ec); - vm_loop_start: - if (result == Qundef) - result = vm_exec_core(ec, initial); - VM_ASSERT(ec->tag == &_tag); - if ((state = _tag.state) != TAG_NONE) { - err = (struct vm_throw_data *)result; - _tag.state = TAG_NONE; - goto exception_handler; - } + goto vm_loop_start; } else { unsigned int i; @@ -2037,6 +2029,15 @@ vm_exec(rb_execution_context_t *ec, int mjit_enable_p) goto exception_handler; } } + vm_loop_start: + if (result == Qundef) + result = vm_exec_core(ec, initial); + VM_ASSERT(ec->tag == &_tag); + if ((state = _tag.state) != TAG_NONE) { + err = (struct vm_throw_data *)result; + _tag.state = TAG_NONE; + goto exception_handler; + } } finish_vme: EC_POP_TAG(); |