summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-04 02:09:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-04 02:09:47 +0000
commit76307c9023af307a4d5147b0826b0dcd2d3f38c7 (patch)
treebf5c0d4e9d38eb799a20092696da388f8bafd33c /vm.c
parent1124f13938bceaa0dcea8c06ea5a045f36ef899b (diff)
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.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/vm.c b/vm.c
index 7a189206d7..ccbcc59a4c 100644
--- a/vm.c
+++ b/vm.c
@@ -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();