diff options
author | wanabe <s.wanabe@gmail.com> | 2020-08-07 07:59:50 +0900 |
---|---|---|
committer | wanabe <s.wanabe@gmail.com> | 2020-10-31 09:18:37 +0900 |
commit | 3685ed7303fc08bf68cd3cc8d11e22a8ce63a067 (patch) | |
tree | bd39b559fd5eaf552f590bd55010d440c4c783e6 /compile.c | |
parent | 5dc107b03f5cf32656a5308574b90458486c633c (diff) |
Use adjusted sp on `iseq_set_sequence()`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3404
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -2270,16 +2270,14 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor) } case ISEQ_ELEMENT_ADJUST: { - ADJUST *adjust = (ADJUST *)list; - if (adjust->line_no != -1) { - int orig_sp = sp; - sp = adjust->label ? adjust->label->sp : 0; - if (orig_sp - sp > 0) { - if (orig_sp - sp > 1) code_index++; /* 1 operand */ - code_index++; /* insn */ - insn_num++; - } - } + ADJUST *adjust = (ADJUST *)list; + int orig_sp = sp; + sp = adjust->label ? adjust->label->sp : 0; + if (adjust->line_no != -1 && orig_sp - sp > 0) { + if (orig_sp - sp > 1) code_index++; /* 1 operand */ + code_index++; /* insn */ + insn_num++; + } break; } default: break; |