1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2018-01-08 05:17:09 +00:00
parent 51e6e26016
commit dc0dc6483a

View file

@ -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;