summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def26
1 files changed, 9 insertions, 17 deletions
diff --git a/insns.def b/insns.def
index 379dbfb..e256a83 100644
--- a/insns.def
+++ b/insns.def
@@ -1092,27 +1092,19 @@ leave
}
RUBY_VM_CHECK_INTS();
- vm_pop_frame(th);
- RESTORE_REGS();
-}
-/**
- @c method/iterator
- @e return from this vm loop
- @j VM loop から抜ける。
- */
-DEFINE_INSN
-finish
-()
-(VALUE val)
-(VALUE val)
-{
+ if (UNLIKELY(VM_FRAME_TYPE_FINISH_P(GET_CFP()))) {
#if OPT_CALL_THREADED_CODE
- rb_bug("unused instruction on OPT_CALL_THREADED_CODE");
+ rb_bug("unused instruction on OPT_CALL_THREADED_CODE");
#else
- th->cfp++;
- return val;
+ vm_pop_frame(th);
+ return val;
#endif
+ }
+ else {
+ vm_pop_frame(th);
+ RESTORE_REGS();
+ }
}
/**********************************************************/