Skip to content

Commit 355f528

Browse files
committed
---
yaml --- r: 159535 b: refs/heads/auto c: 351f7af h: refs/heads/master i: 159533: 25a227e 159531: 4470481 159527: 9d3402b 159519: 3480d80 v: v3
1 parent db154f7 commit 355f528

Some content is hidden

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

44 files changed

+305
-314
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: 27774e8e24fe66b6463ca1916eeea1626c663e77
13+
refs/heads/auto: 351f7afd06d2164b5bfe2467333c355a20fcb02d
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/etc/make-win-dist.py

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def find_files(files, path):
2323
return found
2424

2525
def make_win_dist(dist_root, target_triple):
26-
# Ask gcc where it keeps its' stuff
26+
# Ask gcc where it keeps its stuff
2727
gcc_out = subprocess.check_output(["gcc.exe", "-print-search-dirs"])
2828
bin_path = os.environ["PATH"].split(os.pathsep)
2929
lib_path = []
@@ -42,11 +42,48 @@ def make_win_dist(dist_root, target_triple):
4242
else:
4343
rustc_dlls.append("libgcc_s_seh-1.dll")
4444

45-
target_libs = ["crtbegin.o", "crtend.o", "crt2.o", "dllcrt2.o",
46-
"libadvapi32.a", "libcrypt32.a", "libgcc.a", "libgcc_eh.a", "libgcc_s.a",
47-
"libimagehlp.a", "libiphlpapi.a", "libkernel32.a", "libm.a", "libmingw32.a",
48-
"libmingwex.a", "libmsvcrt.a", "libpsapi.a", "libshell32.a", "libstdc++.a",
49-
"libuser32.a", "libws2_32.a", "libiconv.a", "libmoldname.a"]
45+
target_libs = [ # MinGW libs
46+
"crtbegin.o",
47+
"crtend.o",
48+
"crt2.o",
49+
"dllcrt2.o",
50+
"libgcc.a",
51+
"libgcc_eh.a",
52+
"libgcc_s.a",
53+
"libm.a",
54+
"libmingw32.a",
55+
"libmingwex.a",
56+
"libstdc++.a",
57+
"libiconv.a",
58+
"libmoldname.a",
59+
# Windows import libs
60+
"libadvapi32.a",
61+
"libbcrypt.a",
62+
"libcomctl32.a",
63+
"libcomdlg32.a",
64+
"libcrypt32.a",
65+
"libctl3d32.a",
66+
"libgdi32.a",
67+
"libimagehlp.a",
68+
"libiphlpapi.a",
69+
"libkernel32.a",
70+
"libmsvcrt.a",
71+
"libodbc32.a",
72+
"libole32.a",
73+
"liboleaut32.a",
74+
"libopengl32.a",
75+
"libpsapi.a",
76+
"librpcrt4.a",
77+
"libsetupapi.a",
78+
"libshell32.a",
79+
"libuser32.a",
80+
"libuuid.a",
81+
"libwinhttp.a",
82+
"libwinmm.a",
83+
"libwinspool.a",
84+
"libws2_32.a",
85+
"libwsock32.a",
86+
]
5087

5188
# Find mingw artifacts we want to bundle
5289
target_tools = find_files(target_tools, bin_path)
@@ -59,14 +96,14 @@ def make_win_dist(dist_root, target_triple):
5996
shutil.copy(src, dist_bin_dir)
6097

6198
# Copy platform tools to platform-specific bin directory
62-
target_bin_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "gcc", "bin")
99+
target_bin_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "bin")
63100
if not os.path.exists(target_bin_dir):
64101
os.makedirs(target_bin_dir)
65102
for src in target_tools:
66103
shutil.copy(src, target_bin_dir)
67104

68105
# Copy platform libs to platform-spcific lib directory
69-
target_lib_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "gcc", "lib")
106+
target_lib_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "lib")
70107
if not os.path.exists(target_lib_dir):
71108
os.makedirs(target_lib_dir)
72109
for src in target_libs:

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
2323
syn keyword rustKeyword continue
2424
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
2525
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
26-
syn keyword rustKeyword for in if impl let move
26+
syn keyword rustKeyword for in if impl let
2727
syn keyword rustKeyword loop once proc pub
2828
syn keyword rustKeyword return super
2929
syn keyword rustKeyword unsafe virtual where while
3030
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
3131
" FIXME: Scoped impl's name is also fallen in this category
3232
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
33-
syn keyword rustStorage mut ref static const
33+
syn keyword rustStorage move mut ref static const
3434

3535
syn keyword rustInvalidBareKeyword crate
3636

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -890,9 +890,6 @@ fn link_args(cmd: &mut Command,
890890
cmd.arg(obj_filename.with_extension("metadata.o"));
891891
}
892892

893-
// Rust does its' own LTO
894-
cmd.arg("-fno-lto");
895-
896893
if t.options.is_like_osx {
897894
// The dead_strip option to the linker specifies that functions and data
898895
// unreachable by the entry point will be removed. This is quite useful

branches/auto/src/librustc/driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ pub fn phase_6_link_output(sess: &Session,
568568
trans: &CrateTranslation,
569569
outputs: &OutputFilenames) {
570570
let old_path = os::getenv("PATH").unwrap_or_else(||String::new());
571-
let mut new_path = os::split_paths(old_path.as_slice());
572-
new_path.extend(sess.host_filesearch().get_tools_search_paths().into_iter());
571+
let mut new_path = sess.host_filesearch().get_tools_search_paths();
572+
new_path.extend(os::split_paths(old_path.as_slice()).into_iter());
573573
os::setenv("PATH", os::join_paths(new_path.as_slice()).unwrap());
574574

575575
time(sess.time_passes(), "linking", (), |_|

branches/auto/src/librustc/lint/builtin.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ use middle::typeck::infer;
3232
use middle::{typeck, ty, def, pat_util, stability};
3333
use middle::const_eval::{eval_const_expr_partial, const_int, const_uint};
3434
use util::ppaux::{ty_to_string};
35-
use util::nodemap::NodeSet;
35+
use util::nodemap::{FnvHashMap, NodeSet};
3636
use lint::{Context, LintPass, LintArray};
3737

3838
use std::cmp;
39-
use std::collections::HashMap;
4039
use std::collections::hash_map::{Occupied, Vacant};
4140
use std::slice;
4241
use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64};
@@ -1284,7 +1283,7 @@ impl UnusedMut {
12841283
// collect all mutable pattern and group their NodeIDs by their Identifier to
12851284
// avoid false warnings in match arms with multiple patterns
12861285

1287-
let mut mutables = HashMap::new();
1286+
let mut mutables = FnvHashMap::new();
12881287
for p in pats.iter() {
12891288
pat_util::pat_bindings(&cx.tcx.def_map, &**p, |mode, id, _, path1| {
12901289
let ident = path1.node;

branches/auto/src/librustc/lint/context.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ use driver::early_error;
3434
use lint::{Level, LevelSource, Lint, LintId, LintArray, LintPass, LintPassObject};
3535
use lint::{Default, CommandLine, Node, Allow, Warn, Deny, Forbid};
3636
use lint::builtin;
37+
use util::nodemap::FnvHashMap;
3738

38-
use std::collections::HashMap;
3939
use std::rc::Rc;
4040
use std::cell::RefCell;
4141
use std::tuple::Tuple2;
@@ -63,14 +63,14 @@ pub struct LintStore {
6363
passes: Option<Vec<LintPassObject>>,
6464

6565
/// Lints indexed by name.
66-
by_name: HashMap<String, TargetLint>,
66+
by_name: FnvHashMap<String, TargetLint>,
6767

6868
/// Current levels of each lint, and where they were set.
69-
levels: HashMap<LintId, LevelSource>,
69+
levels: FnvHashMap<LintId, LevelSource>,
7070

7171
/// Map of registered lint groups to what lints they expand to. The bool
7272
/// is true if the lint group was added by a plugin.
73-
lint_groups: HashMap<&'static str, (Vec<LintId>, bool)>,
73+
lint_groups: FnvHashMap<&'static str, (Vec<LintId>, bool)>,
7474
}
7575

7676
/// The targed of the `by_name` map, which accounts for renaming/deprecation.
@@ -102,9 +102,9 @@ impl LintStore {
102102
LintStore {
103103
lints: vec!(),
104104
passes: Some(vec!()),
105-
by_name: HashMap::new(),
106-
levels: HashMap::new(),
107-
lint_groups: HashMap::new(),
105+
by_name: FnvHashMap::new(),
106+
levels: FnvHashMap::new(),
107+
lint_groups: FnvHashMap::new(),
108108
}
109109
}
110110

@@ -279,7 +279,8 @@ impl LintStore {
279279
Some(lint_id) => self.set_level(lint_id, (level, CommandLine)),
280280
None => {
281281
match self.lint_groups.iter().map(|(&x, pair)| (x, pair.ref0().clone()))
282-
.collect::<HashMap<&'static str, Vec<LintId>>>()
282+
.collect::<FnvHashMap<&'static str,
283+
Vec<LintId>>>()
283284
.find_equiv(lint_name.as_slice()) {
284285
Some(v) => {
285286
v.iter()
@@ -317,7 +318,7 @@ pub struct Context<'a, 'tcx: 'a> {
317318

318319
/// Level of lints for certain NodeIds, stored here because the body of
319320
/// the lint needs to run in trans.
320-
node_levels: RefCell<HashMap<(ast::NodeId, LintId), LevelSource>>,
321+
node_levels: RefCell<FnvHashMap<(ast::NodeId, LintId), LevelSource>>,
321322
}
322323

323324
/// Convenience macro for calling a `LintPass` method on every pass in the context.
@@ -425,7 +426,7 @@ impl<'a, 'tcx> Context<'a, 'tcx> {
425426
exported_items: exported_items,
426427
lints: lint_store,
427428
level_stack: vec![],
428-
node_levels: RefCell::new(HashMap::new()),
429+
node_levels: RefCell::new(FnvHashMap::new()),
429430
}
430431
}
431432

branches/auto/src/librustc/metadata/creader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ use metadata::decoder;
2121
use metadata::loader;
2222
use metadata::loader::CratePaths;
2323
use plugin::load::PluginMetadata;
24+
use util::nodemap::FnvHashMap;
2425

2526
use std::rc::Rc;
26-
use std::collections::HashMap;
2727
use std::collections::hash_map::{Occupied, Vacant};
2828
use syntax::ast;
2929
use syntax::abi;
@@ -85,7 +85,7 @@ fn dump_crates(cstore: &CStore) {
8585
}
8686

8787
fn warn_if_multiple_versions(diag: &SpanHandler, cstore: &CStore) {
88-
let mut map = HashMap::new();
88+
let mut map = FnvHashMap::new();
8989
cstore.iter_crate_data(|cnum, data| {
9090
match map.entry(data.name()) {
9191
Vacant(entry) => { entry.set(vec![cnum]); },

branches/auto/src/librustc/metadata/cstore.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
use back::svh::Svh;
1717
use metadata::decoder;
1818
use metadata::loader;
19+
use util::nodemap::{FnvHashMap, NodeMap};
1920

2021
use std::cell::RefCell;
2122
use std::c_vec::CVec;
2223
use std::rc::Rc;
23-
use std::collections::HashMap;
2424
use syntax::ast;
2525
use syntax::codemap::Span;
2626
use syntax::parse::token::IdentInterner;
@@ -29,7 +29,7 @@ use syntax::parse::token::IdentInterner;
2929
// local crate numbers (as generated during this session). Each external
3030
// crate may refer to types in other external crates, and each has their
3131
// own crate numbers.
32-
pub type cnum_map = HashMap<ast::CrateNum, ast::CrateNum>;
32+
pub type cnum_map = FnvHashMap<ast::CrateNum, ast::CrateNum>;
3333

3434
pub enum MetadataBlob {
3535
MetadataVec(CVec<u8>),
@@ -67,22 +67,20 @@ pub struct CrateSource {
6767
}
6868

6969
pub struct CStore {
70-
metas: RefCell<HashMap<ast::CrateNum, Rc<crate_metadata>>>,
71-
extern_mod_crate_map: RefCell<extern_mod_crate_map>,
70+
metas: RefCell<FnvHashMap<ast::CrateNum, Rc<crate_metadata>>>,
71+
/// Map from NodeId's of local extern crate statements to crate numbers
72+
extern_mod_crate_map: RefCell<NodeMap<ast::CrateNum>>,
7273
used_crate_sources: RefCell<Vec<CrateSource>>,
7374
used_libraries: RefCell<Vec<(String, NativeLibaryKind)>>,
7475
used_link_args: RefCell<Vec<String>>,
7576
pub intr: Rc<IdentInterner>,
7677
}
7778

78-
// Map from NodeId's of local extern crate statements to crate numbers
79-
type extern_mod_crate_map = HashMap<ast::NodeId, ast::CrateNum>;
80-
8179
impl CStore {
8280
pub fn new(intr: Rc<IdentInterner>) -> CStore {
8381
CStore {
84-
metas: RefCell::new(HashMap::new()),
85-
extern_mod_crate_map: RefCell::new(HashMap::new()),
82+
metas: RefCell::new(FnvHashMap::new()),
83+
extern_mod_crate_map: RefCell::new(FnvHashMap::new()),
8684
used_crate_sources: RefCell::new(Vec::new()),
8785
used_libraries: RefCell::new(Vec::new()),
8886
used_link_args: RefCell::new(Vec::new()),

branches/auto/src/librustc/metadata/encoder.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ use middle::ty::{lookup_item_type};
2323
use middle::ty;
2424
use middle::stability;
2525
use middle;
26-
use util::nodemap::{NodeMap, NodeSet};
26+
use util::nodemap::{FnvHashMap, NodeMap, NodeSet};
2727

2828
use serialize::Encodable;
2929
use std::cell::RefCell;
3030
use std::hash::Hash;
3131
use std::hash;
32-
use std::collections::HashMap;
3332
use syntax::abi;
3433
use syntax::ast::*;
3534
use syntax::ast;
@@ -2062,7 +2061,7 @@ fn encode_metadata_inner(wr: &mut SeekableMemWriter, parms: EncodeParams, krate:
20622061
link_meta: link_meta,
20632062
cstore: cstore,
20642063
encode_inlined_item: RefCell::new(encode_inlined_item),
2065-
type_abbrevs: RefCell::new(HashMap::new()),
2064+
type_abbrevs: RefCell::new(FnvHashMap::new()),
20662065
reachable: reachable,
20672066
};
20682067

@@ -2167,7 +2166,7 @@ pub fn encoded_ty(tcx: &ty::ctxt, t: ty::t) -> String {
21672166
diag: tcx.sess.diagnostic(),
21682167
ds: def_to_string,
21692168
tcx: tcx,
2170-
abbrevs: &RefCell::new(HashMap::new())
2169+
abbrevs: &RefCell::new(FnvHashMap::new())
21712170
}, t);
21722171
String::from_utf8(wr.unwrap()).unwrap()
21732172
}

branches/auto/src/librustc/metadata/filesearch.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,8 @@ impl<'a> FileSearch<'a> {
150150
p.push(find_libdir(self.sysroot));
151151
p.push(rustlibdir());
152152
p.push(self.triple);
153-
let mut p1 = p.clone();
154-
p1.push("bin");
155-
let mut p2 = p.clone();
156-
p2.push("gcc");
157-
p2.push("bin");
158-
vec![p1, p2]
153+
p.push("bin");
154+
vec![p]
159155
}
160156
}
161157

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
#![allow(non_camel_case_types)]
1515

1616
use std::cell::RefCell;
17-
use std::collections::HashMap;
1817

1918
use middle::subst;
2019
use middle::subst::VecPerParamSpace;
2120
use middle::ty::ParamTy;
2221
use middle::ty;
22+
use util::nodemap::FnvHashMap;
2323

2424
use syntax::abi::Abi;
2525
use syntax::ast;
@@ -47,7 +47,7 @@ pub struct ty_abbrev {
4747
s: String
4848
}
4949

50-
pub type abbrev_map = RefCell<HashMap<ty::t, ty_abbrev>>;
50+
pub type abbrev_map = RefCell<FnvHashMap<ty::t, ty_abbrev>>;
5151

5252
pub fn enc_ty(w: &mut SeekableMemWriter, cx: &ctxt, t: ty::t) {
5353
match cx.abbrevs.borrow_mut().get(&t) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
11611161
})
11621162
}
11631163

1164-
for &ty in tcx.node_types.borrow().get(&(id as uint)).iter() {
1164+
for &ty in tcx.node_types.borrow().get(&id).iter() {
11651165
rbml_w.tag(c::tag_table_node_type, |rbml_w| {
11661166
rbml_w.id(id);
11671167
rbml_w.tag(c::tag_table_val, |rbml_w| {
@@ -1825,7 +1825,7 @@ fn decode_side_tables(dcx: &DecodeContext,
18251825
let ty = val_dsr.read_ty(dcx);
18261826
debug!("inserting ty for node {}: {}",
18271827
id, ty_to_string(dcx.tcx, ty));
1828-
dcx.tcx.node_types.borrow_mut().insert(id as uint, ty);
1828+
dcx.tcx.node_types.borrow_mut().insert(id, ty);
18291829
}
18301830
c::tag_table_item_subst => {
18311831
let item_substs = ty::ItemSubsts {

0 commit comments

Comments
 (0)