Skip to content

Commit 44aee11

Browse files
committed
---
yaml --- r: 148215 b: refs/heads/try2 c: 68ebe81 h: refs/heads/master i: 148213: afbbb3c 148211: 8b1b348 148207: e7d1adf v: v3
1 parent 1706ca6 commit 44aee11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+813
-964
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 72794094a17caa33cccf6a16d37c4e640f431f32
8+
refs/heads/try2: 68ebe8141a9d469ed7a7081e7a4a9ff4c82fbff7
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libextra/workcache.rs

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -209,28 +209,11 @@ impl Drop for Database {
209209
}
210210
}
211211

212-
pub struct Logger {
213-
// FIXME #4432: Fill in
214-
priv a: ()
215-
}
216-
217-
impl Logger {
218-
219-
pub fn new() -> Logger {
220-
Logger { a: () }
221-
}
222-
223-
pub fn info(&self, i: &str) {
224-
info!("workcache: {}", i);
225-
}
226-
}
227-
228212
pub type FreshnessMap = TreeMap<~str,extern fn(&str,&str)->bool>;
229213

230214
#[deriving(Clone)]
231215
pub struct Context {
232216
db: RWArc<Database>,
233-
priv logger: RWArc<Logger>,
234217
priv cfg: Arc<json::Object>,
235218
/// Map from kinds (source, exe, url, etc.) to a freshness function.
236219
/// The freshness function takes a name (e.g. file path) and value
@@ -275,18 +258,15 @@ fn json_decode<T:Decodable<json::Decoder>>(s: &str) -> T {
275258
impl Context {
276259

277260
pub fn new(db: RWArc<Database>,
278-
lg: RWArc<Logger>,
279261
cfg: Arc<json::Object>) -> Context {
280-
Context::new_with_freshness(db, lg, cfg, Arc::new(TreeMap::new()))
262+
Context::new_with_freshness(db, cfg, Arc::new(TreeMap::new()))
281263
}
282264

283265
pub fn new_with_freshness(db: RWArc<Database>,
284-
lg: RWArc<Logger>,
285266
cfg: Arc<json::Object>,
286267
freshness: Arc<FreshnessMap>) -> Context {
287268
Context {
288269
db: db,
289-
logger: lg,
290270
cfg: cfg,
291271
freshness: freshness
292272
}
@@ -378,15 +358,11 @@ impl<'a> Prep<'a> {
378358
None => fail!("missing freshness-function for '{}'", kind),
379359
Some(f) => (*f)(name, val)
380360
};
381-
self.ctxt.logger.write(|lg| {
382-
if fresh {
383-
lg.info(format!("{} {}:{} is fresh",
384-
cat, kind, name));
385-
} else {
386-
lg.info(format!("{} {}:{} is not fresh",
387-
cat, kind, name))
388-
}
389-
});
361+
if fresh {
362+
info!("{} {}:{} is fresh", cat, kind, name);
363+
} else {
364+
info!("{} {}:{} is not fresh", cat, kind, name);
365+
}
390366
fresh
391367
}
392368

@@ -509,7 +485,6 @@ fn test() {
509485
let db_path = make_path(~"db.json");
510486

511487
let cx = Context::new(RWArc::new(Database::new(db_path)),
512-
RWArc::new(Logger::new()),
513488
Arc::new(TreeMap::new()));
514489

515490
let s = cx.with_prep("test1", |prep| {

branches/try2/src/librustc/back/abi.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ pub static tydesc_field_size: uint = 0u;
4444
pub static tydesc_field_align: uint = 1u;
4545
pub static tydesc_field_take_glue: uint = 2u;
4646
pub static tydesc_field_drop_glue: uint = 3u;
47-
pub static tydesc_field_free_glue: uint = 4u;
48-
pub static tydesc_field_visit_glue: uint = 5u;
49-
pub static tydesc_field_borrow_offset: uint = 6u;
50-
pub static tydesc_field_name_offset: uint = 7u;
51-
pub static n_tydesc_fields: uint = 8u;
47+
pub static tydesc_field_visit_glue: uint = 4u;
48+
pub static tydesc_field_borrow_offset: uint = 5u;
49+
pub static tydesc_field_name_offset: uint = 6u;
50+
pub static n_tydesc_fields: uint = 7u;
5251

5352
// The two halves of a closure: code and environment.
5453
pub static fn_field_code: uint = 0u;

branches/try2/src/librustc/metadata/tydecode.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,11 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
354354
'V' => {
355355
let mt = parse_mt(st, |x,y| conv(x,y));
356356
let v = parse_vstore(st, |x,y| conv(x,y));
357-
return ty::mk_evec(st.tcx, mt, v);
357+
return ty::mk_vec(st.tcx, mt, v);
358358
}
359359
'v' => {
360360
let v = parse_vstore(st, |x,y| conv(x,y));
361-
return ty::mk_estr(st.tcx, v);
361+
return ty::mk_str(st.tcx, v);
362362
}
363363
'T' => {
364364
assert_eq!(next(st), '[');
@@ -410,7 +410,6 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
410410
let inner = parse_ty(st, |x,y| conv(x,y));
411411
inner
412412
}
413-
'B' => ty::mk_opaque_box(st.tcx),
414413
'a' => {
415414
assert_eq!(next(st), '[');
416415
let did = parse_def(st, NominalType, |x,y| conv(x,y));

branches/try2/src/librustc/metadata/tyencode.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,12 @@ fn enc_sty(w: &mut MemWriter, cx: @ctxt, st: &ty::sty) {
299299
enc_region(w, cx, r);
300300
enc_mt(w, cx, mt);
301301
}
302-
ty::ty_evec(mt, v) => {
302+
ty::ty_vec(mt, v) => {
303303
mywrite!(w, "V");
304304
enc_mt(w, cx, mt);
305305
enc_vstore(w, cx, v);
306306
}
307-
ty::ty_estr(v) => {
307+
ty::ty_str(v) => {
308308
mywrite!(w, "v");
309309
enc_vstore(w, cx, v);
310310
}
@@ -331,7 +331,6 @@ fn enc_sty(w: &mut MemWriter, cx: @ctxt, st: &ty::sty) {
331331
mywrite!(w, "C&");
332332
enc_sigil(w, p);
333333
}
334-
ty::ty_opaque_box => mywrite!(w, "B"),
335334
ty::ty_struct(def, ref substs) => {
336335
mywrite!(w, "a[{}|", (cx.ds)(def));
337336
enc_substs(w, cx, substs);

branches/try2/src/librustc/middle/astencode.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,6 @@ fn encode_method_map_entry(ecx: &e::EncodeContext,
578578
ebml_w.emit_struct_field("origin", 1u, |ebml_w| {
579579
mme.origin.encode(ebml_w);
580580
});
581-
ebml_w.emit_struct_field("self_mode", 3, |ebml_w| {
582-
mme.self_mode.encode(ebml_w);
583-
});
584581
})
585582
}
586583

@@ -602,11 +599,7 @@ impl<'a> read_method_map_entry_helper for reader::Decoder<'a> {
602599
let method_origin: method_origin =
603600
Decodable::decode(this);
604601
method_origin.tr(xcx)
605-
}),
606-
self_mode: this.read_struct_field("self_mode", 3, |this| {
607-
let self_mode: ty::SelfMode = Decodable::decode(this);
608-
self_mode
609-
}),
602+
})
610603
}
611604
})
612605
}

branches/try2/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ impl<'a> GatherLoanCtxt<'a> {
808808
*/
809809

810810
match ty::get(slice_ty).sty {
811-
ty::ty_evec(slice_mt, ty::vstore_slice(slice_r)) => {
811+
ty::ty_vec(slice_mt, ty::vstore_slice(slice_r)) => {
812812
(slice_mt.mutbl, slice_r)
813813
}
814814

branches/try2/src/librustc/middle/check_match.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fn check_exhaustive(cx: &MatchCheckCtxt, sp: Span, pats: ~[@Pat]) {
195195
}
196196
}
197197
}
198-
ty::ty_unboxed_vec(..) | ty::ty_evec(..) => {
198+
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
199199
match *ctor {
200200
vec(n) => Some(format!("vectors of length {}", n).to_managed()),
201201
_ => None
@@ -274,10 +274,10 @@ fn is_useful(cx: &MatchCheckCtxt, m: &matrix, v: &[@Pat]) -> useful {
274274
}
275275
not_useful
276276
}
277-
ty::ty_evec(_, ty::vstore_fixed(n)) => {
277+
ty::ty_vec(_, ty::vstore_fixed(n)) => {
278278
is_useful_specialized(cx, m, v, vec(n), n, left_ty)
279279
}
280-
ty::ty_unboxed_vec(..) | ty::ty_evec(..) => {
280+
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
281281
let max_len = m.rev_iter().fold(0, |max_len, r| {
282282
match r[0].node {
283283
PatVec(ref before, _, ref after) => {
@@ -437,7 +437,7 @@ fn missing_ctor(cx: &MatchCheckCtxt,
437437
else if true_found { Some(val(const_bool(false))) }
438438
else { Some(val(const_bool(true))) }
439439
}
440-
ty::ty_evec(_, ty::vstore_fixed(n)) => {
440+
ty::ty_vec(_, ty::vstore_fixed(n)) => {
441441
let mut missing = true;
442442
let mut wrong = false;
443443
for r in m.iter() {
@@ -460,7 +460,7 @@ fn missing_ctor(cx: &MatchCheckCtxt,
460460
_ => None
461461
}
462462
}
463-
ty::ty_unboxed_vec(..) | ty::ty_evec(..) => {
463+
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
464464

465465
// Find the lengths and slices of all vector patterns.
466466
let mut vec_pat_lens = m.iter().filter_map(|r| {
@@ -525,7 +525,7 @@ fn ctor_arity(cx: &MatchCheckCtxt, ctor: &ctor, ty: ty::t) -> uint {
525525
}
526526
}
527527
ty::ty_struct(cid, _) => ty::lookup_struct_fields(cx.tcx, cid).len(),
528-
ty::ty_unboxed_vec(..) | ty::ty_evec(..) => {
528+
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
529529
match *ctor {
530530
vec(n) => n,
531531
_ => 0u

branches/try2/src/librustc/middle/effect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl EffectCheckVisitor {
7171
debug!("effect: checking index with base type {}",
7272
ppaux::ty_to_str(self.tcx, base_type));
7373
match ty::get(base_type).sty {
74-
ty::ty_estr(..) => {
74+
ty::ty_str(..) => {
7575
self.tcx.sess.span_err(e.span,
7676
"modification of string types is not allowed");
7777
}

branches/try2/src/librustc/middle/lint.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -819,13 +819,13 @@ fn check_heap_type(cx: &Context, span: Span, ty: ty::t) {
819819
let mut n_uniq = 0;
820820
ty::fold_ty(cx.tcx, ty, |t| {
821821
match ty::get(t).sty {
822-
ty::ty_box(_) | ty::ty_estr(ty::vstore_box) |
823-
ty::ty_evec(_, ty::vstore_box) |
822+
ty::ty_box(_) | ty::ty_str(ty::vstore_box) |
823+
ty::ty_vec(_, ty::vstore_box) |
824824
ty::ty_trait(_, _, ty::BoxTraitStore, _, _) => {
825825
n_box += 1;
826826
}
827-
ty::ty_uniq(_) | ty::ty_estr(ty::vstore_uniq) |
828-
ty::ty_evec(_, ty::vstore_uniq) |
827+
ty::ty_uniq(_) | ty::ty_str(ty::vstore_uniq) |
828+
ty::ty_vec(_, ty::vstore_uniq) |
829829
ty::ty_trait(_, _, ty::UniqTraitStore, _, _) => {
830830
n_uniq += 1;
831831
}

branches/try2/src/librustc/middle/mem_categorization.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,31 +157,31 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
157157
match ty::get(t).sty {
158158
ty::ty_uniq(_) |
159159
ty::ty_trait(_, _, ty::UniqTraitStore, _, _) |
160-
ty::ty_evec(_, ty::vstore_uniq) |
161-
ty::ty_estr(ty::vstore_uniq) |
160+
ty::ty_vec(_, ty::vstore_uniq) |
161+
ty::ty_str(ty::vstore_uniq) |
162162
ty::ty_closure(ty::ClosureTy {sigil: ast::OwnedSigil, ..}) => {
163163
Some(deref_ptr(uniq_ptr))
164164
}
165165

166166
ty::ty_rptr(r, mt) |
167-
ty::ty_evec(mt, ty::vstore_slice(r)) => {
167+
ty::ty_vec(mt, ty::vstore_slice(r)) => {
168168
Some(deref_ptr(region_ptr(mt.mutbl, r)))
169169
}
170170

171171
ty::ty_trait(_, _, ty::RegionTraitStore(r), m, _) => {
172172
Some(deref_ptr(region_ptr(m, r)))
173173
}
174174

175-
ty::ty_estr(ty::vstore_slice(r)) |
175+
ty::ty_str(ty::vstore_slice(r)) |
176176
ty::ty_closure(ty::ClosureTy {sigil: ast::BorrowedSigil,
177177
region: r, ..}) => {
178178
Some(deref_ptr(region_ptr(ast::MutImmutable, r)))
179179
}
180180

181181
ty::ty_box(_) |
182-
ty::ty_evec(_, ty::vstore_box) |
182+
ty::ty_vec(_, ty::vstore_box) |
183183
ty::ty_trait(_, _, ty::BoxTraitStore, _, _) |
184-
ty::ty_estr(ty::vstore_box) => {
184+
ty::ty_str(ty::vstore_box) => {
185185
Some(deref_ptr(gc_ptr))
186186
}
187187

@@ -194,8 +194,8 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
194194
Some(deref_interior(InteriorField(PositionalField(0))))
195195
}
196196

197-
ty::ty_evec(_, ty::vstore_fixed(_)) |
198-
ty::ty_estr(ty::vstore_fixed(_)) => {
197+
ty::ty_vec(_, ty::vstore_fixed(_)) |
198+
ty::ty_str(ty::vstore_fixed(_)) => {
199199
Some(deref_interior(InteriorElement(element_kind(t))))
200200
}
201201

@@ -1247,8 +1247,8 @@ impl Repr for InteriorKind {
12471247

12481248
fn element_kind(t: ty::t) -> ElementKind {
12491249
match ty::get(t).sty {
1250-
ty::ty_evec(..) => VecElement,
1251-
ty::ty_estr(..) => StrElement,
1250+
ty::ty_vec(..) => VecElement,
1251+
ty::ty_str(..) => StrElement,
12521252
_ => OtherElement
12531253
}
12541254
}

0 commit comments

Comments
 (0)