summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-17 07:16:50 (GMT)
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-17 07:16:50 (GMT)
commite88fd0606b00c6f796d6ce341f400c9f90b90ca1 (patch)
tree34d8a99e6da9eb95e645116f0f27a14c04b1f60c /vm_insnhelper.c
parent1b43644edc85a93bfc9228588c065c87f975cd93 (diff)
Remove the level information from throw instruction
It is no longer used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 7bc868d..16152a9 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1086,7 +1086,7 @@ vm_throw_continue(const rb_execution_context_t *ec, VALUE err)
static VALUE
vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_cfp, enum ruby_tag_type state,
- const int flag, const rb_num_t level, const VALUE throwobj)
+ const int flag, const VALUE throwobj)
{
const rb_control_frame_t *escape_cfp = NULL;
const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec); /* end of control frame pointer */
@@ -1154,13 +1154,8 @@ vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_c
}
}
else if (state == TAG_RETRY) {
- rb_num_t i;
const VALUE *ep = VM_ENV_PREV_EP(GET_EP());
- for (i = 0; i < level; i++) {
- ep = VM_ENV_PREV_EP(ep);
- }
-
escape_cfp = rb_vm_search_cf_from_ep(ec, reg_cfp, ep);
}
else if (state == TAG_RETURN) {
@@ -1244,10 +1239,9 @@ vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
{
const int state = (int)(throw_state & VM_THROW_STATE_MASK);
const int flag = (int)(throw_state & VM_THROW_NO_ESCAPE_FLAG);
- const rb_num_t level = throw_state >> VM_THROW_LEVEL_SHIFT;
if (state != 0) {
- return vm_throw_start(ec, reg_cfp, state, flag, level, throwobj);
+ return vm_throw_start(ec, reg_cfp, state, flag, throwobj);
}
else {
return vm_throw_continue(ec, throwobj);