mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-28 23:53:55 +00:00
Move external crate/lib resolution to its own pass
The scope of external crate reading is beyond the resolve pass now, as it builds up tables of information needed for several different purposes.
This commit is contained in:
parent
85535fc3e0
commit
29b766029c
@ -112,6 +112,8 @@ fn compile_input(session::session sess, ast::crate_cfg cfg, str input,
|
||||
}
|
||||
auto ast_map = time(time_passes, "ast indexing",
|
||||
bind middle::ast_map::map_crate(*crate));
|
||||
time(time_passes, "external crate/lib resolution",
|
||||
bind creader::read_crates(sess, *crate));
|
||||
auto d =
|
||||
time(time_passes, "resolution",
|
||||
bind resolve::resolve_crate(sess, ast_map, crate));
|
||||
|
@ -7,7 +7,6 @@ import ast::def_id;
|
||||
import ast::node_id;
|
||||
import ast::local_def;
|
||||
|
||||
import metadata::creader;
|
||||
import metadata::decoder;
|
||||
import metadata::cstore;
|
||||
import driver::session::session;
|
||||
@ -125,7 +124,6 @@ tag namespace { ns_value; ns_type; ns_module; }
|
||||
|
||||
fn resolve_crate(session sess, &ast_map::map amap, @ast::crate crate) ->
|
||||
tup(def_map, constr_table) {
|
||||
creader::read_crates(sess, *crate);
|
||||
auto e =
|
||||
@rec(crate_map=sess.get_cstore().use_crate_map,
|
||||
def_map=new_int_hash[def](),
|
||||
|
Loading…
Reference in New Issue
Block a user