Skip to content

Commit ea59272

Browse files
committed
---
yaml --- r: 146520 b: refs/heads/try2 c: 3851f90 h: refs/heads/master v: v3
1 parent 0e2f51a commit ea59272

File tree

144 files changed

+5662
-3934
lines changed

Some content is hidden

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

144 files changed

+5662
-3934
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: 2fcc70ec9d2f73b61285283aeb4abce4a4e84901
8+
refs/heads/try2: 3851f908d16b55dfe69d5a423ecbef4cd224fae2
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ ifdef TRACE
125125
CFG_RUSTC_FLAGS += -Z trace
126126
endif
127127
ifndef DEBUG_BORROWS
128+
RUSTFLAGS_STAGE0 += -Z no-debug-borrows
128129
RUSTFLAGS_STAGE1 += -Z no-debug-borrows
129130
RUSTFLAGS_STAGE2 += -Z no-debug-borrows
130131
endif

branches/try2/src/libextra/arc.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ impl<T:Send> MutexArc<T> {
233233

234234
/// As unsafe_access(), but with a condvar, as sync::mutex.lock_cond().
235235
#[inline]
236-
pub unsafe fn unsafe_access_cond<'x, 'c, U>(&self,
237-
blk: &fn(x: &'x mut T,
238-
c: &'c Condvar) -> U)
239-
-> U {
236+
pub unsafe fn unsafe_access_cond<U>(&self,
237+
blk: &fn(x: &mut T,
238+
c: &Condvar) -> U)
239+
-> U {
240240
let state = self.x.get();
241241
do (&(*state).lock).lock_cond |cond| {
242242
check_poison(true, (*state).failed);
@@ -290,10 +290,10 @@ impl<T:Freeze + Send> MutexArc<T> {
290290

291291
/// As unsafe_access_cond but safe and Freeze.
292292
#[inline]
293-
pub fn access_cond<'x, 'c, U>(&self,
294-
blk: &fn(x: &'x mut T,
295-
c: &'c Condvar) -> U)
296-
-> U {
293+
pub fn access_cond<U>(&self,
294+
blk: &fn(x: &mut T,
295+
c: &Condvar) -> U)
296+
-> U {
297297
unsafe { self.unsafe_access_cond(blk) }
298298
}
299299
}
@@ -402,9 +402,9 @@ impl<T:Freeze + Send> RWArc<T> {
402402

403403
/// As write(), but with a condvar, as sync::rwlock.write_cond().
404404
#[inline]
405-
pub fn write_cond<'x, 'c, U>(&self,
406-
blk: &fn(x: &'x mut T, c: &'c Condvar) -> U)
407-
-> U {
405+
pub fn write_cond<U>(&self,
406+
blk: &fn(x: &mut T, c: &Condvar) -> U)
407+
-> U {
408408
unsafe {
409409
let state = self.x.get();
410410
do (*borrow_rwlock(state)).write_cond |cond| {
@@ -554,9 +554,9 @@ impl<'self, T:Freeze + Send> RWWriteMode<'self, T> {
554554
}
555555

556556
/// Access the pre-downgrade RWArc in write mode with a condvar.
557-
pub fn write_cond<'x, 'c, U>(&mut self,
558-
blk: &fn(x: &'x mut T, c: &'c Condvar) -> U)
559-
-> U {
557+
pub fn write_cond<U>(&mut self,
558+
blk: &fn(x: &mut T, c: &Condvar) -> U)
559+
-> U {
560560
match *self {
561561
RWWriteMode {
562562
data: &ref mut data,

branches/try2/src/libextra/getopts.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,14 @@ impl Name {
185185
}
186186

187187
impl Matches {
188-
/// FIXME: #9311 This used to be private, but rustpkg somehow managed to depend on it.
189-
/// No idea what this does.
190-
pub fn opt_vals(&self, nm: &str) -> ~[Optval] {
188+
fn opt_vals(&self, nm: &str) -> ~[Optval] {
191189
match find_opt(self.opts, Name::from_str(nm)) {
192190
Some(id) => self.vals[id].clone(),
193191
None => fail!("No option '{}' defined", nm)
194192
}
195193
}
196194

197-
/// FIXME: #9311 This used to be private, but rustpkg somehow managed to depend on it.
198-
/// No idea what this does.
199-
pub fn opt_val(&self, nm: &str) -> Option<Optval> {
195+
fn opt_val(&self, nm: &str) -> Option<Optval> {
200196
let vals = self.opt_vals(nm);
201197
if (vals.is_empty()) {
202198
None

branches/try2/src/libextra/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Rust extras are part of the standard Rust distribution.
2121
*/
2222

2323
#[link(name = "extra",
24+
package_id = "extra",
2425
vers = "0.9-pre",
2526
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
2627
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,18 @@ pub fn build_link_meta(sess: Session,
635635
}
636636
}
637637

638+
fn crate_meta_pkgid(sess: Session, name: @str, opt_pkg_id: Option<@str>)
639+
-> @str {
640+
match opt_pkg_id {
641+
Some(v) if !v.is_empty() => v,
642+
_ => {
643+
let pkg_id = name.clone();
644+
warn_missing(sess, "package_id", pkg_id);
645+
pkg_id
646+
}
647+
}
648+
}
649+
638650
let ProvidedMetas {
639651
name: opt_name,
640652
vers: opt_vers,
@@ -643,15 +655,16 @@ pub fn build_link_meta(sess: Session,
643655
} = provided_link_metas(sess, c);
644656
let name = crate_meta_name(sess, output, opt_name);
645657
let vers = crate_meta_vers(sess, opt_vers);
658+
let pkg_id = crate_meta_pkgid(sess, name, opt_pkg_id);
646659
let dep_hashes = cstore::get_dep_hashes(sess.cstore);
647660
let extras_hash =
648661
crate_meta_extras_hash(symbol_hasher, cmh_items,
649-
dep_hashes, opt_pkg_id);
662+
dep_hashes, Some(pkg_id));
650663

651664
LinkMeta {
652665
name: name,
653666
vers: vers,
654-
package_id: opt_pkg_id,
667+
package_id: Some(pkg_id),
655668
extras_hash: extras_hash
656669
}
657670
}

branches/try2/src/librustc/driver/driver.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,20 +239,20 @@ pub fn phase_3_run_analysis_passes(sess: Session,
239239
time(time_passes, "resolution", (), |_|
240240
middle::resolve::resolve_crate(sess, lang_items, crate));
241241

242+
let named_region_map = time(time_passes, "lifetime resolution", (),
243+
|_| middle::resolve_lifetime::crate(sess, crate));
244+
242245
time(time_passes, "looking for entry point", (),
243246
|_| middle::entry::find_entry_point(sess, crate, ast_map));
244247

245248
let freevars = time(time_passes, "freevar finding", (), |_|
246249
freevars::annotate_freevars(def_map, crate));
247250

248251
let region_map = time(time_passes, "region resolution", (), |_|
249-
middle::region::resolve_crate(sess, def_map, crate));
250-
251-
let rp_set = time(time_passes, "region parameterization inference", (), |_|
252-
middle::region::determine_rp_in_crate(sess, ast_map, def_map, crate));
252+
middle::region::resolve_crate(sess, crate));
253253

254-
let ty_cx = ty::mk_ctxt(sess, def_map, ast_map, freevars,
255-
region_map, rp_set, lang_items);
254+
let ty_cx = ty::mk_ctxt(sess, def_map, named_region_map, ast_map, freevars,
255+
region_map, lang_items);
256256

257257
// passes are timed inside typeck
258258
let (method_map, vtable_map) = typeck::check_crate(

branches/try2/src/librustc/front/std_inject.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ impl fold::ast_fold for StandardLibraryInjector {
116116
segments: ~[
117117
ast::PathSegment {
118118
identifier: self.sess.ident_of("std"),
119-
lifetime: None,
119+
lifetimes: opt_vec::Empty,
120120
types: opt_vec::Empty,
121121
},
122122
ast::PathSegment {
123123
identifier: self.sess.ident_of("prelude"),
124-
lifetime: None,
124+
lifetimes: opt_vec::Empty,
125125
types: opt_vec::Empty,
126126
},
127127
],

branches/try2/src/librustc/front/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ fn path_node(ids: ~[ast::Ident]) -> ast::Path {
343343
global: false,
344344
segments: ids.move_iter().map(|identifier| ast::PathSegment {
345345
identifier: identifier,
346-
lifetime: None,
346+
lifetimes: opt_vec::Empty,
347347
types: opt_vec::Empty,
348348
}).collect()
349349
}
@@ -355,7 +355,7 @@ fn path_node_global(ids: ~[ast::Ident]) -> ast::Path {
355355
global: true,
356356
segments: ids.move_iter().map(|identifier| ast::PathSegment {
357357
identifier: identifier,
358-
lifetime: None,
358+
lifetimes: opt_vec::Empty,
359359
types: opt_vec::Empty,
360360
}).collect()
361361
}

branches/try2/src/librustc/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#[link(name = "rustc",
12+
package_id = "rustc",
1213
vers = "0.9-pre",
1314
uuid = "0ce89b41-2f92-459e-bbc1-8f5fe32f16cf",
1415
url = "https://github.com/mozilla/rust/tree/master/src/rustc")];
@@ -53,8 +54,10 @@ use syntax::diagnostic;
5354
pub mod middle {
5455
pub mod trans;
5556
pub mod ty;
57+
pub mod ty_fold;
5658
pub mod subst;
5759
pub mod resolve;
60+
pub mod resolve_lifetime;
5861
pub mod typeck;
5962
pub mod check_loop;
6063
pub mod check_match;

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub static tag_path_elt_name: uint = 0x43u;
8989
pub static tag_item_field: uint = 0x44u;
9090
pub static tag_struct_mut: uint = 0x45u;
9191

92-
pub static tag_region_param: uint = 0x46u;
92+
pub static tag_item_variances: uint = 0x46;
9393
pub static tag_mod_impl_trait: uint = 0x47u;
9494
/*
9595
trait items contain tag_item_trait_method elements,
@@ -193,6 +193,11 @@ pub static tag_path_elt_pretty_name: uint = 0x87;
193193
pub static tag_path_elt_pretty_name_ident: uint = 0x88;
194194
pub static tag_path_elt_pretty_name_extra: uint = 0x89;
195195

196+
pub static tag_region_param_def: uint = 0x100;
197+
pub static tag_region_param_def_ident: uint = 0x101;
198+
pub static tag_region_param_def_def_id: uint = 0x102;
199+
200+
196201
pub struct LinkMeta {
197202
name: @str,
198203
vers: @str,

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use metadata::common::*;
1515
use metadata::cstore;
1616
use metadata::decoder;
17-
use metadata;
1817
use middle::ty;
1918
use middle::typeck;
2019

@@ -144,6 +143,12 @@ pub fn get_trait_method_def_ids(cstore: @mut cstore::CStore,
144143
decoder::get_trait_method_def_ids(cdata, def.node)
145144
}
146145

146+
pub fn get_item_variances(cstore: @mut cstore::CStore,
147+
def: ast::DefId) -> ty::ItemVariances {
148+
let cdata = cstore::get_crate_data(cstore, def.crate);
149+
decoder::get_item_variances(cdata, def.node)
150+
}
151+
147152
pub fn get_provided_trait_methods(tcx: ty::ctxt,
148153
def: ast::DefId)
149154
-> ~[@ty::Method] {
@@ -199,12 +204,6 @@ pub fn get_trait_def(tcx: ty::ctxt, def: ast::DefId) -> ty::TraitDef {
199204
decoder::get_trait_def(cdata, def.node, tcx)
200205
}
201206

202-
pub fn get_region_param(cstore: @mut metadata::cstore::CStore,
203-
def: ast::DefId) -> Option<ty::region_variance> {
204-
let cdata = cstore::get_crate_data(cstore, def.crate);
205-
return decoder::get_region_param(cdata, def.node);
206-
}
207-
208207
pub fn get_field_type(tcx: ty::ctxt, class_id: ast::DefId,
209208
def: ast::DefId) -> ty::ty_param_bounds_and_ty {
210209
let cstore = tcx.cstore;
@@ -224,7 +223,7 @@ pub fn get_field_type(tcx: ty::ctxt, class_id: ast::DefId,
224223
let ty = decoder::item_type(def, the_field, tcx, cdata);
225224
ty::ty_param_bounds_and_ty {
226225
generics: ty::Generics {type_param_defs: @~[],
227-
region_param: None},
226+
region_param_defs: @[]},
228227
ty: ty
229228
}
230229
}

0 commit comments

Comments
 (0)