File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: fce535c04ae30d508debf9980cfc0c9475e08adc
2
+ refs/heads/master: 2de59aa6b9096788577319b258469848e633938f
Original file line number Diff line number Diff line change @@ -1015,12 +1015,12 @@ impure fn trans_ret(@block_ctxt cx, &option.t[@ast.expr] e) -> result {
1015
1015
1016
1016
// Run all cleanups and back out.
1017
1017
let bool more_cleanups = true ;
1018
- auto bcx = cx;
1018
+ auto cleanup_cx = cx;
1019
1019
while ( more_cleanups) {
1020
- bcx = trans_block_cleanups ( bcx) ;
1021
- alt ( bcx . parent ) {
1020
+ r . bcx = trans_block_cleanups ( r . bcx , cleanup_cx ) ;
1021
+ alt ( cleanup_cx . parent ) {
1022
1022
case ( parent_some ( ?b) ) {
1023
- bcx = b;
1023
+ cleanup_cx = b;
1024
1024
}
1025
1025
case ( parent_none) {
1026
1026
more_cleanups = false ;
@@ -1107,9 +1107,10 @@ fn new_sub_block_ctxt(@block_ctxt bcx, str n) -> @block_ctxt {
1107
1107
}
1108
1108
1109
1109
1110
- fn trans_block_cleanups ( @block_ctxt cx ) -> @block_ctxt {
1110
+ fn trans_block_cleanups ( @block_ctxt cx ,
1111
+ @block_ctxt cleanup_cx ) -> @block_ctxt {
1111
1112
auto bcx = cx;
1112
- for ( cleanup c in cx . cleanups) {
1113
+ for ( cleanup c in cleanup_cx . cleanups) {
1113
1114
alt ( c) {
1114
1115
case ( clean( ?cfn) ) {
1115
1116
bcx = cfn( bcx) . bcx;
@@ -1163,7 +1164,7 @@ impure fn trans_block(@block_ctxt cx, &ast.block b) -> result {
1163
1164
}
1164
1165
}
1165
1166
1166
- bcx = trans_block_cleanups ( bcx) ;
1167
+ bcx = trans_block_cleanups ( bcx, bcx ) ;
1167
1168
ret res( bcx, r. val ) ;
1168
1169
}
1169
1170
You can’t perform that action at this time.
0 commit comments