Skip to content

Commit ff01461

Browse files
committed
---
yaml --- r: 109173 b: refs/heads/dist-snap c: 405b5fc h: refs/heads/master i: 109171: 0c48679 v: v3
1 parent 75f6bc7 commit ff01461

39 files changed

+174
-1006
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 4ca51aeea7187a63b987129d67cf7d348b6c60a9
9+
refs/heads/dist-snap: 405b5fc1ee21cc6bc29f97719600bd94066dd58c
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libnum/bigint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl TotalOrd for BigUint {
117117
if s_len < o_len { return Less; }
118118
if s_len > o_len { return Greater; }
119119

120-
for (&self_i, &other_i) in self.data.iter().rev().zip(other.data.iter().rev()) {
120+
for (&self_i, &other_i) in self.data.rev_iter().zip(other.data.rev_iter()) {
121121
if self_i < other_i { return Less; }
122122
if self_i > other_i { return Greater; }
123123
}
@@ -788,7 +788,7 @@ impl BigUint {
788788

789789
let mut borrow = 0;
790790
let mut shifted_rev = Vec::with_capacity(self.data.len());
791-
for elem in self.data.iter().rev() {
791+
for elem in self.data.rev_iter() {
792792
shifted_rev.push((*elem >> n_bits) | borrow);
793793
borrow = *elem << (BigDigit::bits - n_bits);
794794
}

branches/dist-snap/src/librustc/driver/driver.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,6 @@ pub fn phase_3_run_analysis_passes(sess: Session,
305305
time(time_passes, "resolution", (), |_|
306306
middle::resolve::resolve_crate(&sess, lang_items, krate));
307307

308-
// Discard MTWT tables that aren't required past resolution.
309-
syntax::ext::mtwt::clear_tables();
310-
311308
let named_region_map = time(time_passes, "lifetime resolution", (),
312309
|_| middle::resolve_lifetime::krate(&sess, krate));
313310

@@ -588,10 +585,6 @@ pub fn compile_input(sess: Session, cfg: ast::CrateConfig, input: &Input,
588585
if stop_after_phase_3(&analysis.ty_cx.sess) { return; }
589586
let (tcx, trans) = phase_4_translate_to_llvm(expanded_crate,
590587
analysis, &outputs);
591-
592-
// Discard interned strings as they are no longer required.
593-
token::get_ident_interner().clear();
594-
595588
(outputs, trans, tcx.sess)
596589
};
597590
phase_5_run_llvm_passes(&sess, &trans, &outputs);

branches/dist-snap/src/librustc/metadata/tyencode.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,11 @@ fn enc_sty(w: &mut MemWriter, cx: &ctxt, st: &ty::sty) {
280280
enc_substs(w, cx, substs);
281281
mywrite!(w, "]");
282282
}
283-
ty::ty_trait(def, ref substs, store, mt, bounds) => {
284-
mywrite!(w, "x[{}|", (cx.ds)(def));
283+
ty::ty_trait(~ty::TyTrait { def_id, ref substs, store, mutability, bounds }) => {
284+
mywrite!(w, "x[{}|", (cx.ds)(def_id));
285285
enc_substs(w, cx, substs);
286286
enc_trait_store(w, cx, store);
287-
enc_mutability(w, mt);
287+
enc_mutability(w, mutability);
288288
let bounds = ty::ParamBounds {builtin_bounds: bounds,
289289
trait_bounds: Vec::new()};
290290
enc_bounds(w, cx, &bounds);

branches/dist-snap/src/librustc/middle/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ fn is_useful(cx: &MatchCheckCtxt, m: &matrix, v: &[@Pat]) -> useful {
288288
is_useful_specialized(cx, m, v, vec(n), n, left_ty)
289289
}
290290
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
291-
let max_len = m.iter().rev().fold(0, |max_len, r| {
291+
let max_len = m.rev_iter().fold(0, |max_len, r| {
292292
match r.get(0).node {
293293
PatVec(ref before, _, ref after) => {
294294
cmp::max(before.len() + after.len(), max_len)

branches/dist-snap/src/librustc/middle/kind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ pub fn check_expr(cx: &mut Context, e: &Expr) {
358358
fn check_trait_cast(cx: &mut Context, source_ty: ty::t, target_ty: ty::t, span: Span) {
359359
check_cast_for_escaping_regions(cx, source_ty, target_ty, span);
360360
match ty::get(target_ty).sty {
361-
ty::ty_trait(_, _, _, _, bounds) => {
361+
ty::ty_trait(~ty::TyTrait { bounds, .. }) => {
362362
check_trait_cast_bounds(cx, span, source_ty, bounds);
363363
}
364364
_ => {}

branches/dist-snap/src/librustc/middle/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ fn check_heap_type(cx: &Context, span: Span, ty: ty::t) {
911911
}
912912
ty::ty_uniq(_) | ty::ty_str(ty::vstore_uniq) |
913913
ty::ty_vec(_, ty::vstore_uniq) |
914-
ty::ty_trait(_, _, ty::UniqTraitStore, _, _) => {
914+
ty::ty_trait(~ty::TyTrait { store: ty::UniqTraitStore, .. }) => {
915915
n_uniq += 1;
916916
}
917917
ty::ty_closure(ref c) if c.sigil == ast::OwnedSigil => {

branches/dist-snap/src/librustc/middle/liveness.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ impl<'a> Liveness<'a> {
879879
fn propagate_through_block(&mut self, blk: &Block, succ: LiveNode)
880880
-> LiveNode {
881881
let succ = self.propagate_through_opt_expr(blk.expr, succ);
882-
blk.stmts.iter().rev().fold(succ, |succ, stmt| {
882+
blk.stmts.rev_iter().fold(succ, |succ, stmt| {
883883
self.propagate_through_stmt(*stmt, succ)
884884
})
885885
}
@@ -980,7 +980,7 @@ impl<'a> Liveness<'a> {
980980
this.ir.tcx.sess.span_bug(expr.span, "no registered caps");
981981
}
982982
};
983-
caps.deref().iter().rev().fold(succ, |succ, cap| {
983+
caps.deref().rev_iter().fold(succ, |succ, cap| {
984984
this.init_from_succ(cap.ln, succ);
985985
let var = this.variable(cap.var_nid, expr.span);
986986
this.acc(cap.ln, var, ACC_READ | ACC_USE);
@@ -1121,7 +1121,7 @@ impl<'a> Liveness<'a> {
11211121

11221122
ExprStruct(_, ref fields, with_expr) => {
11231123
let succ = self.propagate_through_opt_expr(with_expr, succ);
1124-
fields.iter().rev().fold(succ, |succ, field| {
1124+
fields.rev_iter().fold(succ, |succ, field| {
11251125
self.propagate_through_expr(field.expr, succ)
11261126
})
11271127
}
@@ -1173,14 +1173,14 @@ impl<'a> Liveness<'a> {
11731173
}
11741174

11751175
ExprInlineAsm(ref ia) => {
1176-
let succ = ia.outputs.iter().rev().fold(succ, |succ, &(_, expr)| {
1176+
let succ = ia.outputs.rev_iter().fold(succ, |succ, &(_, expr)| {
11771177
// see comment on lvalues in
11781178
// propagate_through_lvalue_components()
11791179
let succ = self.write_lvalue(expr, succ, ACC_WRITE);
11801180
self.propagate_through_lvalue_components(expr, succ)
11811181
});
11821182
// Inputs are executed first. Propagate last because of rev order
1183-
ia.inputs.iter().rev().fold(succ, |succ, &(_, expr)| {
1183+
ia.inputs.rev_iter().fold(succ, |succ, &(_, expr)| {
11841184
self.propagate_through_expr(expr, succ)
11851185
})
11861186
}

branches/dist-snap/src/librustc/middle/mem_categorization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ pub enum deref_kind {
170170
pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
171171
match ty::get(t).sty {
172172
ty::ty_uniq(_) |
173-
ty::ty_trait(_, _, ty::UniqTraitStore, _, _) |
173+
ty::ty_trait(~ty::TyTrait { store: ty::UniqTraitStore, .. }) |
174174
ty::ty_vec(_, ty::vstore_uniq) |
175175
ty::ty_str(ty::vstore_uniq) |
176176
ty::ty_closure(ty::ClosureTy {sigil: ast::OwnedSigil, ..}) => {
@@ -183,7 +183,7 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
183183
Some(deref_ptr(BorrowedPtr(kind, r)))
184184
}
185185

186-
ty::ty_trait(_, _, ty::RegionTraitStore(r), m, _) => {
186+
ty::ty_trait(~ty::TyTrait { store: ty::RegionTraitStore(r), mutability: m, .. }) => {
187187
let kind = ty::BorrowKind::from_mutbl(m);
188188
Some(deref_ptr(BorrowedPtr(kind, r)))
189189
}

branches/dist-snap/src/librustc/middle/resolve.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5520,8 +5520,7 @@ impl<'a> Resolver<'a> {
55205520
if idents.len() == 0 {
55215521
return ~"???";
55225522
}
5523-
return self.idents_to_str(idents.move_iter()
5524-
.rev()
5523+
return self.idents_to_str(idents.move_rev_iter()
55255524
.collect::<Vec<ast::Ident>>()
55265525
.as_slice());
55275526
}

branches/dist-snap/src/librustc/middle/trans/cabi.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ pub enum ArgKind {
2525
/// LLVM type or by coercing to another specified type
2626
Direct,
2727
/// Pass the argument indirectly via a hidden pointer
28-
Indirect,
29-
/// Ignore the argument (useful for empty struct)
30-
Ignore,
28+
Indirect
3129
}
3230

3331
/// Information about how a specific C type
@@ -70,27 +68,13 @@ impl ArgType {
7068
}
7169
}
7270

73-
pub fn ignore(ty: Type) -> ArgType {
74-
ArgType {
75-
kind: Ignore,
76-
ty: ty,
77-
cast: None,
78-
pad: None,
79-
attr: None,
80-
}
81-
}
82-
8371
pub fn is_direct(&self) -> bool {
8472
return self.kind == Direct;
8573
}
8674

8775
pub fn is_indirect(&self) -> bool {
8876
return self.kind == Indirect;
8977
}
90-
91-
pub fn is_ignore(&self) -> bool {
92-
return self.kind == Ignore;
93-
}
9478
}
9579

9680
/// Metadata describing how the arguments to a native function

branches/dist-snap/src/librustc/middle/trans/cabi_x86.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,8 @@ pub fn compute_abi_info(ccx: &CrateContext,
6363
ret_ty = ArgType::direct(rty, None, None, None);
6464
}
6565

66-
for &t in atys.iter() {
67-
let ty = match t.kind() {
68-
Struct => {
69-
let size = llsize_of_alloc(ccx, t);
70-
if size == 0 {
71-
ArgType::ignore(t)
72-
} else {
73-
ArgType::indirect(t, Some(ByValAttribute))
74-
}
75-
}
76-
_ => ArgType::direct(t, None, None, None),
77-
};
78-
arg_tys.push(ty);
66+
for &a in atys.iter() {
67+
arg_tys.push(ArgType::direct(a, None, None, None));
7968
}
8069

8170
return FnType {

branches/dist-snap/src/librustc/middle/trans/debuginfo.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,9 @@ fn type_metadata(cx: &CrateContext,
21262126
ty::ty_closure(ref closurety) => {
21272127
subroutine_type_metadata(cx, &closurety.sig, usage_site_span)
21282128
},
2129-
ty::ty_trait(def_id, ref substs, trait_store, mutability, ref bounds) => {
2129+
ty::ty_trait(~ty::TyTrait { def_id, ref substs,
2130+
store: trait_store, mutability,
2131+
ref bounds }) => {
21302132
trait_metadata(cx, def_id, t, substs, trait_store, mutability, bounds)
21312133
},
21322134
ty::ty_struct(def_id, ref substs) => {

branches/dist-snap/src/librustc/middle/trans/foreign.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,6 @@ pub fn trans_native_call<'a>(
325325
for (i, &llarg_rust) in llargs_rust.iter().enumerate() {
326326
let mut llarg_rust = llarg_rust;
327327

328-
if arg_tys[i].is_ignore() {
329-
continue;
330-
}
331-
332328
// Does Rust pass this argument by pointer?
333329
let rust_indirect = type_of::arg_is_indirect(ccx,
334330
*passed_arg_tys.get(i));
@@ -905,9 +901,6 @@ fn lltype_for_fn_from_foreign_types(ccx: &CrateContext, tys: &ForeignTypes) -> T
905901
};
906902

907903
for &arg_ty in tys.fn_ty.arg_tys.iter() {
908-
if arg_ty.is_ignore() {
909-
continue;
910-
}
911904
// add padding
912905
match arg_ty.pad {
913906
Some(ty) => llargument_tys.push(ty),
@@ -956,9 +949,6 @@ fn add_argument_attributes(tys: &ForeignTypes,
956949
}
957950

958951
for &arg_ty in tys.fn_ty.arg_tys.iter() {
959-
if arg_ty.is_ignore() {
960-
continue;
961-
}
962952
// skip padding
963953
if arg_ty.pad.is_some() { i += 1; }
964954

branches/dist-snap/src/librustc/middle/trans/glue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ fn make_drop_glue<'a>(bcx: &'a Block<'a>, v0: ValueRef, t: ty::t) -> &'a Block<'
310310
}
311311
}
312312
}
313-
ty::ty_trait(_, _, ty::UniqTraitStore, _, _) => {
313+
ty::ty_trait(~ty::TyTrait { store: ty::UniqTraitStore, .. }) => {
314314
let lluniquevalue = GEPi(bcx, v0, [0, abi::trt_field_box]);
315315
// Only drop the value when it is non-null
316316
with_cond(bcx, IsNotNull(bcx, Load(bcx, lluniquevalue)), |bcx| {

branches/dist-snap/src/librustc/middle/trans/reflect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ impl<'a> Reflector<'a> {
351351
})
352352
}
353353

354-
ty::ty_trait(_, _, _, _, _) => {
354+
ty::ty_trait(..) => {
355355
let extra = [
356356
self.c_slice(token::intern_and_get_ident(ty_to_str(tcx, t)))
357357
];

0 commit comments

Comments
 (0)