Skip to content

Commit d20e63a

Browse files
committed
test: Fix modes in the benchmarks.
1 parent 85d9409 commit d20e63a

8 files changed

+12
-17
lines changed

src/test/bench/graph500-bfs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fn pbfs(graph: &arc::ARC<graph>, key: node_id) -> bfs_result {
273273
colors = do par::mapi(*color_vec) {
274274
let colors = arc::clone(&color);
275275
let graph = arc::clone(graph);
276-
let result: ~fn(+x: uint, +y: &color) -> color = |i, c| {
276+
let result: ~fn(x: uint, y: &color) -> color = |i, c| {
277277
let colors = arc::get(&colors);
278278
let graph = arc::get(&graph);
279279
match *c {
@@ -395,7 +395,7 @@ fn validate(edges: ~[(node_id, node_id)],
395395
396396
let status = do par::alli(tree) {
397397
let edges = copy edges;
398-
let result: ~fn(+x: uint, v: &i64) -> bool = |u, v| {
398+
let result: ~fn(x: uint, v: &i64) -> bool = |u, v| {
399399
let u = u as node_id;
400400
if *v == -1i64 || u == root {
401401
true

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ fn init() -> (pipe,pipe) {
4545
}
4646

4747

48-
fn thread_ring(i: uint,
49-
count: uint,
50-
+num_chan: pipe,
51-
+num_port: pipe) {
48+
fn thread_ring(i: uint, count: uint, num_chan: pipe, num_port: pipe) {
5249
let mut num_chan = Some(num_chan);
5350
let mut num_port = Some(num_port);
5451
// Send/Receive lots of messages.

src/test/bench/msgsend-ring-pipes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ macro_rules! move_out (
3535

3636
fn thread_ring(i: uint,
3737
count: uint,
38-
+num_chan: ring::client::num,
39-
+num_port: ring::server::num) {
38+
num_chan: ring::client::num,
39+
num_port: ring::server::num) {
4040
let mut num_chan = Some(num_chan);
4141
let mut num_port = Some(num_port);
4242
// Send/Receive lots of messages.

src/test/bench/msgsend-ring-rw-arcs.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ fn init() -> (pipe,pipe) {
4646
}
4747

4848

49-
fn thread_ring(i: uint,
50-
count: uint,
51-
+num_chan: pipe,
52-
+num_port: pipe) {
49+
fn thread_ring(i: uint, count: uint, num_chan: pipe, num_port: pipe) {
5350
let mut num_chan = Some(num_chan);
5451
let mut num_port = Some(num_port);
5552
// Send/Receive lots of messages.

src/test/bench/pingpong.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,9 @@ pub fn spawn_service_recv<T:Owned,Tb:Owned>(
117117
client
118118
}
119119

120-
fn switch<T:Owned,Tb:Owned,U>(+endp: core::pipes::RecvPacketBuffered<T, Tb>,
121-
f: &fn(+v: Option<T>) -> U) -> U {
120+
fn switch<T:Owned,Tb:Owned,U>(endp: core::pipes::RecvPacketBuffered<T, Tb>,
121+
f: &fn(v: Option<T>) -> U)
122+
-> U {
122123
f(core::pipes::try_recv(endp))
123124
}
124125

src/test/bench/shootout-pfib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn parse_opts(argv: ~[~str]) -> Config {
6666
}
6767
}
6868

69-
fn stress_task(&&id: int) {
69+
fn stress_task(id: int) {
7070
let mut i = 0;
7171
loop {
7272
let n = 15;

src/test/bench/task-perf-linked-failure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn grandchild_group(num_tasks: uint) {
4646
// Master grandchild task exits early.
4747
}
4848

49-
fn spawn_supervised_blocking(myname: &str, +f: ~fn()) {
49+
fn spawn_supervised_blocking(myname: &str, f: ~fn()) {
5050
let mut res = None;
5151
let mut builder = task::task();
5252
builder.future_result(|r| res = Some(r));

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
fn f(&&n: uint) {
11+
fn f(n: uint) {
1212
let mut i = 0u;
1313
while i < n {
1414
task::try(|| g() );

0 commit comments

Comments
 (0)