Skip to content

Commit f91985d

Browse files
committed
---
yaml --- r: 107721 b: refs/heads/dist-snap c: c6bd053 h: refs/heads/master i: 107719: 61f4bbb v: v3
1 parent fcd7179 commit f91985d

File tree

137 files changed

+1838
-2368
lines changed

Some content is hidden

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

137 files changed

+1838
-2368
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: e901c4caf30353f6adf12e6b10a46a4de517ec9d
9+
refs/heads/dist-snap: c6bd05303c37d354e08278fcdebd95ca7fec9fd9
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ src/.DS_Store
7575
/doc/latex
7676
/doc/std
7777
/doc/extra
78+
/doc/flate
7879
/doc/green
7980
/doc/native
8081
/doc/rustc
8182
/doc/syntax
83+
/doc/rustdoc
8284
/doc/rustuv
8385
/doc/rustpkg
8486
/nd/

branches/dist-snap/doc/guide-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ implemented in user-space.
176176
The primary concern of an M:N runtime is that a Rust task cannot block itself in
177177
a syscall. If this happens, then the entire OS thread is frozen and unavailable
178178
for running more Rust tasks, making this a (M-1):N runtime (and you can see how
179-
this can reach 0/deadlock. By using asynchronous I/O under the hood (all I/O
179+
this can reach 0/deadlock). By using asynchronous I/O under the hood (all I/O
180180
still looks synchronous in terms of code), OS threads are never blocked until
181181
the appropriate time comes.
182182

branches/dist-snap/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ ifeq ($(NO_REBUILD),)
344344
STDTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(SREQ$(1)_T_$(2)_H_$(3)) \
345345
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.extra \
346346
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustuv \
347-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green
347+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green \
348+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.native
348349
else
349350
STDTESTDEP_$(1)_$(2)_$(3)_$(4) =
350351
endif

branches/dist-snap/src/etc/generate-deriving-span-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def write_file(name, string):
118118
for (trait, supers, errs) in [('Rand', [], 1),
119119
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
120120
('Eq', [], 2), ('Ord', [], 8),
121-
('TotalEq', [], 2), ('TotalOrd', ['TotalEq'], 2)]:
121+
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1)]:
122122
traits[trait] = (ALL, supers, errs)
123123

124124
for (trait, (types, super_traits, error_count)) in traits.items():

branches/dist-snap/src/libextra/dlist.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ struct Node<T> {
4747
}
4848

4949
/// Double-ended DList iterator
50-
#[deriving(Clone)]
5150
pub struct Items<'a, T> {
5251
priv head: &'a Link<T>,
5352
priv tail: Rawlink<Node<T>>,
5453
priv nelem: uint,
5554
}
5655

56+
// FIXME #11820: the &'a Option<> of the Link stops clone working.
57+
impl<'a, T> Clone for Items<'a, T> {
58+
fn clone(&self) -> Items<'a, T> { *self }
59+
}
60+
5761
/// Double-ended mutable DList iterator
5862
pub struct MutItems<'a, T> {
5963
priv list: &'a mut DList<T>,

branches/dist-snap/src/libextra/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ pub fn run_test(force_ignore: bool,
895895
return;
896896
}
897897
StaticBenchFn(benchfn) => {
898-
let bs = ::test::bench::benchmark(benchfn);
898+
let bs = ::test::bench::benchmark(|harness| benchfn(harness));
899899
monitor_ch.send((desc, TrBench(bs)));
900900
return;
901901
}

branches/dist-snap/src/librustc/back/abi.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ pub static general_code_alignment: uint = 16u;
4242

4343
pub static tydesc_field_size: uint = 0u;
4444
pub static tydesc_field_align: uint = 1u;
45-
pub static tydesc_field_take_glue: uint = 2u;
46-
pub static tydesc_field_drop_glue: uint = 3u;
47-
pub static tydesc_field_visit_glue: uint = 4u;
48-
pub static tydesc_field_name_offset: uint = 5u;
49-
pub static n_tydesc_fields: uint = 6u;
45+
pub static tydesc_field_drop_glue: uint = 2u;
46+
pub static tydesc_field_visit_glue: uint = 3u;
47+
pub static tydesc_field_name_offset: uint = 4u;
48+
pub static n_tydesc_fields: uint = 5u;
5049

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

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

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -897,42 +897,56 @@ pub fn build_session_options(binary: ~str,
897897
return sopts;
898898
}
899899

900-
pub fn build_session(sopts: @session::Options, demitter: @diagnostic::Emitter)
900+
pub fn build_session(sopts: @session::Options,
901+
local_crate_source_file: Option<Path>,
902+
demitter: @diagnostic::Emitter)
901903
-> Session {
902904
let codemap = @codemap::CodeMap::new();
903905
let diagnostic_handler =
904906
diagnostic::mk_handler(Some(demitter));
905907
let span_diagnostic_handler =
906908
diagnostic::mk_span_handler(diagnostic_handler, codemap);
907-
build_session_(sopts, codemap, demitter, span_diagnostic_handler)
909+
910+
build_session_(sopts, local_crate_source_file, codemap, demitter, span_diagnostic_handler)
908911
}
909912

910913
pub fn build_session_(sopts: @session::Options,
911-
cm: @codemap::CodeMap,
914+
local_crate_source_file: Option<Path>,
915+
codemap: @codemap::CodeMap,
912916
demitter: @diagnostic::Emitter,
913917
span_diagnostic_handler: @diagnostic::SpanHandler)
914918
-> Session {
915919
let target_cfg = build_target_config(sopts, demitter);
916-
let p_s = parse::new_parse_sess_special_handler(span_diagnostic_handler,
917-
cm);
920+
let p_s = parse::new_parse_sess_special_handler(span_diagnostic_handler, codemap);
918921
let cstore = @CStore::new(token::get_ident_interner());
919922
let filesearch = @filesearch::FileSearch::new(
920923
&sopts.maybe_sysroot,
921924
sopts.target_triple,
922925
sopts.addl_lib_search_paths);
926+
927+
// Make the path absolute, if necessary
928+
let local_crate_source_file = local_crate_source_file.map(|path|
929+
if path.is_absolute() {
930+
path.clone()
931+
} else {
932+
os::getcwd().join(path.clone())
933+
}
934+
);
935+
923936
@Session_ {
924937
targ_cfg: target_cfg,
925938
opts: sopts,
926939
cstore: cstore,
927940
parse_sess: p_s,
928-
codemap: cm,
941+
codemap: codemap,
929942
// For a library crate, this is always none
930943
entry_fn: RefCell::new(None),
931944
entry_type: Cell::new(None),
932945
macro_registrar_fn: RefCell::new(None),
933946
span_diagnostic: span_diagnostic_handler,
934947
filesearch: filesearch,
935948
building_library: Cell::new(false),
949+
local_crate_source_file: local_crate_source_file,
936950
working_dir: os::getcwd(),
937951
lints: RefCell::new(HashMap::new()),
938952
node_id: Cell::new(1),
@@ -1164,13 +1178,8 @@ mod test {
11641178
Ok(m) => m,
11651179
Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
11661180
};
1167-
let sessopts = build_session_options(
1168-
~"rustc",
1169-
matches,
1170-
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
1171-
let sess = build_session(sessopts,
1172-
@diagnostic::DefaultEmitter as
1173-
@diagnostic::Emitter);
1181+
let sessopts = build_session_options(~"rustc", matches, @diagnostic::DefaultEmitter);
1182+
let sess = build_session(sessopts, None, @diagnostic::DefaultEmitter);
11741183
let cfg = build_configuration(sess);
11751184
assert!((attr::contains_name(cfg, "test")));
11761185
}
@@ -1187,13 +1196,8 @@ mod test {
11871196
f.to_err_msg());
11881197
}
11891198
};
1190-
let sessopts = build_session_options(
1191-
~"rustc",
1192-
matches,
1193-
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
1194-
let sess = build_session(sessopts,
1195-
@diagnostic::DefaultEmitter as
1196-
@diagnostic::Emitter);
1199+
let sessopts = build_session_options(~"rustc", matches, @diagnostic::DefaultEmitter);
1200+
let sess = build_session(sessopts, None, @diagnostic::DefaultEmitter);
11971201
let cfg = build_configuration(sess);
11981202
let mut test_items = cfg.iter().filter(|m| "test" == m.name());
11991203
assert!(test_items.next().is_some());

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ pub struct Session_ {
211211
macro_registrar_fn: RefCell<Option<ast::DefId>>,
212212
filesearch: @filesearch::FileSearch,
213213
building_library: Cell<bool>,
214+
// The name of the root source file of the crate, in the local file system. The path is always
215+
// expected to be absolute. `None` means that there is no source file.
216+
local_crate_source_file: Option<Path>,
214217
working_dir: Path,
215218
lints: RefCell<HashMap<ast::NodeId,
216219
~[(lint::Lint, codemap::Span, ~str)]>>,

branches/dist-snap/src/librustc/front/feature_gate.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
4646
("phase", Active),
4747
("macro_registrar", Active),
4848
("log_syntax", Active),
49+
("trace_macros", Active),
50+
("simd", Active),
4951

5052
// These are used to test this portion of the compiler, they don't actually
5153
// mean anything
@@ -170,6 +172,13 @@ impl Visitor<()> for Context {
170172
}
171173
}
172174

175+
ast::ItemStruct(..) => {
176+
if attr::contains_name(i.attrs, "simd") {
177+
self.gate_feature("simd", i.span,
178+
"SIMD types are experimental and possibly buggy");
179+
}
180+
}
181+
173182
_ => {}
174183
}
175184

@@ -193,6 +202,10 @@ impl Visitor<()> for Context {
193202
self.gate_feature("log_syntax", path.span, "`log_syntax!` is not \
194203
stable enough for use and is subject to change");
195204
}
205+
else if path.segments.last().unwrap().identifier == self.sess.ident_of("trace_macros") {
206+
self.gate_feature("trace_macros", path.span, "`trace_macros` is not \
207+
stable enough for use and is subject to change");
208+
}
196209
}
197210

198211
fn visit_ty(&mut self, t: &ast::Ty, _: ()) {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,22 +230,22 @@ pub fn run_compiler(args: &[~str], demitter: @diagnostic::Emitter) {
230230
version(binary);
231231
return;
232232
}
233-
let input = match matches.free.len() {
233+
let (input, input_file_path) = match matches.free.len() {
234234
0u => d::early_error(demitter, "no input filename given"),
235235
1u => {
236236
let ifile = matches.free[0].as_slice();
237237
if "-" == ifile {
238238
let src = str::from_utf8_owned(io::stdin().read_to_end()).unwrap();
239-
d::StrInput(src.to_managed())
239+
(d::StrInput(src.to_managed()), None)
240240
} else {
241-
d::FileInput(Path::new(ifile))
241+
(d::FileInput(Path::new(ifile)), Some(Path::new(ifile)))
242242
}
243243
}
244244
_ => d::early_error(demitter, "multiple input filenames provided")
245245
};
246246

247247
let sopts = d::build_session_options(binary, matches, demitter);
248-
let sess = d::build_session(sopts, demitter);
248+
let sess = d::build_session(sopts, input_file_path, demitter);
249249
let odir = matches.opt_str("out-dir").map(|o| Path::new(o));
250250
let ofile = matches.opt_str("o").map(|o| Path::new(o));
251251
let cfg = d::build_configuration(sess);

branches/dist-snap/src/librustc/lib/llvm.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,11 @@ pub mod llvm {
14931493
Dialect: c_uint)
14941494
-> ValueRef;
14951495

1496+
pub static LLVMRustDebugMetadataVersion: u32;
1497+
1498+
pub fn LLVMRustAddModuleFlag(M: ModuleRef,
1499+
name: *c_char,
1500+
value: u32);
14961501

14971502
pub fn LLVMDIBuilderCreate(M: ModuleRef) -> DIBuilderRef;
14981503

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

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -176,24 +176,23 @@ pub static tag_link_args_arg: uint = 0x7a;
176176

177177
pub static tag_item_method_tps: uint = 0x7b;
178178
pub static tag_item_method_fty: uint = 0x7c;
179-
pub static tag_item_method_transformed_self_ty: uint = 0x7d;
180179

181-
pub static tag_mod_child: uint = 0x7e;
182-
pub static tag_misc_info: uint = 0x7f;
183-
pub static tag_misc_info_crate_items: uint = 0x80;
180+
pub static tag_mod_child: uint = 0x7d;
181+
pub static tag_misc_info: uint = 0x7e;
182+
pub static tag_misc_info_crate_items: uint = 0x7f;
184183

185-
pub static tag_item_method_provided_source: uint = 0x81;
186-
pub static tag_item_impl_vtables: uint = 0x82;
184+
pub static tag_item_method_provided_source: uint = 0x80;
185+
pub static tag_item_impl_vtables: uint = 0x81;
187186

188-
pub static tag_impls: uint = 0x83;
189-
pub static tag_impls_impl: uint = 0x84;
187+
pub static tag_impls: uint = 0x82;
188+
pub static tag_impls_impl: uint = 0x83;
190189

191-
pub static tag_items_data_item_inherent_impl: uint = 0x85;
192-
pub static tag_items_data_item_extension_impl: uint = 0x86;
190+
pub static tag_items_data_item_inherent_impl: uint = 0x84;
191+
pub static tag_items_data_item_extension_impl: uint = 0x85;
193192

194-
pub static tag_path_elem_pretty_name: uint = 0x87;
195-
pub static tag_path_elem_pretty_name_ident: uint = 0x88;
196-
pub static tag_path_elem_pretty_name_extra: uint = 0x89;
193+
pub static tag_path_elem_pretty_name: uint = 0x86;
194+
pub static tag_path_elem_pretty_name_ident: uint = 0x87;
195+
pub static tag_path_elem_pretty_name_extra: uint = 0x88;
197196

198197
pub static tag_region_param_def: uint = 0x100;
199198
pub static tag_region_param_def_ident: uint = 0x101;

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

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,6 @@ fn doc_method_fty(doc: ebml::Doc, tcx: ty::ctxt, cdata: Cmd) -> ty::BareFnTy {
227227
|_, did| translate_def_id(cdata, did))
228228
}
229229

230-
fn doc_transformed_self_ty(doc: ebml::Doc,
231-
tcx: ty::ctxt,
232-
cdata: Cmd) -> Option<ty::t>
233-
{
234-
reader::maybe_get_doc(doc, tag_item_method_transformed_self_ty).map(|tp| {
235-
parse_ty_data(tp.data, cdata.cnum, tp.start, tcx,
236-
|_, did| translate_def_id(cdata, did))
237-
})
238-
}
239-
240230
pub fn item_type(_item_id: ast::DefId, item: ebml::Doc,
241231
tcx: ty::ctxt, cdata: Cmd) -> ty::t {
242232
doc_type(item, tcx, cdata)
@@ -781,9 +771,9 @@ fn get_explicit_self(item: ebml::Doc) -> ast::ExplicitSelf_ {
781771
let explicit_self_kind = string[0];
782772
match explicit_self_kind as char {
783773
's' => ast::SelfStatic,
784-
'v' => ast::SelfValue(get_mutability(string[1])),
774+
'v' => ast::SelfValue,
785775
'@' => ast::SelfBox,
786-
'~' => ast::SelfUniq(get_mutability(string[1])),
776+
'~' => ast::SelfUniq,
787777
// FIXME(#4846) expl. region
788778
'&' => ast::SelfRegion(None, get_mutability(string[1])),
789779
_ => fail!("unknown self type code: `{}`", explicit_self_kind as char)
@@ -847,7 +837,6 @@ pub fn get_method(intr: @IdentInterner, cdata: Cmd, id: ast::NodeId,
847837
let type_param_defs = item_ty_param_defs(method_doc, tcx, cdata,
848838
tag_item_method_tps);
849839
let rp_defs = item_region_param_defs(method_doc, tcx, cdata);
850-
let transformed_self_ty = doc_transformed_self_ty(method_doc, tcx, cdata);
851840
let fty = doc_method_fty(method_doc, tcx, cdata);
852841
let vis = item_visibility(method_doc);
853842
let explicit_self = get_explicit_self(method_doc);
@@ -859,7 +848,6 @@ pub fn get_method(intr: @IdentInterner, cdata: Cmd, id: ast::NodeId,
859848
type_param_defs: type_param_defs,
860849
region_param_defs: rp_defs,
861850
},
862-
transformed_self_ty,
863851
fty,
864852
explicit_self,
865853
vis,

0 commit comments

Comments
 (0)