summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-07-29 16:34:18 +0900
committerNobuyoshi Nakada <[email protected]>2024-08-20 12:26:02 +0900
commitf73d435262ebbbdaedfb7bdc73b093c4fd6505f4 (patch)
treea62fbcbaa9e23834165cca4691555f4f1ac7e61b /compile.c
parent995b4c329b7ef7c9c8eda04e611884ce0b37e243 (diff)
Check compile_branch_condition results
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11411
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/compile.c b/compile.c
index 95cede7afa..366d32f9ec 100644
--- a/compile.c
+++ b/compile.c
@@ -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);