Skip to content

Commit c5437c0

Browse files
committed
Fix failing tests
1 parent 82198c9 commit c5437c0

6 files changed

+17
-17
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import io::writer_util;
1717
import arc::methods;
1818
import pipes::{port, chan, shared_chan};
1919

20-
macro_rules! move {
20+
macro_rules! move_out {
2121
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
2222
}
2323

@@ -75,7 +75,7 @@ fn run(args: &[~str]) {
7575
vec::iter(worker_results, |r| { future::get(r); } );
7676
//error!{"sending stop message"};
7777
to_child.send(stop);
78-
move!{to_child};
78+
move_out!{to_child};
7979
let result = from_child.recv();
8080
let end = std::time::precise_time_s();
8181
let elapsed = end - start;

src/test/bench/msgsend-pipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import io::writer_util;
1212

1313
import pipes::{port, port_set, chan};
1414

15-
macro_rules! move {
15+
macro_rules! move_out {
1616
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
1717
}
1818

@@ -71,7 +71,7 @@ fn run(args: &[~str]) {
7171
vec::iter(worker_results, |r| { future::get(r); } );
7272
//error!{"sending stop message"};
7373
to_child.send(stop);
74-
move!{to_child};
74+
move_out!{to_child};
7575
let result = from_child.recv();
7676
let end = std::time::precise_time_s();
7777
let elapsed = end - start;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ proto! ring {
2323

2424
fn macros() {
2525
#macro[
26-
[#move[x],
26+
[#move_out[x],
2727
unsafe { let y <- *ptr::addr_of(x); y }]
2828
];
2929
}
@@ -46,7 +46,7 @@ fn thread_ring(i: uint,
4646
alt recv(port) {
4747
ring::num(_n, p) {
4848
//log(error, _n);
49-
num_port = some(move!{p});
49+
num_port = some(move_out!{p});
5050
}
5151
}
5252
};

src/test/bench/shootout-nbody.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mod NBodySystem {
6666
}
6767

6868
i = 0;
69-
while i < 5 { move(bodies[i], dt); i += 1; }
69+
while i < 5 { move_(bodies[i], dt); i += 1; }
7070
}
7171

7272
fn advance_one(bi: Body::props, bj: Body::props, dt: float) unsafe {
@@ -88,7 +88,7 @@ mod NBodySystem {
8888
bj.vz += dz * bi.mass * mag;
8989
}
9090

91-
fn move(b: Body::props, dt: float) {
91+
fn move_(b: Body::props, dt: float) {
9292
b.x += dt * b.vx;
9393
b.y += dt * b.vy;
9494
b.z += dt * b.vz;

src/test/bench/task-perf-word-count-generic.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import comm::recv;
3333
import comm::send;
3434
import comm::methods;
3535

36-
macro_rules! move {
36+
macro_rules! move_out {
3737
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
3838
}
3939

@@ -151,7 +151,7 @@ mod map_reduce {
151151
}
152152
}
153153

154-
enum reduce_proto<V: copy send> { emit_val(V), done, ref, release }
154+
enum reduce_proto<V: copy send> { emit_val(V), done, addref, release }
155155

156156
fn start_mappers<K1: copy send, K2: const copy send hash_key,
157157
V: copy send>(
@@ -188,12 +188,12 @@ mod map_reduce {
188188
alt pipes::recv(ctrl) {
189189
ctrl_proto::reducer(c_, ctrl) {
190190
c = some(c_);
191-
move!{ctrl}
191+
move_out!{ctrl}
192192
}
193193
}
194194
}
195195
intermediates.insert(key, c.get());
196-
send(c.get(), ref);
196+
send(c.get(), addref);
197197
}
198198
}
199199
send(c.get(), emit_val(val));
@@ -232,7 +232,7 @@ mod map_reduce {
232232
// error!{"all done"};
233233
is_done = true;
234234
}
235-
ref { ref_count += 1; }
235+
addref { ref_count += 1; }
236236
release { ref_count -= 1; }
237237
}
238238
}
@@ -286,7 +286,7 @@ mod map_reduce {
286286
}
287287
ctrl = vec::append_one(
288288
ctrls,
289-
ctrl_proto::server::reducer(move!{cc}, c));
289+
ctrl_proto::server::reducer(move_out!{cc}, c));
290290
}
291291
}
292292
}

src/test/bench/task-perf-word-count.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ mod map_reduce {
5656
mapper_done,
5757
}
5858

59-
enum reduce_proto { emit_val(int), done, ref, release, }
59+
enum reduce_proto { emit_val(int), done, addref, release, }
6060

6161
fn start_mappers(ctrl: chan<ctrl_proto>, -inputs: ~[~str]) ->
6262
~[future::future<task::task_result>] {
@@ -87,7 +87,7 @@ mod map_reduce {
8787
send(ctrl, find_reducer(key, chan(p)));
8888
c = recv(p);
8989
im.insert(key, c);
90-
send(c, ref);
90+
send(c, addref);
9191
}
9292
}
9393
send(c, emit_val(val));
@@ -120,7 +120,7 @@ mod map_reduce {
120120
// error!{"all done"};
121121
state.is_done = true;
122122
}
123-
ref { state.ref_count += 1; }
123+
addref { state.ref_count += 1; }
124124
release { state.ref_count -= 1; }
125125
}
126126
}

0 commit comments

Comments
 (0)