diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-08 05:17:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-08 05:17:09 +0000 |
commit | dc0dc6483a4a4c0e7168a184706695d1263c422c (patch) | |
tree | b8c85e67cb8e0e7030c2a55477fad3043ff0f7ec | |
parent | 51e6e260168eeeb0675327d410c8215b119c50f5 (diff) | |
download | ruby-dc0dc6483a4a4c0e7168a184706695d1263c422c.tar.gz |
compile.c: compile_case2 branch
* compile.c (compile_case2): compile as a branch condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | compile.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -4845,9 +4845,12 @@ compile_case2(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_no switch (nd_type(vals)) { case NODE_ARRAY: while (vals) { + LABEL *lnext; val = vals->nd_head; - CHECK(COMPILE(ret, "when2", val)); - ADD_INSNL(ret, nd_line(val), branchif, l1); + lnext = NEW_LABEL(nd_line(val)); + debug_compile("== when2\n", (void)0); + CHECK(compile_branch_condition(iseq, ret, val, l1, lnext)); + ADD_LABEL(ret, lnext); vals = vals->nd_next; } break; |