summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-31 15:48:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-31 15:48:57 +0000
commit6b346a7c855bb6c9e5462ac64bad8e04344b1799 (patch)
tree586328bc034d088cc04e760c6da7bf2d58ef811e /compile.c
parentd3d40e99f12a6636150989915f3506fcae407945 (diff)
compile.c: end_label
* compile.c (compile_if): branch to end_label is not used if else_seq is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index c4fa08e35b..786b055079 100644
--- a/compile.c
+++ b/compile.c
@@ -4768,10 +4768,10 @@ compile_if(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int
node_body ? nd_last_column(node_body) : last_column,
type == NODE_IF ? "then" : "else",
branches);
+ end_label = NEW_LABEL(line);
+ ADD_INSNL(then_seq, line, jump, end_label);
}
ADD_SEQ(ret, then_seq);
- end_label = NEW_LABEL(line);
- ADD_INSNL(ret, line, jump, end_label);
}
if (else_label->refcnt) {