Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix failing tests

  • Loading branch information...
commit c5437c0bbf65204390762acfc544fb29b3150619 1 parent 82198c9
@brson brson authored
View
4 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;
View
4 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;
View
4 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});
}
}
};
View
4 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;
View
12 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));
}
}
}
View
6 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; }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.