Check compile_branch_condition results

This commit is contained in:
Nobuyoshi Nakada 2024-07-29 16:34:18 +09:00
parent 995b4c329b
commit f73d435262
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-08-20 04:21:44 +00:00

View File

@ -6576,7 +6576,7 @@ compile_if(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int
else_label = NEW_LABEL(line);
end_label = 0;
compile_branch_condition(iseq, cond_seq, RNODE_IF(node)->nd_cond, then_label, else_label);
CHECK(compile_branch_condition(iseq, cond_seq, RNODE_IF(node)->nd_cond, then_label, else_label));
ADD_SEQ(ret, cond_seq);
if (then_label->refcnt && else_label->refcnt) {
@ -7984,13 +7984,13 @@ compile_loop(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
ADD_LABEL(ret, next_label); /* next */
if (type == NODE_WHILE) {
compile_branch_condition(iseq, ret, RNODE_WHILE(node)->nd_cond,
redo_label, end_label);
CHECK(compile_branch_condition(iseq, ret, RNODE_WHILE(node)->nd_cond,
redo_label, end_label));
}
else {
/* until */
compile_branch_condition(iseq, ret, RNODE_WHILE(node)->nd_cond,
end_label, redo_label);
CHECK(compile_branch_condition(iseq, ret, RNODE_WHILE(node)->nd_cond,
end_label, redo_label));
}
ADD_LABEL(ret, end_label);