Skip to content

Commit d0193db

Browse files
committed
---
yaml --- r: 276870 b: refs/heads/try c: a447124 h: refs/heads/master
1 parent 8fdf7df commit d0193db

File tree

281 files changed

+3337
-3114
lines changed

Some content is hidden

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

281 files changed

+3337
-3114
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: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: c411897e38add84e1d4709584bb5728ecf587f15
4+
refs/heads/try: a44712496379844c30bb8a37c725cd4687d5c395
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/mk/crates.mk

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TARGET_CRATES := libc std term \
5656
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
59-
rustc_data_structures rustc_platform_intrinsics \
59+
rustc_data_structures rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
6161
rustc_const_eval rustc_const_math
6262
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
@@ -93,37 +93,38 @@ DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9393
DEPS_syntax_ext := syntax fmt_macros
9494

9595
DEPS_rustc_const_math := std syntax log serialize
96-
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize \
96+
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize rustc_front \
9797
rustc_back graphviz
9898

99-
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml \
99+
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
100100
log graphviz rustc_back rustc_data_structures\
101101
rustc_const_math
102-
DEPS_rustc_back := std syntax flate log libc
103-
DEPS_rustc_borrowck := rustc rustc_mir log graphviz syntax
102+
DEPS_rustc_back := std syntax rustc_front flate log libc
103+
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
104104
DEPS_rustc_data_structures := std log serialize
105105
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
106106
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
107-
rustc_trans rustc_privacy rustc_lint rustc_plugin \
107+
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
108108
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
109+
DEPS_rustc_front := std syntax log serialize
109110
DEPS_rustc_lint := rustc log syntax rustc_const_eval
110111
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
111-
DEPS_rustc_metadata := rustc syntax rbml rustc_const_math
112-
DEPS_rustc_passes := syntax rustc core rustc_const_eval
113-
DEPS_rustc_mir := rustc syntax rustc_const_math rustc_const_eval
114-
DEPS_rustc_resolve := arena rustc log syntax
112+
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_math
113+
DEPS_rustc_passes := syntax rustc core rustc_front rustc_const_eval
114+
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_math rustc_const_eval
115+
DEPS_rustc_resolve := arena rustc rustc_front log syntax
115116
DEPS_rustc_platform_intrinsics := std
116117
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
117-
DEPS_rustc_privacy := rustc log syntax
118+
DEPS_rustc_privacy := rustc rustc_front log syntax
118119
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
119-
log syntax serialize rustc_llvm rustc_platform_intrinsics \
120+
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
120121
rustc_const_math rustc_const_eval
121-
DEPS_rustc_save_analysis := rustc log syntax
122-
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics rustc_const_math \
122+
DEPS_rustc_save_analysis := rustc log syntax rustc_front
123+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_math \
123124
rustc_const_eval
124125

125126
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
126-
test rustc_lint rustc_const_eval
127+
test rustc_lint rustc_front rustc_const_eval
127128

128129

129130
TOOL_DEPS_compiletest := test getopts log

branches/try/mk/rt.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
157157
# If the test suite passes, however, without symbol prefixes then we should be
158158
# good to go!
159159
JEMALLOC_ARGS_$(1) := --disable-tls --with-jemalloc-prefix=je_
160-
else ifeq ($(findstring dragonfly, $(OSTYPE_$(1))), dragonfly)
161-
JEMALLOC_ARGS_$(1) := --with-jemalloc-prefix=je_
162160
endif
163161

164162
ifdef CFG_ENABLE_DEBUG_JEMALLOC

branches/try/src/doc/book/concurrency.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ The same [ownership system](ownership.html) that helps prevent using pointers
164164
incorrectly also helps rule out data races, one of the worst kinds of
165165
concurrency bugs.
166166

167-
As an example, here is a Rust program that would have a data race in many
167+
As an example, here is a Rust program that could have a data race in many
168168
languages. It will not compile:
169169

170170
```ignore
@@ -197,6 +197,11 @@ thread, and the thread takes ownership of the reference, we'd have three owners!
197197
`data` gets moved out of `main` in the first call to `spawn()`, so subsequent
198198
calls in the loop cannot use this variable.
199199

200+
Note that this specific example will not cause a data race since different array
201+
indices are being accessed. But this can't be determined at compile time, and in
202+
a similar situation where `i` is a constant or is random, you would have a data
203+
race.
204+
200205
So, we need some type that lets us have more than one owning reference to a
201206
value. Usually, we'd use `Rc<T>` for this, which is a reference counted type
202207
that provides shared ownership. It has some runtime bookkeeping that keeps track

branches/try/src/liballoc_jemalloc/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ fn main() {
8686
// should be good to go!
8787
cmd.arg("--with-jemalloc-prefix=je_");
8888
cmd.arg("--disable-tls");
89-
} else if target.contains("dragonfly") {
90-
cmd.arg("--with-jemalloc-prefix=je_");
9189
}
9290

9391
if cfg!(feature = "debug-jemalloc") {

branches/try/src/liballoc_jemalloc/lib.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,22 @@ use libc::{c_int, c_void, size_t};
4242
extern {}
4343

4444
// Note that the symbols here are prefixed by default on OSX (we don't
45-
// explicitly request it), and on Android and DragonFly we explicitly request
46-
// it as unprefixing cause segfaults (mismatches in allocators).
45+
// explicitly request it), and on Android we explicitly request it as
46+
// unprefixing cause segfaults (mismatches in allocators).
4747
extern {
48-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
49-
target_os = "dragonfly"),
48+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5049
link_name = "je_mallocx")]
5150
fn mallocx(size: size_t, flags: c_int) -> *mut c_void;
52-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
53-
target_os = "dragonfly"),
51+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5452
link_name = "je_rallocx")]
5553
fn rallocx(ptr: *mut c_void, size: size_t, flags: c_int) -> *mut c_void;
56-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
57-
target_os = "dragonfly"),
54+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5855
link_name = "je_xallocx")]
5956
fn xallocx(ptr: *mut c_void, size: size_t, extra: size_t, flags: c_int) -> size_t;
60-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
61-
target_os = "dragonfly"),
57+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
6258
link_name = "je_sdallocx")]
6359
fn sdallocx(ptr: *mut c_void, size: size_t, flags: c_int);
64-
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
65-
target_os = "dragonfly"),
60+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
6661
link_name = "je_nallocx")]
6762
fn nallocx(size: size_t, flags: c_int) -> size_t;
6863
}

branches/try/src/liblibc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 7265c17d1845354f979a39b4ceb3a6934025b2ab
1+
Subproject commit 2278a549559c38872b4338cb002ecc2a80d860dc

branches/try/src/librustc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ rustc_back = { path = "../librustc_back" }
1919
rustc_bitflags = { path = "../librustc_bitflags" }
2020
rustc_const_math = { path = "../librustc_const_math" }
2121
rustc_data_structures = { path = "../librustc_data_structures" }
22+
rustc_front = { path = "../librustc_front" }
2223
serialize = { path = "../libserialize" }
2324
syntax = { path = "../libsyntax" }

branches/try/src/librustc/cfg/construct.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
use rustc_data_structures::graph;
1212
use cfg::*;
13-
use hir::def::Def;
14-
use hir::pat_util;
13+
use middle::def::Def;
14+
use middle::pat_util;
1515
use ty::{self, TyCtxt};
1616
use syntax::ast;
1717
use syntax::ptr::P;
1818

19-
use hir::{self, PatKind};
19+
use rustc_front::hir::{self, PatKind};
2020

2121
struct CFGBuilder<'a, 'tcx: 'a> {
2222
tcx: &'a TyCtxt<'tcx>,
@@ -257,7 +257,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
257257
self.match_(expr.id, &discr, &arms, pred)
258258
}
259259

260-
hir::ExprBinary(op, ref l, ref r) if op.node.is_lazy() => {
260+
hir::ExprBinary(op, ref l, ref r) if ::rustc_front::util::lazy_binop(op.node) => {
261261
//
262262
// [pred]
263263
// |

branches/try/src/librustc/cfg/graphviz.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use graphviz::IntoCow;
1717

1818
use syntax::ast;
1919

20-
use hir::map as ast_map;
20+
use front::map as ast_map;
2121
use cfg;
2222

2323
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);

branches/try/src/librustc/cfg/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use rustc_data_structures::graph;
1515
use ty::TyCtxt;
1616
use syntax::ast;
17-
use hir;
17+
use rustc_front::hir;
1818

1919
mod construct;
2020
pub mod graphviz;

branches/try/src/librustc/dep_graph/mod.rs

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

1111
use self::thread::{DepGraphThreadData, DepMessage};
12-
use hir::def_id::DefId;
12+
use middle::def_id::DefId;
1313
use syntax::ast::NodeId;
1414
use ty::TyCtxt;
15-
use hir;
16-
use hir::intravisit::Visitor;
15+
use rustc_front::hir;
16+
use rustc_front::intravisit::Visitor;
1717
use std::rc::Rc;
1818

1919
mod dep_tracking_map;

branches/try/src/librustc/hir/map/blocks.rs renamed to branches/try/src/librustc/front/map/blocks.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
2424
pub use self::Code::*;
2525

26-
use hir::map::{self, Node};
26+
use front::map::{self, Node};
2727
use syntax::abi;
28-
use hir::{Block, FnDecl};
28+
use rustc_front::hir::{Block, FnDecl};
2929
use syntax::ast::{Attribute, Name, NodeId};
3030
use syntax::attr::ThinAttributesExt;
31-
use hir as ast;
31+
use rustc_front::hir as ast;
3232
use syntax::codemap::Span;
33-
use hir::intravisit::FnKind;
33+
use rustc_front::intravisit::FnKind;
3434

3535
/// An FnLikeNode is a Node that is like a fn, in that it has a decl
3636
/// and a body (as well as a NodeId, a span, etc).

branches/try/src/librustc/hir/map/collector.rs renamed to branches/try/src/librustc/front/map/collector.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
use super::*;
1212
use super::MapEntry::*;
1313

14-
use hir::*;
15-
use hir::intravisit::Visitor;
16-
use hir::def_id::{CRATE_DEF_INDEX, DefId, DefIndex};
17-
use middle::cstore::InlinedItem;
14+
use rustc_front::hir::*;
15+
use rustc_front::util;
16+
use rustc_front::intravisit::{self, Visitor};
17+
use middle::def_id::{CRATE_DEF_INDEX, DefId, DefIndex};
1818
use std::iter::repeat;
1919
use syntax::ast::{NodeId, CRATE_NODE_ID, DUMMY_NODE_ID};
2020
use syntax::codemap::Span;
@@ -47,7 +47,7 @@ impl<'ast> NodeCollector<'ast> {
4747
}
4848

4949
pub fn extend(krate: &'ast Crate,
50-
parent: &'ast InlinedItem,
50+
parent: &'ast InlinedParent,
5151
parent_node: NodeId,
5252
parent_def_path: DefPath,
5353
parent_def_id: DefId,
@@ -305,7 +305,7 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> {
305305
}
306306

307307
fn visit_stmt(&mut self, stmt: &'ast Stmt) {
308-
let id = stmt.node.id();
308+
let id = util::stmt_id(stmt);
309309
self.insert(id, NodeStmt(stmt));
310310
let parent_node = self.parent_node;
311311
self.parent_node = id;

branches/try/src/librustc/hir/map/definitions.rs renamed to branches/try/src/librustc/front/map/definitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use middle::cstore::LOCAL_CRATE;
12-
use hir::def_id::{DefId, DefIndex};
12+
use middle::def_id::{DefId, DefIndex};
1313
use rustc_data_structures::fnv::FnvHashMap;
1414
use syntax::ast;
1515
use syntax::parse::token::InternedString;

0 commit comments

Comments
 (0)