diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-07-31 21:13:57 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-07-31 21:13:57 -0700 |
| commit | c5437c0bbf65204390762acfc544fb29b3150619 (patch) | |
| tree | 80334717bc00aea784d6d67f73aae14b7dba4525 | |
| parent | 82198c9925a8f5da2a8218dc875bc802e7db6049 (diff) | |
| download | rust-c5437c0bbf65204390762acfc544fb29b3150619.tar.gz rust-c5437c0bbf65204390762acfc544fb29b3150619.zip | |
Fix failing tests
| -rw-r--r-- | src/test/bench/msgsend-pipes-shared.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/msgsend-pipes.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/msgsend-ring-pipes.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/shootout-nbody.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/task-perf-word-count-generic.rs | 12 | ||||
| -rw-r--r-- | src/test/bench/task-perf-word-count.rs | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs index fdf218a82df..82f4c1bef28 100644 --- a/src/test/bench/msgsend-pipes-shared.rs +++ b/src/test/bench/msgsend-pipes-shared.rs @@ -17,7 +17,7 @@ import io::writer_util; import arc::methods; import pipes::{port, chan, shared_chan}; -macro_rules! move { +macro_rules! move_out { { $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } } } @@ -75,7 +75,7 @@ fn run(args: &[~str]) { vec::iter(worker_results, |r| { future::get(r); } ); //error!{"sending stop message"}; to_child.send(stop); - move!{to_child}; + move_out!{to_child}; let result = from_child.recv(); let end = std::time::precise_time_s(); let elapsed = end - start; diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs index 0428123a00c..a9b45ef776f 100644 --- a/src/test/bench/msgsend-pipes.rs +++ b/src/test/bench/msgsend-pipes.rs @@ -12,7 +12,7 @@ import io::writer_util; import pipes::{port, port_set, chan}; -macro_rules! move { +macro_rules! move_out { { $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } } } @@ -71,7 +71,7 @@ fn run(args: &[~str]) { vec::iter(worker_results, |r| { future::get(r); } ); //error!{"sending stop message"}; to_child.send(stop); - move!{to_child}; + move_out!{to_child}; let result = from_child.recv(); let end = std::time::precise_time_s(); let elapsed = end - start; diff --git a/src/test/bench/msgsend-ring-pipes.rs b/src/test/bench/msgsend-ring-pipes.rs index 952157cfcaf..493d98c6a59 100644 --- a/src/test/bench/msgsend-ring-pipes.rs +++ b/src/test/bench/msgsend-ring-pipes.rs @@ -23,7 +23,7 @@ proto! ring { fn macros() { #macro[ - [#move[x], + [#move_out[x], unsafe { let y <- *ptr::addr_of(x); y }] ]; } @@ -46,7 +46,7 @@ fn thread_ring(i: uint, alt recv(port) { ring::num(_n, p) { //log(error, _n); - num_port = some(move!{p}); + num_port = some(move_out!{p}); } } }; diff --git a/src/test/bench/shootout-nbody.rs b/src/test/bench/shootout-nbody.rs index c90ba53c580..3e1288b3b0a 100644 --- a/src/test/bench/shootout-nbody.rs +++ b/src/test/bench/shootout-nbody.rs @@ -66,7 +66,7 @@ mod NBodySystem { } i = 0; - while i < 5 { move(bodies[i], dt); i += 1; } + while i < 5 { move_(bodies[i], dt); i += 1; } } fn advance_one(bi: Body::props, bj: Body::props, dt: float) unsafe { @@ -88,7 +88,7 @@ mod NBodySystem { bj.vz += dz * bi.mass * mag; } - fn move(b: Body::props, dt: float) { + fn move_(b: Body::props, dt: float) { b.x += dt * b.vx; b.y += dt * b.vy; b.z += dt * b.vz; diff --git a/src/test/bench/task-perf-word-count-generic.rs b/src/test/bench/task-perf-word-count-generic.rs index 59e655186ce..59c9be9d58f 100644 --- a/src/test/bench/task-perf-word-count-generic.rs +++ b/src/test/bench/task-perf-word-count-generic.rs @@ -33,7 +33,7 @@ import comm::recv; import comm::send; import comm::methods; -macro_rules! move { +macro_rules! move_out { { $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } } } @@ -151,7 +151,7 @@ mod map_reduce { } } - enum reduce_proto<V: copy send> { emit_val(V), done, ref, release } + enum reduce_proto<V: copy send> { emit_val(V), done, addref, release } fn start_mappers<K1: copy send, K2: const copy send hash_key, V: copy send>( @@ -188,12 +188,12 @@ mod map_reduce { alt pipes::recv(ctrl) { ctrl_proto::reducer(c_, ctrl) { c = some(c_); - move!{ctrl} + move_out!{ctrl} } } } intermediates.insert(key, c.get()); - send(c.get(), ref); + send(c.get(), addref); } } send(c.get(), emit_val(val)); @@ -232,7 +232,7 @@ mod map_reduce { // error!{"all done"}; is_done = true; } - ref { ref_count += 1; } + addref { ref_count += 1; } release { ref_count -= 1; } } } @@ -286,7 +286,7 @@ mod map_reduce { } ctrl = vec::append_one( ctrls, - ctrl_proto::server::reducer(move!{cc}, c)); + ctrl_proto::server::reducer(move_out!{cc}, c)); } } } diff --git a/src/test/bench/task-perf-word-count.rs b/src/test/bench/task-perf-word-count.rs index dd0628d4253..d83045ae417 100644 --- a/src/test/bench/task-perf-word-count.rs +++ b/src/test/bench/task-perf-word-count.rs @@ -56,7 +56,7 @@ mod map_reduce { mapper_done, } - enum reduce_proto { emit_val(int), done, ref, release, } + enum reduce_proto { emit_val(int), done, addref, release, } fn start_mappers(ctrl: chan<ctrl_proto>, -inputs: ~[~str]) -> ~[future::future<task::task_result>] { @@ -87,7 +87,7 @@ mod map_reduce { send(ctrl, find_reducer(key, chan(p))); c = recv(p); im.insert(key, c); - send(c, ref); + send(c, addref); } } send(c, emit_val(val)); @@ -120,7 +120,7 @@ mod map_reduce { // error!{"all done"}; state.is_done = true; } - ref { state.ref_count += 1; } + addref { state.ref_count += 1; } release { state.ref_count -= 1; } } } |
