@@ -830,10 +830,9 @@ fn trans_malloc_boxed(cx: &@block_ctxt, t: ty::t) -> result {
830830 // size of; box_ptr is the type that's converted to a TypeRef and used as
831831 // the pointer cast target in trans_raw_malloc.
832832
833- let
834- // The mk_int here is the space being
835- // reserved for the refcount.
836- boxed_body =
833+ // The mk_int here is the space being
834+ // reserved for the refcount.
835+ let boxed_body =
837836 ty:: mk_imm_tup ( bcx_tcx ( cx) , ~[ ty:: mk_int ( bcx_tcx ( cx) ) , t] ) ;
838837 let box_ptr = ty:: mk_imm_box ( bcx_tcx ( cx) , t) ;
839838 let sz = size_of ( cx, boxed_body) ;
@@ -1243,21 +1242,20 @@ fn incr_refcnt_of_boxed(cx: &@block_ctxt, box_ptr: ValueRef) -> result {
12431242fn make_free_glue ( cx : & @block_ctxt , v0 : ValueRef , t : & ty:: t ) {
12441243 // NB: v is an *alias* of type t here, not a direct value.
12451244
1246- let
1247- // FIXME: switch gc/non-gc on layer of the type.
1248- // FIXME: switch gc/non-gc on layer of the type.
1249- // TODO: call upcall_kill
1245+ // FIXME: switch gc/non-gc on layer of the type.
1246+ // FIXME: switch gc/non-gc on layer of the type.
1247+ // TODO: call upcall_kill
12501248
12511249
1252- // Call through the obj's own fields-drop glue first.
1250+ // Call through the obj's own fields-drop glue first.
12531251
1254- // Then free the body.
1255- // FIXME: switch gc/non-gc on layer of the type.
1256- // Call through the closure's own fields-drop glue first.
1252+ // Then free the body.
1253+ // FIXME: switch gc/non-gc on layer of the type.
1254+ // Call through the closure's own fields-drop glue first.
12571255
1258- // Then free the body.
1259- // FIXME: switch gc/non-gc on layer of the type.
1260- rs =
1256+ // Then free the body.
1257+ // FIXME: switch gc/non-gc on layer of the type.
1258+ let rs =
12611259 alt ty:: struct ( bcx_tcx ( cx) , t) {
12621260 ty:: ty_str. { let v = cx. build . Load ( v0) ; trans_non_gc_free ( cx, v) }
12631261 ty:: ty_vec ( _) {
@@ -1361,9 +1359,7 @@ fn maybe_free_ivec_heap_part(cx: &@block_ctxt, v0: ValueRef, unit_ty: ty::t)
13611359fn make_drop_glue ( cx : & @block_ctxt , v0 : ValueRef , t : & ty:: t ) {
13621360 // NB: v0 is an *alias* of type t here, not a direct value.
13631361 let ccx = bcx_ccx ( cx) ;
1364- let
1365-
1366- rs =
1362+ let rs =
13671363 alt ty:: struct ( ccx. tcx , t) {
13681364 ty:: ty_str. { decr_refcnt_maybe_free ( cx, v0, v0, t) }
13691365 ty:: ty_vec ( _) { decr_refcnt_maybe_free ( cx, v0, v0, t) }
@@ -1453,7 +1449,9 @@ fn trans_res_drop(cx: @block_ctxt, rs: ValueRef, did: &ast::def_id,
14531449 // value here, but the dtor expects a type that still has opaque pointers
14541450 // for type variables.
14551451 let val_llty =
1456- lib:: llvm:: fn_ty_param_tys ( llvm:: LLVMGetElementType ( llvm:: LLVMTypeOf ( dtor_addr) ) ) . ( std:: ivec:: len ( args) ) ;
1452+ lib:: llvm:: fn_ty_param_tys ( llvm:: LLVMGetElementType
1453+ ( llvm:: LLVMTypeOf ( dtor_addr) ) )
1454+ . ( std:: ivec:: len ( args) ) ;
14571455 let val_cast = cx. build . BitCast ( val. val , val_llty) ;
14581456 cx. build . FastCall ( dtor_addr, args + ~[ val_cast] ) ;
14591457
@@ -3345,9 +3343,8 @@ mod ivec {
33453343 maybe_on_heap_cx. build . PointerCast ( vptr,
33463344 T_ptr ( T_ivec_heap ( llunitty) ) ) ;
33473345 let heap_ptr_ptr =
3348- maybe_on_heap_cx. build . InBoundsGEP ( stub_ptr,
3349- ~[ C_int ( 0 ) ,
3350- C_uint ( abi:: ivec_heap_stub_elt_ptr) ] ) ;
3346+ maybe_on_heap_cx. build . InBoundsGEP
3347+ ( stub_ptr, ~[ C_int ( 0 ) , C_uint ( abi:: ivec_heap_stub_elt_ptr) ] ) ;
33513348 let heap_ptr = maybe_on_heap_cx. build . Load ( heap_ptr_ptr) ;
33523349 let heap_ptr_is_nonnull =
33533350 maybe_on_heap_cx. build . ICmp ( lib:: llvm:: LLVMIntNE , heap_ptr,
@@ -3358,9 +3355,8 @@ mod ivec {
33583355
33593356 // Ok, the vector is on the heap. Copy the heap part.
33603357 let alen_ptr =
3361- on_heap_cx. build . InBoundsGEP ( stub_ptr,
3362- ~[ C_int ( 0 ) ,
3363- C_uint ( abi:: ivec_heap_stub_elt_alen) ] ) ;
3358+ on_heap_cx. build . InBoundsGEP
3359+ ( stub_ptr, ~[ C_int ( 0 ) , C_uint ( abi:: ivec_heap_stub_elt_alen) ] ) ;
33643360 let alen = on_heap_cx. build . Load ( alen_ptr) ;
33653361
33663362 let heap_part_sz =
@@ -3598,17 +3594,15 @@ fn trans_if(cx: &@block_ctxt, cond: &@ast::expr, thn: &ast::blk,
35983594 let then_cx = new_scope_block_ctxt ( cx, "then" ) ;
35993595 let then_res = trans_block ( then_cx, thn, output) ;
36003596 let else_cx = new_scope_block_ctxt ( cx, "else" ) ;
3601- let
3602- // Synthesize a block here to act as the else block
3603- // containing an if expression. Needed in order for the
3604- // else scope to behave like a normal block scope. A tad
3605- // ugly.
3606- // Calling trans_block directly instead of trans_expr
3607- // because trans_expr will create another scope block
3608- // context for the block, but we've already got the
3609- // 'else' context
3610-
3611- else_res =
3597+ // Synthesize a block here to act as the else block
3598+ // containing an if expression. Needed in order for the
3599+ // else scope to behave like a normal block scope. A tad
3600+ // ugly.
3601+ // Calling trans_block directly instead of trans_expr
3602+ // because trans_expr will create another scope block
3603+ // context for the block, but we've already got the
3604+ // 'else' context
3605+ let else_res =
36123606 alt els {
36133607 some( elexpr) {
36143608 alt elexpr. node {
@@ -4908,7 +4902,7 @@ fn trans_call(cx: &@block_ctxt, f: &@ast::expr,
49084902 let llretslot = args_res. retslot ;
49094903 /*
49104904 log "calling: " + val_str(bcx_ccx(cx).tn, faddr);
4911-
4905+
49124906 for (ValueRef arg in llargs) {
49134907 log "arg: " + val_str(bcx_ccx(cx).tn, arg);
49144908 }
@@ -5334,9 +5328,9 @@ fn trans_expr_out(cx: &@block_ctxt, e: &@ast::expr, output: out_method) ->
53345328 }
53355329 _ {
53365330 // The expression is an lvalue. Fall through.
5337- assert ( ty:: is_lval ( e) ) ; // make sure it really is and that we
5338- // didn't forget to add a case for a new expr!
5339-
5331+ assert ( ty:: is_lval ( e) ) ;
5332+ // make sure it really is and that we
5333+ // didn't forget to add a case for a new expr!
53405334 }
53415335 }
53425336 // lval cases fall through to trans_lval and then
@@ -6352,8 +6346,8 @@ fn copy_args_to_allocas(fcx: @fn_ctxt, args: &ast::arg[],
63526346 alt bcx. fcx . llargs . find ( aarg. id ) {
63536347 some ( x) { argval = x; }
63546348 _ {
6355- bcx_ccx( bcx) . sess . span_fatal ( aarg . ty . span ,
6356- "unbound arg ID in copy_args_to_allocas" ) ;
6349+ bcx_ccx( bcx) . sess . span_fatal
6350+ ( aarg . ty . span , "unbound arg ID in copy_args_to_allocas" ) ;
63576351 }
63586352 }
63596353 bcx. build . Store ( argval, a) ;
@@ -6374,8 +6368,8 @@ fn add_cleanups_for_args(bcx: &@block_ctxt, args: &ast::arg[],
63746368 alt bcx. fcx . llargs . find ( aarg. id ) {
63756369 some ( x) { argval = x; }
63766370 _ {
6377- bcx_ccx( bcx) . sess . span_fatal ( aarg . ty . span ,
6378- "unbound arg ID in copy_args_to_allocas" ) ;
6371+ bcx_ccx( bcx) . sess . span_fatal
6372+ ( aarg . ty . span , "unbound arg ID in copy_args_to_allocas" ) ;
63796373 }
63806374 }
63816375 add_clean ( bcx, argval, arg_tys. ( arg_n) . ty ) ;
@@ -7227,9 +7221,8 @@ fn trans_tag_variant(cx: @local_ctxt, tag_id: ast::node_id,
72277221 let bcx = new_top_block_ctxt ( fcx) ;
72287222 let lltop = bcx. llbb ;
72297223
7230- let
7231- // Cast the tag to a type we can GEP into.
7232- llblobptr =
7224+ // Cast the tag to a type we can GEP into.
7225+ let llblobptr =
72337226 if is_degen {
72347227 fcx. llretptr
72357228 } else {
0 commit comments