Skip to content

Commit a5563e1

Browse files
committed
Clean up whitespace oddities perpetrated by pretty-printer.
1 parent efc55b2 commit a5563e1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/comp/middle/trans.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7086,40 +7086,39 @@ fn trans_obj(@local_ctxt cx, &span sp, &ast::_obj ob, ast::def_id oid,
70867086
// there's not much to do.
70877087

70887088
// Store null into pair, if no args or typarams.
7089-
70907089
bcx.build.Store(C_null(llbox_ty), pair_box);
70917090
} else {
70927091
// Otherwise, we have to synthesize a big structural type for the
70937092
// object body.
7094-
70957093
let vec[ty::t] obj_fields = [];
70967094
for (ty::arg a in arg_tys) { vec::push[ty::t](obj_fields, a.ty); }
7097-
// Tuple type for fields: [field, ...]
70987095

7096+
// Tuple type for fields: [field, ...]
70997097
let ty::t fields_ty = ty::mk_imm_tup(ccx.tcx, obj_fields);
7100-
// Tuple type for typarams: [typaram, ...]
71017098

71027099
auto tydesc_ty = ty::mk_type(ccx.tcx);
71037100
let vec[ty::t] tps = [];
71047101
for (ast::ty_param tp in ty_params) {
71057102
vec::push[ty::t](tps, tydesc_ty);
71067103
}
7104+
7105+
// Tuple type for typarams: [typaram, ...]
71077106
let ty::t typarams_ty = ty::mk_imm_tup(ccx.tcx, tps);
7108-
// Tuple type for body: [tydesc_ty, [typaram, ...], [field, ...]]
71097107

7108+
// Tuple type for body: [tydesc_ty, [typaram, ...], [field, ...]]
71107109
let ty::t body_ty =
71117110
ty::mk_imm_tup(ccx.tcx, [tydesc_ty, typarams_ty, fields_ty]);
7111+
71127112
// Hand this type we've synthesized off to trans_malloc_boxed, which
71137113
// allocates a box, including space for a refcount.
7114-
71157114
auto box = trans_malloc_boxed(bcx, body_ty);
71167115
bcx = box.bcx;
7116+
71177117
// mk_imm_box throws a refcount into the type we're synthesizing, so
71187118
// that it looks like: [rc, [tydesc_ty, [typaram, ...], [field, ...]]]
7119-
71207119
let ty::t boxed_body_ty = ty::mk_imm_box(ccx.tcx, body_ty);
7121-
// Grab onto the refcount and body parts of the box we allocated.
71227120

7121+
// Grab onto the refcount and body parts of the box we allocated.
71237122
auto rc =
71247123
GEP_tup_like(bcx, boxed_body_ty, box.val,
71257124
[0, abi::box_rc_field_refcnt]);
@@ -7129,6 +7128,7 @@ fn trans_obj(@local_ctxt cx, &span sp, &ast::_obj ob, ast::def_id oid,
71297128
[0, abi::box_rc_field_body]);
71307129
bcx = body.bcx;
71317130
bcx.build.Store(C_int(1), rc.val);
7131+
71327132
// Put together a tydesc for the body, so that the object can later be
71337133
// freed by calling through its tydesc.
71347134

@@ -7148,6 +7148,7 @@ fn trans_obj(@local_ctxt cx, &span sp, &ast::_obj ob, ast::def_id oid,
71487148
lazily_emit_tydesc_glue(bcx, abi::tydesc_field_free_glue, ti);
71497149
bcx = body_td.bcx;
71507150
bcx.build.Store(body_td.val, body_tydesc.val);
7151+
71517152
// Copy the object's type parameters and fields into the space we
71527153
// allocated for the object body. (This is something like saving the
71537154
// lexical environment of a function in its closure: the "captured
@@ -7156,7 +7157,6 @@ fn trans_obj(@local_ctxt cx, &span sp, &ast::_obj ob, ast::def_id oid,
71567157
// Likewise for the object's fields.)
71577158

71587159
// Copy typarams into captured typarams.
7159-
71607160
auto body_typarams =
71617161
GEP_tup_like(bcx, body_ty, body.val,
71627162
[0, abi::obj_body_elt_typarams]);
@@ -7170,8 +7170,8 @@ fn trans_obj(@local_ctxt cx, &span sp, &ast::_obj ob, ast::def_id oid,
71707170
bcx = copy_val(bcx, INIT, capture.val, typaram, tydesc_ty).bcx;
71717171
i += 1;
71727172
}
7173-
// Copy args into body fields.
71747173

7174+
// Copy args into body fields.
71757175
auto body_fields =
71767176
GEP_tup_like(bcx, body_ty, body.val,
71777177
[0, abi::obj_body_elt_fields]);
@@ -7186,14 +7186,14 @@ fn trans_obj(@local_ctxt cx, &span sp, &ast::_obj ob, ast::def_id oid,
71867186
bcx = copy_val(bcx, INIT, field.val, arg, arg_tys.(i).ty).bcx;
71877187
i += 1;
71887188
}
7189-
// Store box ptr in outer pair.
71907189

7190+
// Store box ptr in outer pair.
71917191
auto p = bcx.build.PointerCast(box.val, llbox_ty);
71927192
bcx.build.Store(p, pair_box);
71937193
}
71947194
bcx.build.RetVoid();
7195-
// Insert the mandatory first few basic blocks before lltop.
71967195

7196+
// Insert the mandatory first few basic blocks before lltop.
71977197
finish_fn(fcx, lltop);
71987198
}
71997199

0 commit comments

Comments
 (0)