From d20e63ab65f7ba28db36ae43379706ca9dba1ca5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 8 May 2013 17:03:17 -0700 Subject: [PATCH] test: Fix modes in the benchmarks. --- src/test/bench/graph500-bfs.rs | 4 ++-- src/test/bench/msgsend-ring-mutex-arcs.rs | 5 +---- src/test/bench/msgsend-ring-pipes.rs | 4 ++-- src/test/bench/msgsend-ring-rw-arcs.rs | 5 +---- src/test/bench/pingpong.rs | 5 +++-- src/test/bench/shootout-pfib.rs | 2 +- src/test/bench/task-perf-linked-failure.rs | 2 +- src/test/bench/task-perf-spawnalot.rs | 2 +- 8 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/test/bench/graph500-bfs.rs b/src/test/bench/graph500-bfs.rs index 83855b142feb..1842a8ff42e5 100644 --- a/src/test/bench/graph500-bfs.rs +++ b/src/test/bench/graph500-bfs.rs @@ -273,7 +273,7 @@ fn pbfs(graph: &arc::ARC, key: node_id) -> bfs_result { colors = do par::mapi(*color_vec) { let colors = arc::clone(&color); let graph = arc::clone(graph); - let result: ~fn(+x: uint, +y: &color) -> color = |i, c| { + let result: ~fn(x: uint, y: &color) -> color = |i, c| { let colors = arc::get(&colors); let graph = arc::get(&graph); match *c { @@ -395,7 +395,7 @@ fn validate(edges: ~[(node_id, node_id)], let status = do par::alli(tree) { let edges = copy edges; - let result: ~fn(+x: uint, v: &i64) -> bool = |u, v| { + let result: ~fn(x: uint, v: &i64) -> bool = |u, v| { let u = u as node_id; if *v == -1i64 || u == root { true diff --git a/src/test/bench/msgsend-ring-mutex-arcs.rs b/src/test/bench/msgsend-ring-mutex-arcs.rs index ed08297ab3fe..2d234634cc8b 100644 --- a/src/test/bench/msgsend-ring-mutex-arcs.rs +++ b/src/test/bench/msgsend-ring-mutex-arcs.rs @@ -45,10 +45,7 @@ fn init() -> (pipe,pipe) { } -fn thread_ring(i: uint, - count: uint, - +num_chan: pipe, - +num_port: pipe) { +fn thread_ring(i: uint, count: uint, num_chan: pipe, num_port: pipe) { let mut num_chan = Some(num_chan); let mut num_port = Some(num_port); // Send/Receive lots of messages. diff --git a/src/test/bench/msgsend-ring-pipes.rs b/src/test/bench/msgsend-ring-pipes.rs index 22d58730f58f..aef5c18499ac 100644 --- a/src/test/bench/msgsend-ring-pipes.rs +++ b/src/test/bench/msgsend-ring-pipes.rs @@ -35,8 +35,8 @@ macro_rules! move_out ( fn thread_ring(i: uint, count: uint, - +num_chan: ring::client::num, - +num_port: ring::server::num) { + num_chan: ring::client::num, + num_port: ring::server::num) { let mut num_chan = Some(num_chan); let mut num_port = Some(num_port); // Send/Receive lots of messages. diff --git a/src/test/bench/msgsend-ring-rw-arcs.rs b/src/test/bench/msgsend-ring-rw-arcs.rs index 221177b9dd9a..02415c4bcfce 100644 --- a/src/test/bench/msgsend-ring-rw-arcs.rs +++ b/src/test/bench/msgsend-ring-rw-arcs.rs @@ -46,10 +46,7 @@ fn init() -> (pipe,pipe) { } -fn thread_ring(i: uint, - count: uint, - +num_chan: pipe, - +num_port: pipe) { +fn thread_ring(i: uint, count: uint, num_chan: pipe, num_port: pipe) { let mut num_chan = Some(num_chan); let mut num_port = Some(num_port); // Send/Receive lots of messages. diff --git a/src/test/bench/pingpong.rs b/src/test/bench/pingpong.rs index 09e663325ed4..cfad253cfed5 100644 --- a/src/test/bench/pingpong.rs +++ b/src/test/bench/pingpong.rs @@ -117,8 +117,9 @@ pub fn spawn_service_recv( client } -fn switch(+endp: core::pipes::RecvPacketBuffered, - f: &fn(+v: Option) -> U) -> U { +fn switch(endp: core::pipes::RecvPacketBuffered, + f: &fn(v: Option) -> U) + -> U { f(core::pipes::try_recv(endp)) } diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs index 27a59feedd0a..b7ae331c8f37 100644 --- a/src/test/bench/shootout-pfib.rs +++ b/src/test/bench/shootout-pfib.rs @@ -66,7 +66,7 @@ fn parse_opts(argv: ~[~str]) -> Config { } } -fn stress_task(&&id: int) { +fn stress_task(id: int) { let mut i = 0; loop { let n = 15; diff --git a/src/test/bench/task-perf-linked-failure.rs b/src/test/bench/task-perf-linked-failure.rs index 99e7de307279..6015f21be727 100644 --- a/src/test/bench/task-perf-linked-failure.rs +++ b/src/test/bench/task-perf-linked-failure.rs @@ -46,7 +46,7 @@ fn grandchild_group(num_tasks: uint) { // Master grandchild task exits early. } -fn spawn_supervised_blocking(myname: &str, +f: ~fn()) { +fn spawn_supervised_blocking(myname: &str, f: ~fn()) { let mut res = None; let mut builder = task::task(); builder.future_result(|r| res = Some(r)); diff --git a/src/test/bench/task-perf-spawnalot.rs b/src/test/bench/task-perf-spawnalot.rs index 8c5bbe257bdd..e6da898a0349 100644 --- a/src/test/bench/task-perf-spawnalot.rs +++ b/src/test/bench/task-perf-spawnalot.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn f(&&n: uint) { +fn f(n: uint) { let mut i = 0u; while i < n { task::try(|| g() );