Skip to content

Commit b3278f2

Browse files
committed
---
yaml --- r: 97718 b: refs/heads/snap-stage3 c: 197fe67 h: refs/heads/master v: v3
1 parent 4de80dc commit b3278f2

35 files changed

+66
-432
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: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 36971217aa64b6fc5f543f2620e488d16e67b1f4
4+
refs/heads/snap-stage3: 197fe67e11af002033bb2dc7b5a48ef433a7b103
55
refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ export CFG_PREFIX
418418
export CFG_LIBDIR
419419
export CFG_RUSTLIBDIR
420420
export CFG_LIBDIR_RELATIVE
421-
export CFG_DISABLE_INJECT_STD_VERSION
422421

423422
######################################################################
424423
# Subprograms

branches/snap-stage3/configure

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ opt clang 0 "prefer clang to gcc for building the runtime"
381381
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
382382
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
383383
opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-patched kernels)"
384-
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
385384
valopt prefix "/usr/local" "set installation prefix"
386385
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
387386
valopt llvm-root "" "set LLVM root"
@@ -1043,7 +1042,6 @@ putvar CFG_DISABLE_MANAGE_SUBMODULES
10431042
putvar CFG_ANDROID_CROSS_PATH
10441043
putvar CFG_MINGW32_CROSS_PATH
10451044
putvar CFG_MANDIR
1046-
putvar CFG_DISABLE_INJECT_STD_VERSION
10471045

10481046
# Avoid spurious warnings from clang by feeding it original source on
10491047
# ccache-miss rather than preprocessed input.

branches/snap-stage3/doc/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[Macros](guide-macros.html)
2020
[Packaging](guide-rustpkg.html)
2121
[Testing](guide-testing.html)
22-
[Conditions](guide-conditions.html)
22+
[Conditions](guide-conditions.html)
2323
[Rust's Runtime](guide-runtime.html)
2424

2525
# Libraries

branches/snap-stage3/src/libextra/comm.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ Higher level communication abstractions.
1616

1717
#[allow(missing_doc)];
1818

19-
use std::comm;
20-
2119
/// An extension of `pipes::stream` that allows both sending and receiving.
2220
pub struct DuplexStream<T, U> {
2321
priv chan: Chan<T>,
@@ -42,7 +40,7 @@ impl<T:Send,U:Send> DuplexStream<T, U> {
4240
pub fn recv(&self) -> U {
4341
self.port.recv()
4442
}
45-
pub fn try_recv(&self) -> comm::TryRecvResult<U> {
43+
pub fn try_recv(&self) -> Option<U> {
4644
self.port.try_recv()
4745
}
4846
pub fn recv_opt(&self) -> Option<U> {
@@ -79,11 +77,11 @@ impl<T: Send> SyncPort<T> {
7977
})
8078
}
8179

82-
pub fn try_recv(&self) -> comm::TryRecvResult<T> {
83-
match self.duplex_stream.try_recv() {
84-
comm::Data(t) => { self.duplex_stream.try_send(()); comm::Data(t) }
85-
state => state,
86-
}
80+
pub fn try_recv(&self) -> Option<T> {
81+
self.duplex_stream.try_recv().map(|val| {
82+
self.duplex_stream.try_send(());
83+
val
84+
})
8785
}
8886
}
8987

branches/snap-stage3/src/libextra/lib.rs

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

23-
// NOTE: upgrade to 0.10-pre after the next snapshot
24-
#[crate_id = "extra#0.9"];
23+
#[crate_id = "extra#0.10-pre"];
2524
#[comment = "Rust extras"];
2625
#[license = "MIT/ASL2"];
2726
#[crate_type = "rlib"];

branches/snap-stage3/src/libextra/sync.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020

2121
use std::borrow;
22-
use std::comm;
2322
use std::unstable::sync::Exclusive;
2423
use std::sync::arc::UnsafeArc;
2524
use std::sync::atomics;
@@ -50,7 +49,7 @@ impl WaitQueue {
5049
// Signals one live task from the queue.
5150
fn signal(&self) -> bool {
5251
match self.head.try_recv() {
53-
comm::Data(ch) => {
52+
Some(ch) => {
5453
// Send a wakeup signal. If the waiter was killed, its port will
5554
// have closed. Keep trying until we get a live task.
5655
if ch.try_send_deferred(()) {
@@ -59,20 +58,20 @@ impl WaitQueue {
5958
self.signal()
6059
}
6160
}
62-
_ => false
61+
None => false
6362
}
6463
}
6564

6665
fn broadcast(&self) -> uint {
6766
let mut count = 0;
6867
loop {
6968
match self.head.try_recv() {
70-
comm::Data(ch) => {
69+
None => break,
70+
Some(ch) => {
7171
if ch.try_send_deferred(()) {
7272
count += 1;
7373
}
7474
}
75-
_ => break
7675
}
7776
}
7877
count

branches/snap-stage3/src/libextra/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ mod tests {
14591459
}
14601460

14611461
#[test]
1462-
#[ignore(cfg(target_os = "android"))] // FIXME #10958
1462+
#[ignore(cfg(android))] // FIXME #10958
14631463
fn run_tests() {
14641464
// The tests race on tzset. So instead of having many independent
14651465
// tests, we will just call the functions now.

branches/snap-stage3/src/libgreen/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#[macro_escape];
1414

1515
use std::fmt;
16+
use std::libc;
1617

1718
// Indicates whether we should perform expensive sanity checks, including rtassert!
1819
// XXX: Once the runtime matures remove the `true` below to turn off rtassert, etc.
@@ -123,7 +124,6 @@ memory and partly incapable of presentation to others.",
123124
abort();
124125

125126
fn abort() -> ! {
126-
use std::unstable::intrinsics;
127-
unsafe { intrinsics::abort() }
127+
unsafe { libc::abort() }
128128
}
129129
}

branches/snap-stage3/src/libgreen/sched.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,6 @@ fn new_sched_rng() -> XorShiftRng {
958958

959959
#[cfg(test)]
960960
mod test {
961-
use std::comm;
962961
use std::task::TaskOpts;
963962
use std::rt::Runtime;
964963
use std::rt::task::Task;
@@ -1377,7 +1376,7 @@ mod test {
13771376
// This task should not be able to starve the sender;
13781377
// The sender should get stolen to another thread.
13791378
do spawn {
1380-
while port.try_recv() != comm::Data(()) { }
1379+
while port.try_recv().is_none() { }
13811380
}
13821381

13831382
chan.send(());
@@ -1394,7 +1393,7 @@ mod test {
13941393
// This task should not be able to starve the other task.
13951394
// The sends should eventually yield.
13961395
do spawn {
1397-
while port.try_recv() != comm::Data(()) {
1396+
while port.try_recv().is_none() {
13981397
chan2.send(());
13991398
}
14001399
}

branches/snap-stage3/src/libnative/lib.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,6 @@ static OS_DEFAULT_STACK_ESTIMATE: uint = 1 << 20;
3939
#[cfg(unix, not(android))]
4040
static OS_DEFAULT_STACK_ESTIMATE: uint = 2 * (1 << 20);
4141

42-
43-
// XXX: this should not exist here
44-
#[cfg(stage0, nativestart)]
45-
#[lang = "start"]
46-
pub fn lang_start(main: *u8, argc: int, argv: **u8) -> int {
47-
use std::cast;
48-
use std::task;
49-
50-
do start(argc, argv) {
51-
// Instead of invoking main directly on this thread, invoke it on
52-
// another spawned thread that we are guaranteed to know the size of the
53-
// stack of. Currently, we do not have a method of figuring out the size
54-
// of the main thread's stack, so for stack overflow detection to work
55-
// we must spawn the task in a subtask which we know the stack size of.
56-
let main: extern "Rust" fn() = unsafe { cast::transmute(main) };
57-
let mut task = task::task();
58-
task.name("<main>");
59-
match do task.try { main() } {
60-
Ok(()) => { os::set_exit_status(0); }
61-
Err(..) => { os::set_exit_status(rt::DEFAULT_ERROR_CODE); }
62-
}
63-
}
64-
}
65-
6642
/// Executes the given procedure after initializing the runtime with the given
6743
/// argc/argv.
6844
///

branches/snap-stage3/src/librustc/front/std_inject.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ use syntax::fold;
2121
use syntax::opt_vec;
2222
use syntax::util::small_vector::SmallVector;
2323

24-
// NOTE: upgrade to 0.10-pre after the next snapshot
25-
pub static VERSION: &'static str = "0.9";
26-
2724
pub fn maybe_inject_libstd_ref(sess: Session, crate: ast::Crate)
2825
-> ast::Crate {
2926
if use_std(&crate) {
@@ -56,21 +53,11 @@ struct StandardLibraryInjector {
5653
sess: Session,
5754
}
5855

59-
pub fn with_version(crate: &str) -> Option<(@str, ast::StrStyle)> {
60-
match option_env!("CFG_DISABLE_INJECT_STD_VERSION") {
61-
Some("1") => None,
62-
_ => {
63-
Some((format!("{}\\#{}", crate, VERSION).to_managed(),
64-
ast::CookedStr))
65-
}
66-
}
67-
}
68-
6956
impl fold::Folder for StandardLibraryInjector {
7057
fn fold_crate(&mut self, crate: ast::Crate) -> ast::Crate {
7158
let mut vis = ~[ast::ViewItem {
7259
node: ast::ViewItemExternMod(self.sess.ident_of("std"),
73-
with_version("std"),
60+
None,
7461
ast::DUMMY_NODE_ID),
7562
attrs: ~[],
7663
vis: ast::Private,
@@ -80,15 +67,15 @@ impl fold::Folder for StandardLibraryInjector {
8067
if use_uv(&crate) && !self.sess.building_library.get() {
8168
vis.push(ast::ViewItem {
8269
node: ast::ViewItemExternMod(self.sess.ident_of("green"),
83-
with_version("green"),
70+
None,
8471
ast::DUMMY_NODE_ID),
8572
attrs: ~[],
8673
vis: ast::Private,
8774
span: DUMMY_SP
8875
});
8976
vis.push(ast::ViewItem {
9077
node: ast::ViewItemExternMod(self.sess.ident_of("rustuv"),
91-
with_version("rustuv"),
78+
None,
9279
ast::DUMMY_NODE_ID),
9380
attrs: ~[],
9481
vis: ast::Private,

branches/snap-stage3/src/librustc/front/test.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use driver::session;
1515
use front::config;
16-
use front::std_inject::with_version;
1716

1817
use std::cell::RefCell;
1918
use std::vec;
@@ -293,7 +292,7 @@ fn mk_std(cx: &TestCtxt) -> ast::ViewItem {
293292
ast::DUMMY_NODE_ID))])
294293
} else {
295294
ast::ViewItemExternMod(id_extra,
296-
with_version("extra"),
295+
None,
297296
ast::DUMMY_NODE_ID)
298297
};
299298
ast::ViewItem {

branches/snap-stage3/src/libstd/at_vec.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ pub fn append<T:Clone>(lhs: @[T], rhs: &[T]) -> @[T] {
6868

6969

7070
/// Apply a function to each element of a vector and return the results
71-
#[inline]
7271
pub fn map<T, U>(v: &[T], f: |x: &T| -> U) -> @[U] {
7372
build(Some(v.len()), |push| {
7473
for elem in v.iter() {
@@ -83,7 +82,6 @@ pub fn map<T, U>(v: &[T], f: |x: &T| -> U) -> @[U] {
8382
* Creates an immutable vector of size `n_elts` and initializes the elements
8483
* to the value returned by the function `op`.
8584
*/
86-
#[inline]
8785
pub fn from_fn<T>(n_elts: uint, op: |uint| -> T) -> @[T] {
8886
build(Some(n_elts), |push| {
8987
let mut i: uint = 0u;
@@ -97,7 +95,6 @@ pub fn from_fn<T>(n_elts: uint, op: |uint| -> T) -> @[T] {
9795
* Creates an immutable vector of size `n_elts` and initializes the elements
9896
* to the value `t`.
9997
*/
100-
#[inline]
10198
pub fn from_elem<T:Clone>(n_elts: uint, t: T) -> @[T] {
10299
build(Some(n_elts), |push| {
103100
let mut i: uint = 0u;
@@ -112,7 +109,6 @@ pub fn from_elem<T:Clone>(n_elts: uint, t: T) -> @[T] {
112109
* Creates and initializes an immutable managed vector by moving all the
113110
* elements from an owned vector.
114111
*/
115-
#[inline]
116112
pub fn to_managed_move<T>(v: ~[T]) -> @[T] {
117113
let mut av = @[];
118114
unsafe {
@@ -128,7 +124,6 @@ pub fn to_managed_move<T>(v: ~[T]) -> @[T] {
128124
* Creates and initializes an immutable managed vector by copying all the
129125
* elements of a slice.
130126
*/
131-
#[inline]
132127
pub fn to_managed<T:Clone>(v: &[T]) -> @[T] {
133128
from_fn(v.len(), |i| v[i].clone())
134129
}
@@ -140,7 +135,6 @@ impl<T> Clone for @[T] {
140135
}
141136

142137
impl<A> FromIterator<A> for @[A] {
143-
#[inline]
144138
fn from_iterator<T: Iterator<A>>(iterator: &mut T) -> @[A] {
145139
let (lower, _) = iterator.size_hint();
146140
build(Some(lower), |push| {
@@ -222,7 +216,6 @@ pub mod raw {
222216
move_val_init(&mut(*p), initval);
223217
}
224218

225-
#[inline]
226219
unsafe fn push_slow<T>(v: &mut @[T], initval: T) {
227220
reserve_at_least(v, v.len() + 1u);
228221
push_fast(v, initval);
@@ -239,7 +232,6 @@ pub mod raw {
239232
* * v - A vector
240233
* * n - The number of elements to reserve space for
241234
*/
242-
#[inline]
243235
pub unsafe fn reserve<T>(v: &mut @[T], n: uint) {
244236
// Only make the (slow) call into the runtime if we have to
245237
if capacity(*v) < n {
@@ -251,7 +243,6 @@ pub mod raw {
251243

252244
// Implementation detail. Shouldn't be public
253245
#[allow(missing_doc)]
254-
#[inline]
255246
pub fn reserve_raw(ty: *TyDesc, ptr: *mut *mut Box<Vec<()>>, n: uint) {
256247
// check for `uint` overflow
257248
unsafe {
@@ -266,7 +257,6 @@ pub mod raw {
266257
}
267258
}
268259

269-
#[inline]
270260
fn local_realloc(ptr: *(), size: uint) -> *() {
271261
use rt::local::Local;
272262
use rt::task::Task;
@@ -291,7 +281,6 @@ pub mod raw {
291281
* * v - A vector
292282
* * n - The number of elements to reserve space for
293283
*/
294-
#[inline]
295284
pub unsafe fn reserve_at_least<T>(v: &mut @[T], n: uint) {
296285
reserve(v, uint::next_power_of_two(n));
297286
}

0 commit comments

Comments
 (0)