Skip to content

Commit 6691d41

Browse files
committed
---
yaml --- r: 171678 b: refs/heads/batch c: a728b4c h: refs/heads/master v: v3
1 parent 31d02e8 commit 6691d41

25 files changed

+48
-59
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: 32545a0460755727d8c91c6ddad173964128a74a
32+
refs/heads/batch: a728b4c9b8936ec63f88a3d8a6e5622e43ee4fc5
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 496dc4eae7de9d14cd49511a9acfbf5f11ae6c3f
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/batch/mk/main.mk

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
# The version number
1616
CFG_RELEASE_NUM=1.0.0
1717

18-
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
19-
# NB Make sure it starts with a dot to conform to semver pre-release
20-
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=
18+
# An optional number to put after the label, e.g. '2' -> '-beta2'
19+
CFG_BETA_CYCLE=
2220

2321
CFG_FILENAME_EXTRA=4e7c5e5c
2422

@@ -31,8 +29,8 @@ CFG_DISABLE_UNSTABLE_FEATURES=1
3129
endif
3230
ifeq ($(CFG_RELEASE_CHANNEL),beta)
3331
# The beta channel is temporarily called 'alpha'
34-
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
35-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
32+
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
33+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
3634
CFG_DISABLE_UNSTABLE_FEATURES=1
3735
endif
3836
ifeq ($(CFG_RELEASE_CHANNEL),nightly)

branches/batch/src/librustdoc/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ pub fn maketest(s: &str, cratename: Option<&str>, lints: bool, dont_insert_main:
215215
let mut prog = String::new();
216216
if lints {
217217
prog.push_str(r"
218-
#![deny(warnings)]
219218
#![allow(unused_variables, unused_assignments, unused_mut, unused_attributes, dead_code)]
220219
");
221220
}

branches/batch/src/libstd/sys/unix/condvar.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,8 @@ impl Condvar {
7676
}
7777

7878
#[inline]
79-
#[cfg(not(target_os = "dragonfly"))]
8079
pub unsafe fn destroy(&self) {
8180
let r = ffi::pthread_cond_destroy(self.inner.get());
8281
debug_assert_eq!(r, 0);
8382
}
84-
85-
#[inline]
86-
#[cfg(target_os = "dragonfly")]
87-
pub unsafe fn destroy(&self) {
88-
let r = ffi::pthread_cond_destroy(self.inner.get());
89-
// On DragonFly pthread_cond_destroy() returns EINVAL if called on
90-
// a condvar that was just initialized with
91-
// ffi::PTHREAD_COND_INITIALIZER. Once it is used or
92-
// pthread_cond_init() is called, this behaviour no longer occurs.
93-
debug_assert!(r == 0 || r == libc::EINVAL);
94-
}
9583
}

branches/batch/src/libstd/sys/unix/mutex.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,8 @@ impl Mutex {
4848
ffi::pthread_mutex_trylock(self.inner.get()) == 0
4949
}
5050
#[inline]
51-
#[cfg(not(target_os = "dragonfly"))]
5251
pub unsafe fn destroy(&self) {
5352
let r = ffi::pthread_mutex_destroy(self.inner.get());
5453
debug_assert_eq!(r, 0);
5554
}
56-
#[inline]
57-
#[cfg(target_os = "dragonfly")]
58-
pub unsafe fn destroy(&self) {
59-
use libc;
60-
let r = ffi::pthread_mutex_destroy(self.inner.get());
61-
// On DragonFly pthread_mutex_destroy() returns EINVAL if called on a
62-
// mutex that was just initialized with ffi::PTHREAD_MUTEX_INITIALIZER.
63-
// Once it is used (locked/unlocked) or pthread_mutex_init() is called,
64-
// this behaviour no longer occurs.
65-
debug_assert!(r == 0 || r == libc::EINVAL);
66-
}
6755
}

branches/batch/src/libstd/sys/unix/rwlock.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,8 @@ impl RWLock {
5050
#[inline]
5151
pub unsafe fn write_unlock(&self) { self.read_unlock() }
5252
#[inline]
53-
#[cfg(not(target_os = "dragonfly"))]
5453
pub unsafe fn destroy(&self) {
5554
let r = ffi::pthread_rwlock_destroy(self.inner.get());
5655
debug_assert_eq!(r, 0);
5756
}
58-
59-
#[inline]
60-
#[cfg(target_os = "dragonfly")]
61-
pub unsafe fn destroy(&self) {
62-
use libc;
63-
let r = ffi::pthread_rwlock_destroy(self.inner.get());
64-
// On DragonFly pthread_rwlock_destroy() returns EINVAL if called on a
65-
// rwlock that was just initialized with
66-
// ffi::PTHREAD_RWLOCK_INITIALIZER. Once it is used (locked/unlocked)
67-
// or pthread_rwlock_init() is called, this behaviour no longer occurs.
68-
debug_assert!(r == 0 || r == libc::EINVAL);
69-
}
7057
}

branches/batch/src/test/bench/core-map.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use std::collections::{BTreeMap, HashMap, HashSet};
1414
use std::os;
1515
use std::rand::{Rng, IsaacRng, SeedableRng};
1616
use std::time::Duration;
17+
use std::uint;
1718

1819
fn timed<F>(label: &str, f: F) where F: FnMut() {
1920
println!(" {}: {}", label, Duration::span(f));

branches/batch/src/test/bench/core-set.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::collections::hash_map::Hasher;
2222
use std::hash::Hash;
2323
use std::os;
2424
use std::time::Duration;
25+
use std::uint;
2526

2627
struct Results {
2728
sequential_ints: Duration,

branches/batch/src/test/bench/core-uint-to-str.rs

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

1111
use std::os;
12+
use std::uint;
1213

1314
fn main() {
1415
let args = os::args();

branches/batch/src/test/bench/msgsend-pipes-shared.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::sync::mpsc::{channel, Sender, Receiver};
2222
use std::os;
2323
use std::thread::Thread;
2424
use std::time::Duration;
25+
use std::uint;
2526

2627
fn move_out<T>(_x: T) {}
2728

branches/batch/src/test/bench/msgsend-pipes.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ use std::sync::mpsc::{channel, Sender, Receiver};
1818
use std::os;
1919
use std::thread::Thread;
2020
use std::time::Duration;
21+
use std::uint;
22+
23+
fn move_out<T>(_x: T) {}
2124

2225
enum request {
2326
get_count,
@@ -39,7 +42,7 @@ fn server(requests: &Receiver<request>, responses: &Sender<uint>) {
3942
_ => { }
4043
}
4144
}
42-
responses.send(count).unwrap();
45+
responses.send(count);
4346
//println!("server exiting");
4447
}
4548

branches/batch/src/test/bench/msgsend-ring-mutex-arcs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use std::os;
2222
use std::sync::{Arc, Future, Mutex, Condvar};
2323
use std::time::Duration;
24+
use std::uint;
2425

2526
// A poor man's pipe.
2627
type pipe = Arc<(Mutex<Vec<uint>>, Condvar)>;
@@ -75,7 +76,7 @@ fn main() {
7576
let num_tasks = args[1].parse::<uint>().unwrap();
7677
let msg_per_task = args[2].parse::<uint>().unwrap();
7778

78-
let (num_chan, num_port) = init();
79+
let (mut num_chan, num_port) = init();
7980

8081
let mut p = Some((num_chan, num_port));
8182
let dur = Duration::span(|| {

branches/batch/src/test/bench/rt-parfib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,23 @@
1111
use std::sync::mpsc::channel;
1212
use std::os;
1313
use std::thread::Thread;
14+
use std::uint;
1415

1516
// A simple implementation of parfib. One subtree is found in a new
1617
// task and communicated over a oneshot pipe, the other is found
1718
// locally. There is no sequential-mode threshold.
1819

1920
fn parfib(n: uint) -> uint {
20-
if n == 0 || n == 1 {
21+
if(n == 0 || n == 1) {
2122
return 1;
2223
}
2324

2425
let (tx, rx) = channel();
2526
Thread::spawn(move|| {
26-
tx.send(parfib(n-1)).unwrap();
27+
tx.send(parfib(n-1));
2728
});
2829
let m2 = parfib(n-2);
29-
return rx.recv().unwrap() + m2;
30+
return (rx.recv().unwrap() + m2);
3031
}
3132

3233
fn main() {

branches/batch/src/test/bench/shootout-binarytrees.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn main() {
9292
let long_lived_arena = TypedArena::new();
9393
let long_lived_tree = bottom_up_tree(&long_lived_arena, 0, max_depth);
9494

95-
let messages = range_step(min_depth, max_depth + 1, 2).map(|depth| {
95+
let mut messages = range_step(min_depth, max_depth + 1, 2).map(|depth| {
9696
use std::num::Int;
9797
let iterations = 2i.pow((max_depth - depth + min_depth) as uint);
9898
Thread::scoped(move|| {

branches/batch/src/test/bench/shootout-chameneos-redux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fn rendezvous(nn: uint, set: Vec<Color>) {
182182
let (to_rendezvous_log, from_creatures_log) = channel::<String>();
183183

184184
// these channels will allow us to talk to each creature by 'name'/index
185-
let to_creature: Vec<Sender<CreatureInfo>> =
185+
let mut to_creature: Vec<Sender<CreatureInfo>> =
186186
set.iter().enumerate().map(|(ii, &col)| {
187187
// create each creature as a listener with a port, and
188188
// give us a channel to talk to each

branches/batch/src/test/bench/shootout-fannkuch-redux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl Perm {
128128
}
129129

130130

131-
fn reverse(tperm: &mut [i32], k: uint) {
131+
fn reverse(tperm: &mut [i32], mut k: uint) {
132132
tperm.slice_to_mut(k).reverse()
133133
}
134134

@@ -163,7 +163,7 @@ fn fannkuch(n: i32) -> (i32, i32) {
163163
let mut futures = vec![];
164164
let k = perm.max() / N;
165165

166-
for (_, j) in range(0, N).zip(iter::count(0, k)) {
166+
for (i, j) in range(0, N).zip(iter::count(0, k)) {
167167
let max = cmp::min(j+k, perm.max());
168168

169169
futures.push(Thread::scoped(move|| {

branches/batch/src/test/bench/shootout-k-nucleotide.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#![feature(box_syntax)]
4444

4545
use std::ascii::OwnedAsciiExt;
46+
use std::iter::repeat;
4647
use std::slice;
4748
use std::sync::Arc;
4849
use std::thread::Thread;

branches/batch/src/test/bench/shootout-nbody.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,6 @@ fn shift_mut_ref<'a, T>(r: &mut &'a mut [T]) -> Option<&'a mut T> {
202202
raw.data = raw.data.offset(1);
203203
raw.len -= 1;
204204
*r = mem::transmute(raw);
205-
Some({ &mut *ret })
205+
Some(unsafe { &mut *ret })
206206
}
207207
}

branches/batch/src/test/bench/shootout-reverse-complement.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ unsafe impl<T: 'static> Send for Racy<T> {}
229229

230230
/// Executes a closure in parallel over the given iterator over mutable slice.
231231
/// The closure `f` is run in parallel with an element of `iter`.
232-
fn parallel<'a, I, T, F>(iter: I, f: F)
232+
fn parallel<'a, I, T, F>(mut iter: I, f: F)
233233
where T: 'a+Send + Sync,
234234
I: Iterator<Item=&'a mut [T]>,
235235
F: Fn(&mut [T]) + Sync {

branches/batch/src/test/bench/shootout-threadring.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use std::thread::Thread;
4343

4444
fn start(n_tasks: int, token: int) {
4545
let (tx, mut rx) = channel();
46-
tx.send(token).unwrap();
46+
tx.send(token);
4747
for i in range(2, n_tasks + 1) {
4848
let (tx, next_rx) = channel();
4949
Thread::spawn(move|| roundtrip(i, tx, rx));
@@ -58,7 +58,7 @@ fn roundtrip(id: int, tx: Sender<int>, rx: Receiver<int>) {
5858
println!("{}", id);
5959
break;
6060
}
61-
tx.send(token - 1).unwrap();
61+
tx.send(token - 1);
6262
}
6363
}
6464

branches/batch/src/test/bench/std-smallintmap.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use std::collections::VecMap;
1414
use std::os;
1515
use std::time::Duration;
16+
use std::uint;
1617

1718
fn append_sequential(min: uint, max: uint, map: &mut VecMap<uint>) {
1819
for i in range(min, max) {

branches/batch/src/test/bench/sudoku.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ impl Sudoku {
5555
return Sudoku::new(g)
5656
}
5757

58+
pub fn equal(&self, other: &Sudoku) -> bool {
59+
for row in range(0u8, 9u8) {
60+
for col in range(0u8, 9u8) {
61+
if self.grid[row as uint][col as uint] !=
62+
other.grid[row as uint][col as uint] {
63+
return false;
64+
}
65+
}
66+
}
67+
return true;
68+
}
69+
5870
pub fn read(mut reader: &mut BufferedReader<StdReader>) -> Sudoku {
5971
/* assert first line is exactly "9,9" */
6072
assert!(reader.read_line().unwrap() == "9,9".to_string());
@@ -172,7 +184,7 @@ impl Colors {
172184
fn next(&self) -> u8 {
173185
let Colors(c) = *self;
174186
let val = c & HEADS;
175-
if 0u16 == val {
187+
if (0u16 == val) {
176188
return 0u8;
177189
} else {
178190
return val.trailing_zeros() as u8

branches/batch/src/test/bench/task-perf-alloc-unwind.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ enum List<T> {
1919
Nil, Cons(T, Box<List<T>>)
2020
}
2121

22+
enum UniqueList {
23+
ULNil, ULCons(Box<UniqueList>)
24+
}
25+
2226
fn main() {
2327
let (repeat, depth) = if os::getenv("RUST_BENCH").is_some() {
2428
(50, 1000)

branches/batch/src/test/bench/task-perf-jargon-metal-smoke.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use std::sync::mpsc::{channel, Sender};
2121
use std::os;
2222
use std::thread::Thread;
23+
use std::uint;
2324

2425
fn child_generation(gens_left: uint, tx: Sender<()>) {
2526
// This used to be O(n^2) in the number of generations that ever existed.

branches/batch/src/test/bench/task-perf-spawnalot.rs

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

1111
use std::os;
12+
use std::uint;
1213
use std::thread::Thread;
1314

1415
fn f(n: uint) {

0 commit comments

Comments
 (0)