From 10d5d32537c6c0a7c5ca67c6a29b998985c822d3 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 10 Dec 2010 15:26:47 -0800 Subject: rustc: Change lazy "and" and "or" to use scope contexts rather than sub-block contexts, to run cleanups properly --- src/comp/middle/trans.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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, -- cgit v1.2.3