@@ -2073,15 +2073,15 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef,
2073
2073
if src. is_mem { src_val = Load ( cx, src_val) ; }
2074
2074
if action == DROP_EXISTING { cx = drop_ty ( cx, dst, t) ; }
2075
2075
Store ( cx, src_val, dst) ;
2076
- if src. is_mem { ret zero_alloca ( cx, src. val , t) . bcx ; }
2076
+ if src. is_mem { ret zero_alloca ( cx, src. val , t) ; }
2077
2077
2078
2078
// If we're here, it must be a temporary.
2079
2079
ret revoke_clean ( cx, src_val) ;
2080
2080
} else if ty:: type_is_unique ( tcx, t) ||
2081
2081
type_is_structural_or_param ( tcx, t) {
2082
2082
if action == DROP_EXISTING { cx = drop_ty ( cx, dst, t) ; }
2083
2083
cx = memmove_ty ( cx, dst, src_val, t) ;
2084
- if src. is_mem { ret zero_alloca ( cx, src_val, t) . bcx ; }
2084
+ if src. is_mem { ret zero_alloca ( cx, src_val, t) ; }
2085
2085
2086
2086
// If we're here, it must be a temporary.
2087
2087
ret revoke_clean ( cx, src_val) ;
@@ -3798,7 +3798,7 @@ fn zero_and_revoke(bcx: @block_ctxt,
3798
3798
to_revoke : [ { v : ValueRef , t : ty:: t } ] ) -> @block_ctxt {
3799
3799
let bcx = bcx;
3800
3800
for { v, t} in to_zero {
3801
- bcx = zero_alloca ( bcx, v, t) . bcx ;
3801
+ bcx = zero_alloca ( bcx, v, t) ;
3802
3802
}
3803
3803
for { v, _} in to_revoke {
3804
3804
bcx = revoke_clean ( bcx, v) ;
@@ -4268,7 +4268,7 @@ fn with_out_method(work: fn(out_method) -> result, cx: @block_ctxt,
4268
4268
let tp = node_id_type ( ccx, id) ;
4269
4269
if ty:: type_is_nil ( ccx. tcx , tp) { ret work ( return ) ; }
4270
4270
let res_alloca = alloc_ty ( cx, tp) ;
4271
- cx = zero_alloca ( res_alloca. bcx , res_alloca. val , tp) . bcx ;
4271
+ cx = zero_alloca ( res_alloca. bcx , res_alloca. val , tp) ;
4272
4272
let done = work ( save_in ( res_alloca. val ) ) ;
4273
4273
let loaded = load_if_immediate ( done. bcx , res_alloca. val , tp) ;
4274
4274
add_clean_temp ( cx, loaded, tp) ;
@@ -4590,7 +4590,7 @@ fn init_local(bcx: @block_ctxt, local: @ast::local) -> @block_ctxt {
4590
4590
add_clean ( bcx, llptr, ty) ;
4591
4591
4592
4592
if must_zero ( bcx_ccx ( bcx) , local) {
4593
- bcx = zero_alloca ( bcx, llptr, ty) . bcx ;
4593
+ bcx = zero_alloca ( bcx, llptr, ty) ;
4594
4594
}
4595
4595
4596
4596
alt local. node . init {
@@ -4661,7 +4661,8 @@ fn init_ref_local(bcx: @block_ctxt, local: @ast::local) -> @block_ctxt {
4661
4661
val. val , bcx. fcx . lllocals , false ) ;
4662
4662
}
4663
4663
4664
- fn zero_alloca ( cx : @block_ctxt , llptr : ValueRef , t : ty:: t ) -> result {
4664
+ fn zero_alloca ( cx : @block_ctxt , llptr : ValueRef , t : ty:: t )
4665
+ -> @block_ctxt {
4665
4666
let bcx = cx;
4666
4667
let ccx = bcx_ccx ( cx) ;
4667
4668
if check type_has_static_size ( ccx, t) {
@@ -4674,10 +4675,10 @@ fn zero_alloca(cx: @block_ctxt, llptr: ValueRef, t: ty::t) -> result {
4674
4675
// let llalign = align_of(llsz.bcx, t);
4675
4676
bcx = call_bzero ( llsz. bcx , llptr, llsz. val , C_int ( 0 ) ) . bcx ;
4676
4677
}
4677
- rslt ( bcx , llptr )
4678
+ ret bcx ;
4678
4679
}
4679
4680
4680
- fn trans_stmt ( cx : @block_ctxt , s : ast:: stmt ) -> result {
4681
+ fn trans_stmt ( cx : @block_ctxt , s : ast:: stmt ) -> @ block_ctxt {
4681
4682
// FIXME Fill in cx.sp
4682
4683
4683
4684
let bcx = cx;
@@ -4699,7 +4700,7 @@ fn trans_stmt(cx: @block_ctxt, s: ast::stmt) -> result {
4699
4700
}
4700
4701
_ { bcx_ccx( cx) . sess . unimpl ( "stmt variant" ) ; }
4701
4702
}
4702
- rslt ( bcx , C_nil ( ) )
4703
+ ret bcx ;
4703
4704
}
4704
4705
4705
4706
// You probably don't want to use this one. See the
@@ -4909,8 +4910,7 @@ fn trans_block(cx: @block_ctxt, b: ast::blk, output: out_method) -> result {
4909
4910
}
4910
4911
let r = rslt ( bcx, C_nil ( ) ) ;
4911
4912
for s: @ast:: stmt in b. node . stmts {
4912
- r = trans_stmt ( bcx, * s) ;
4913
- bcx = r. bcx ;
4913
+ bcx = trans_stmt ( bcx, * s) ;
4914
4914
}
4915
4915
fn accept_out_method ( expr : @ast:: expr ) -> bool {
4916
4916
ret alt expr. node {
0 commit comments