Skip to content

Commit 3bba453

Browse files
committed
---
yaml --- r: 160767 b: refs/heads/auto c: c724131 h: refs/heads/master i: 160765: b6474e3 160763: 4a7494f 160759: 566cc61 160751: 4d29251 160735: bf9fb1b 160703: cdf2708 160639: 01d1670 160511: 6ac63fa 160255: a4c2f93 159743: 7152e79 v: v3
1 parent 3baabc3 commit 3bba453

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: b781c8b08e5b6b207c0422454ab8f319c90fe64d
13+
refs/heads/auto: c724131a8671786e72eef4aea3a369d0541ad482
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc_back/abi.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(non_upper_case_globals)]
12-
13-
pub const box_field_refcnt: uint = 0u;
14-
pub const box_field_drop_glue: uint = 1u;
15-
pub const box_field_body: uint = 4u;
11+
pub const BOX_FIELD_DROP_GLUE: uint = 1u;
12+
pub const BOX_FIELD_BODY: uint = 4u;
1613

1714
/// The first half of a fat pointer.
1815
/// - For a closure, this is the code address.

branches/auto/src/librustc_trans/trans/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ pub fn at_box_body<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
344344
let ccx = bcx.ccx();
345345
let ty = Type::at_box(ccx, type_of(ccx, body_t));
346346
let boxptr = PointerCast(bcx, boxptr, ty.ptr_to());
347-
GEPi(bcx, boxptr, &[0u, abi::box_field_body])
347+
GEPi(bcx, boxptr, &[0u, abi::BOX_FIELD_BODY])
348348
}
349349

350350
fn require_alloc_fn<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
@@ -394,7 +394,7 @@ pub fn malloc_raw_dyn_proc<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, t: Ty<'tcx>)
394394

395395
// Allocate space and store the destructor pointer:
396396
let Result {bcx, val: llbox} = malloc_raw_dyn(bcx, ptr_llty, t, size, llalign);
397-
let dtor_ptr = GEPi(bcx, llbox, &[0u, abi::box_field_drop_glue]);
397+
let dtor_ptr = GEPi(bcx, llbox, &[0u, abi::BOX_FIELD_DROP_GLUE]);
398398
let drop_glue_field_ty = type_of(ccx, ty::mk_nil_ptr(bcx.tcx()));
399399
let drop_glue = PointerCast(bcx, glue::get_drop_glue(ccx, ty::mk_uniq(bcx.tcx(), t)),
400400
drop_glue_field_ty);

branches/auto/src/librustc_trans/trans/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pub fn store_environment<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
208208
bv.to_string(ccx)).as_slice());
209209
}
210210

211-
let bound_data = GEPi(bcx, llbox, &[0u, abi::box_field_body, i]);
211+
let bound_data = GEPi(bcx, llbox, &[0u, abi::BOX_FIELD_BODY, i]);
212212

213213
match bv.action {
214214
ast::CaptureByValue => {

branches/auto/src/librustc_trans/trans/glue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ fn make_drop_glue<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, v0: ValueRef, t: Ty<'tcx>)
445445
let env_ptr_ty = Type::at_box(bcx.ccx(), Type::i8(bcx.ccx())).ptr_to();
446446
let env = PointerCast(bcx, env, env_ptr_ty);
447447
with_cond(bcx, IsNotNull(bcx, env), |bcx| {
448-
let dtor_ptr = GEPi(bcx, env, &[0u, abi::box_field_drop_glue]);
448+
let dtor_ptr = GEPi(bcx, env, &[0u, abi::BOX_FIELD_DROP_GLUE]);
449449
let dtor = Load(bcx, dtor_ptr);
450450
Call(bcx, dtor, &[PointerCast(bcx, box_cell_v, Type::i8p(bcx.ccx()))], None);
451451
bcx

0 commit comments

Comments
 (0)