test: "tag" -> "enum" in bench

This commit is contained in:
Patrick Walton 2012-01-19 16:05:33 -08:00
parent 64a0695fec
commit 1461cfe416
5 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ use std;
import int; import int;
import str; import str;
tag bottle { none; dual; single; multiple(int); } enum bottle { none; dual; single; multiple(int); }
fn show(b: bottle) { fn show(b: bottle) {
alt b { alt b {

View File

@ -1,7 +1,7 @@
use std; use std;
import int; import int;
tag tree { nil; node(~tree, ~tree, int); } enum tree { nil; node(~tree, ~tree, int); }
fn item_check(t: ~tree) -> int { fn item_check(t: ~tree) -> int {
alt *t { alt *t {

View File

@ -25,7 +25,7 @@ export grid_t, read_grid, solve_grid, write_grid;
type grid = [[mutable u8]]; type grid = [[mutable u8]];
// exported type of sudoku grids // exported type of sudoku grids
tag grid_t { grid_ctor(grid); } enum grid_t { grid_ctor(grid); }
// read a sudoku problem from file f // read a sudoku problem from file f
fn read_grid(f: io::reader) -> grid_t { fn read_grid(f: io::reader) -> grid_t {

View File

@ -65,12 +65,12 @@ mod map_reduce {
type reducer<K: send, V: send> = fn(K, getter<V>); type reducer<K: send, V: send> = fn(K, getter<V>);
tag ctrl_proto<K: send, V: send> { enum ctrl_proto<K: send, V: send> {
find_reducer(K, chan<chan<reduce_proto<V>>>); find_reducer(K, chan<chan<reduce_proto<V>>>);
mapper_done; mapper_done;
} }
tag reduce_proto<V: send> { emit_val(V); done; ref; release; } enum reduce_proto<V: send> { emit_val(V); done; ref; release; }
fn start_mappers<K1: send, K2: send, fn start_mappers<K1: send, K2: send,
V: send>(map: mapper<K1, K2, V>, V: send>(map: mapper<K1, K2, V>,

View File

@ -51,12 +51,12 @@ mod map_reduce {
type reducer = fn@(str, getter); type reducer = fn@(str, getter);
tag ctrl_proto { enum ctrl_proto {
find_reducer(str, chan<chan<reduce_proto>>); find_reducer(str, chan<chan<reduce_proto>>);
mapper_done; mapper_done;
} }
tag reduce_proto { emit_val(int); done; ref; release; } enum reduce_proto { emit_val(int); done; ref; release; }
fn start_mappers(ctrl: chan<ctrl_proto>, -inputs: [str]) -> fn start_mappers(ctrl: chan<ctrl_proto>, -inputs: [str]) ->
[joinable_task] { [joinable_task] {