aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-12-10 15:26:47 -0800
committerPatrick Walton <[email protected]>2010-12-10 15:27:55 -0800
commit10d5d32537c6c0a7c5ca67c6a29b998985c822d3 (patch)
tree7acbb2ced2597862ed933d85ff29b31736bb065a
parentTypecheck vec and index exprs. (diff)
downloadrust-10d5d32537c6c0a7c5ca67c6a29b998985c822d3.tar.xz
rust-10d5d32537c6c0a7c5ca67c6a29b998985c822d3.zip
rustc: Change lazy "and" and "or" to use scope contexts rather than sub-block contexts, to run cleanups properly
-rw-r--r--src/comp/middle/trans.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 33b8bc5f..f92d87fc 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -1072,10 +1072,10 @@ impure fn trans_binary(@block_ctxt cx, ast.binop op,
// Lazy-eval and
auto lhs_res = trans_expr(cx, a);
- auto rhs_cx = new_sub_block_ctxt(cx, "rhs");
+ auto rhs_cx = new_scope_block_ctxt(cx, "rhs");
auto rhs_res = trans_expr(rhs_cx, b);
- auto lhs_false_cx = new_sub_block_ctxt(cx, "lhs false");
+ auto lhs_false_cx = new_scope_block_ctxt(cx, "lhs false");
auto lhs_false_res = res(lhs_false_cx, C_bool(false));
lhs_res.bcx.build.CondBr(lhs_res.val,
@@ -1090,10 +1090,10 @@ impure fn trans_binary(@block_ctxt cx, ast.binop op,
// Lazy-eval or
auto lhs_res = trans_expr(cx, a);
- auto rhs_cx = new_sub_block_ctxt(cx, "rhs");
+ auto rhs_cx = new_scope_block_ctxt(cx, "rhs");
auto rhs_res = trans_expr(rhs_cx, b);
- auto lhs_true_cx = new_sub_block_ctxt(cx, "lhs true");
+ auto lhs_true_cx = new_scope_block_ctxt(cx, "lhs true");
auto lhs_true_res = res(lhs_true_cx, C_bool(true));
lhs_res.bcx.build.CondBr(lhs_res.val,