Skip to content

Commit 00e3598

Browse files
committed
---
yaml --- r: 159069 b: refs/heads/snap-stage3 c: 27774e8 h: refs/heads/master i: 159067: 54fa309 v: v3
1 parent e20910b commit 00e3598

Some content is hidden

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

46 files changed

+316
-306
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 40fb87d40f681f5356af42175fc7b85da387f037
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8f8753878644b0bfb38d24781edb9ef2028730f2
4+
refs/heads/snap-stage3: 27774e8e24fe66b6463ca1916eeea1626c663e77
55
refs/heads/try: f58aad6dce273570fb130b4df008ef9acd5a5be2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/etc/emacs/rust-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
"false" "fn" "for"
177177
"if" "impl" "in"
178178
"let" "loop"
179-
"match" "mod" "mut"
179+
"match" "mod" "move" "mut"
180180
"priv" "proc" "pub"
181181
"ref" "return"
182182
"self" "static" "struct" "super"

branches/snap-stage3/src/etc/kate/rust.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<item> loop </item>
3535
<item> match </item>
3636
<item> mod </item>
37+
<item> move </item>
3738
<item> mut </item>
3839
<item> priv </item>
3940
<item> pub </item>

branches/snap-stage3/src/etc/make-win-dist.py

Lines changed: 8 additions & 45 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,48 +42,11 @@ def make_win_dist(dist_root, target_triple):
4242
else:
4343
rustc_dlls.append("libgcc_s_seh-1.dll")
4444

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-
]
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"]
8750

8851
# Find mingw artifacts we want to bundle
8952
target_tools = find_files(target_tools, bin_path)
@@ -96,14 +59,14 @@ def make_win_dist(dist_root, target_triple):
9659
shutil.copy(src, dist_bin_dir)
9760

9861
# Copy platform tools to platform-specific bin directory
99-
target_bin_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "bin")
62+
target_bin_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "gcc", "bin")
10063
if not os.path.exists(target_bin_dir):
10164
os.makedirs(target_bin_dir)
10265
for src in target_tools:
10366
shutil.copy(src, target_bin_dir)
10467

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

branches/snap-stage3/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
26+
syn keyword rustKeyword for in if impl let move
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 move mut ref static const
33+
syn keyword rustStorage mut ref static const
3434

3535
syn keyword rustInvalidBareKeyword crate
3636

branches/snap-stage3/src/librustc/back/link.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,9 @@ 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+
893896
if t.options.is_like_osx {
894897
// The dead_strip option to the linker specifies that functions and data
895898
// unreachable by the entry point will be removed. This is quite useful

branches/snap-stage3/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 = sess.host_filesearch().get_tools_search_paths();
572-
new_path.extend(os::split_paths(old_path.as_slice()).into_iter());
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());
573573
os::setenv("PATH", os::join_paths(new_path.as_slice()).unwrap());
574574

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

branches/snap-stage3/src/librustc/lint/builtin.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ 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::{FnvHashMap, NodeSet};
35+
use util::nodemap::NodeSet;
3636
use lint::{Context, LintPass, LintArray};
3737

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

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

branches/snap-stage3/src/librustc/lint/context.rs

Lines changed: 10 additions & 11 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;
3837

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: FnvHashMap<String, TargetLint>,
66+
by_name: HashMap<String, TargetLint>,
6767

6868
/// Current levels of each lint, and where they were set.
69-
levels: FnvHashMap<LintId, LevelSource>,
69+
levels: HashMap<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: FnvHashMap<&'static str, (Vec<LintId>, bool)>,
73+
lint_groups: HashMap<&'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: FnvHashMap::new(),
106-
levels: FnvHashMap::new(),
107-
lint_groups: FnvHashMap::new(),
105+
by_name: HashMap::new(),
106+
levels: HashMap::new(),
107+
lint_groups: HashMap::new(),
108108
}
109109
}
110110

@@ -279,8 +279,7 @@ 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::<FnvHashMap<&'static str,
283-
Vec<LintId>>>()
282+
.collect::<HashMap<&'static str, Vec<LintId>>>()
284283
.find_equiv(lint_name.as_slice()) {
285284
Some(v) => {
286285
v.iter()
@@ -318,7 +317,7 @@ pub struct Context<'a, 'tcx: 'a> {
318317

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

324323
/// Convenience macro for calling a `LintPass` method on every pass in the context.
@@ -426,7 +425,7 @@ impl<'a, 'tcx> Context<'a, 'tcx> {
426425
exported_items: exported_items,
427426
lints: lint_store,
428427
level_stack: vec![],
429-
node_levels: RefCell::new(FnvHashMap::new()),
428+
node_levels: RefCell::new(HashMap::new()),
430429
}
431430
}
432431

branches/snap-stage3/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;
2524

2625
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 = FnvHashMap::new();
88+
let mut map = HashMap::new();
8989
cstore.iter_crate_data(|cnum, data| {
9090
match map.entry(data.name()) {
9191
Vacant(entry) => { entry.set(vec![cnum]); },

branches/snap-stage3/src/librustc/metadata/cstore.rs

Lines changed: 9 additions & 7 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};
2019

2120
use std::cell::RefCell;
2221
use std::c_vec::CVec;
2322
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 = FnvHashMap<ast::CrateNum, ast::CrateNum>;
32+
pub type cnum_map = HashMap<ast::CrateNum, ast::CrateNum>;
3333

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

6969
pub struct CStore {
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>>,
70+
metas: RefCell<HashMap<ast::CrateNum, Rc<crate_metadata>>>,
71+
extern_mod_crate_map: RefCell<extern_mod_crate_map>,
7372
used_crate_sources: RefCell<Vec<CrateSource>>,
7473
used_libraries: RefCell<Vec<(String, NativeLibaryKind)>>,
7574
used_link_args: RefCell<Vec<String>>,
7675
pub intr: Rc<IdentInterner>,
7776
}
7877

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+
7981
impl CStore {
8082
pub fn new(intr: Rc<IdentInterner>) -> CStore {
8183
CStore {
82-
metas: RefCell::new(FnvHashMap::new()),
83-
extern_mod_crate_map: RefCell::new(FnvHashMap::new()),
84+
metas: RefCell::new(HashMap::new()),
85+
extern_mod_crate_map: RefCell::new(HashMap::new()),
8486
used_crate_sources: RefCell::new(Vec::new()),
8587
used_libraries: RefCell::new(Vec::new()),
8688
used_link_args: RefCell::new(Vec::new()),

branches/snap-stage3/src/librustc/metadata/encoder.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ use middle::ty::{lookup_item_type};
2323
use middle::ty;
2424
use middle::stability;
2525
use middle;
26-
use util::nodemap::{FnvHashMap, NodeMap, NodeSet};
26+
use util::nodemap::{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;
3233
use syntax::abi;
3334
use syntax::ast::*;
3435
use syntax::ast;
@@ -2061,7 +2062,7 @@ fn encode_metadata_inner(wr: &mut SeekableMemWriter, parms: EncodeParams, krate:
20612062
link_meta: link_meta,
20622063
cstore: cstore,
20632064
encode_inlined_item: RefCell::new(encode_inlined_item),
2064-
type_abbrevs: RefCell::new(FnvHashMap::new()),
2065+
type_abbrevs: RefCell::new(HashMap::new()),
20652066
reachable: reachable,
20662067
};
20672068

@@ -2166,7 +2167,7 @@ pub fn encoded_ty(tcx: &ty::ctxt, t: ty::t) -> String {
21662167
diag: tcx.sess.diagnostic(),
21672168
ds: def_to_string,
21682169
tcx: tcx,
2169-
abbrevs: &RefCell::new(FnvHashMap::new())
2170+
abbrevs: &RefCell::new(HashMap::new())
21702171
}, t);
21712172
String::from_utf8(wr.unwrap()).unwrap()
21722173
}

branches/snap-stage3/src/librustc/metadata/filesearch.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,12 @@ impl<'a> FileSearch<'a> {
150150
p.push(find_libdir(self.sysroot));
151151
p.push(rustlibdir());
152152
p.push(self.triple);
153-
p.push("bin");
154-
vec![p]
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]
155159
}
156160
}
157161

branches/snap-stage3/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;
1718

1819
use middle::subst;
1920
use middle::subst::VecPerParamSpace;
2021
use middle::ty::ParamTy;
2122
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<FnvHashMap<ty::t, ty_abbrev>>;
50+
pub type abbrev_map = RefCell<HashMap<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/snap-stage3/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).iter() {
1164+
for &ty in tcx.node_types.borrow().get(&(id as uint)).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, ty);
1828+
dcx.tcx.node_types.borrow_mut().insert(id as uint, ty);
18291829
}
18301830
c::tag_table_item_subst => {
18311831
let item_substs = ty::ItemSubsts {

0 commit comments

Comments
 (0)