Skip to content

Commit 321768e

Browse files
committed
---
yaml --- r: 14414 b: refs/heads/try c: 8b071eb h: refs/heads/master v: v3
1 parent e23ebd5 commit 321768e

File tree

11 files changed

+29
-14
lines changed

11 files changed

+29
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 1ee139ae1f61309fee44b37034ee1f2a42aba8f1
5+
refs/heads/try: 8b071ebe4c7cc1e986f15e5dca00c3ee7e31db3a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustdoc/attr_pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn run(
2727
fold_res: fold_res,
2828
fold_iface: fold_iface,
2929
fold_impl: fold_impl
30-
with *fold::default_par_fold(srv)
30+
with *fold::default_any_fold(srv)
3131
});
3232
fold.fold_crate(fold, doc)
3333
}

branches/try/src/rustdoc/desc_pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn run(
2222
fold_res: fold_res,
2323
fold_iface: fold_iface,
2424
fold_impl: fold_impl
25-
with *fold::default_par_fold(op)
25+
with *fold::default_any_fold(op)
2626
});
2727
fold.fold_crate(fold, doc)
2828
}

branches/try/src/rustdoc/desc_to_brief_pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn run(
2121
fold_item: fold_item,
2222
fold_iface: fold_iface,
2323
fold_impl: fold_impl
24-
with *fold::default_par_fold(())
24+
with *fold::default_any_fold(())
2525
});
2626
fold.fold_crate(fold, doc)
2727
}

branches/try/src/rustdoc/fold.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export default_seq_fold_impl;
1313
export default_seq_fold_type;
1414
export default_par_fold;
1515
export default_par_fold_mod;
16+
export default_any_fold;
17+
export default_any_fold_mod;
1618

1719
enum fold<T> = t<T>;
1820

@@ -104,6 +106,12 @@ fn default_par_fold<T:send>(ctxt: T) -> fold<T> {
104106
)
105107
}
106108

109+
// Just a convenient wrapper to convert back and forth between
110+
// parallel and sequential folds for perf testing
111+
fn default_any_fold<T:send>(ctxt: T) -> fold<T> {
112+
default_par_fold(ctxt)
113+
}
114+
107115
fn default_seq_fold_crate<T>(
108116
fold: fold<T>,
109117
doc: doc::cratedoc
@@ -146,6 +154,13 @@ fn default_par_fold_mod<T:send>(
146154
}
147155
}
148156

157+
fn default_any_fold_mod<T:send>(
158+
fold: fold<T>,
159+
doc: doc::moddoc
160+
) -> doc::moddoc {
161+
default_par_fold_mod(fold, doc)
162+
}
163+
149164
fn fold_itemtag<T>(fold: fold<T>, doc: doc::itemtag) -> doc::itemtag {
150165
alt doc {
151166
doc::modtag(moddoc) {

branches/try/src/rustdoc/path_pass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn run(srv: astsrv::srv, doc: doc::cratedoc) -> doc::cratedoc {
1717
let fold = fold::fold({
1818
fold_item: fold_item,
1919
fold_mod: fold_mod
20-
with *fold::default_par_fold(ctxt)
20+
with *fold::default_any_fold(ctxt)
2121
});
2222
fold.fold_crate(fold, doc)
2323
}
@@ -33,7 +33,7 @@ fn fold_mod(fold: fold::fold<ctxt>, doc: doc::moddoc) -> doc::moddoc {
3333
let is_topmod = doc.id() == rustc::syntax::ast::crate_node_id;
3434

3535
if !is_topmod { vec::push(fold.ctxt.path, doc.name()); }
36-
let doc = fold::default_par_fold_mod(fold, doc);
36+
let doc = fold::default_any_fold_mod(fold, doc);
3737
if !is_topmod { vec::pop(fold.ctxt.path); }
3838

3939
{

branches/try/src/rustdoc/prune_undoc_details_pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn run(
1616
fold_res: fold_res,
1717
fold_iface: fold_iface,
1818
fold_impl: fold_impl
19-
with *fold::default_par_fold(())
19+
with *fold::default_any_fold(())
2020
});
2121
fold.fold_crate(fold, doc)
2222
}

branches/try/src/rustdoc/prune_undoc_items_pass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn run(
2626
fold_iface: fold_iface,
2727
fold_impl: fold_impl,
2828
fold_type: fold_type
29-
with *fold::default_par_fold(ctxt)
29+
with *fold::default_any_fold(ctxt)
3030
});
3131
fold.fold_crate(fold, doc)
3232
}
@@ -105,7 +105,7 @@ fn fold_mod(
105105
_ { some(itemtag) }
106106
}
107107
}
108-
with fold::default_par_fold_mod(fold, doc)
108+
with fold::default_any_fold_mod(fold, doc)
109109
};
110110
fold.ctxt.have_docs =
111111
doc.brief() != none

branches/try/src/rustdoc/prune_unexported_pass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ fn mk_pass() -> pass {
1313
fn run(srv: astsrv::srv, doc: doc::cratedoc) -> doc::cratedoc {
1414
let fold = fold::fold({
1515
fold_mod: fold_mod
16-
with *fold::default_par_fold(srv)
16+
with *fold::default_any_fold(srv)
1717
});
1818
fold.fold_crate(fold, doc)
1919
}
2020

2121
fn fold_mod(fold: fold::fold<astsrv::srv>, doc: doc::moddoc) -> doc::moddoc {
22-
let doc = fold::default_par_fold_mod(fold, doc);
22+
let doc = fold::default_any_fold_mod(fold, doc);
2323
{
2424
items: ~exported_items(fold.ctxt, doc)
2525
with doc

branches/try/src/rustdoc/sort_pass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn run(
1919
) -> doc::cratedoc {
2020
let fold = fold::fold({
2121
fold_mod: fold_mod
22-
with *fold::default_par_fold(lteq)
22+
with *fold::default_any_fold(lteq)
2323
});
2424
fold.fold_crate(fold, doc)
2525
}
@@ -28,7 +28,7 @@ fn fold_mod(
2828
fold: fold::fold<item_lteq>,
2929
doc: doc::moddoc
3030
) -> doc::moddoc {
31-
let doc = fold::default_par_fold_mod(fold, doc);
31+
let doc = fold::default_any_fold_mod(fold, doc);
3232
{
3333
items: ~sort::merge_sort(fold.ctxt, *doc.items)
3434
with doc

branches/try/src/rustdoc/tystr_pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn run(
2323
fold_iface: fold_iface,
2424
fold_impl: fold_impl,
2525
fold_type: fold_type
26-
with *fold::default_par_fold(srv)
26+
with *fold::default_any_fold(srv)
2727
});
2828
fold.fold_crate(fold, doc)
2929
}

0 commit comments

Comments
 (0)