librustc: Stop calling each_path in coherence.

10% win or so for small crates.
This commit is contained in:
Patrick Walton 2013-08-20 14:55:54 -07:00
parent 4f32a2d854
commit d9bb78efdf
7 changed files with 77 additions and 18 deletions

View file

@ -1316,3 +1316,13 @@ pub fn get_link_args_for_crate(cdata: cmd) -> ~[~str] {
};
result
}
pub fn each_impl(cdata: cmd, callback: &fn(ast::def_id)) {
let impls_doc = reader::get_doc(reader::Doc(cdata.data), tag_impls);
let _ = do reader::tagged_docs(impls_doc, tag_impls_impl) |impl_doc| {
callback(item_def_id(impl_doc, cdata));
true
};
}