diff options
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -7462,10 +7462,8 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in DECL_ANCHOR(args); unsigned int flag = 0; ID mid = node->nd_mid; - LABEL *else_label = 0; - LABEL *end_label = 0; + LABEL *lskip = 0; VALUE argc; - VALUE branches = 0; /* optimization shortcut * obj["literal"] = value -> opt_aset_with(obj, "literal", value) @@ -7505,11 +7503,8 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in /* safe nav attr */ mid = rb_id_attrset(mid); ADD_INSN(recv, line, dup); - else_label = NEW_LABEL(line); - end_label = NEW_LABEL(line); - DECL_BRANCH_BASE(branches, nd_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node), "&."); - ADD_INSNL(recv, line, branchnil, else_label); - ADD_TRACE_BRANCH_COVERAGE(recv, nd_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node), "then", branches); + lskip = NEW_LABEL(line); + ADD_INSNL(recv, line, branchnil, lskip); } if (!popped) { ADD_INSN(ret, line, putnil); @@ -7541,12 +7536,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in ADD_SEQ(ret, args); } ADD_SEND_WITH_FLAG(ret, line, mid, argc, INT2FIX(flag)); - if (else_label && end_label) { - ADD_INSNL(ret, line, jump, end_label); - ADD_LABEL(ret, else_label); - ADD_TRACE_BRANCH_COVERAGE(ret, nd_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node), "else", branches); - ADD_LABEL(ret, end_label); - } + if (lskip) ADD_LABEL(ret, lskip); ADD_INSN(ret, line, pop); break; |