rustc: Cleanup unused ext_map
This commit is contained in:
parent
5e3ffb6cbd
commit
5cfcf20b25
@ -163,7 +163,7 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: str,
|
||||
bind middle::ast_map::map_crate(*crate));
|
||||
time(time_passes, "external crate/lib resolution",
|
||||
bind creader::read_crates(sess, *crate));
|
||||
let {def_map, ext_map, exp_map, impl_map} =
|
||||
let {def_map, exp_map, impl_map} =
|
||||
time(time_passes, "resolution",
|
||||
bind resolve::resolve_crate(sess, ast_map, crate));
|
||||
let freevars =
|
||||
@ -171,7 +171,7 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: str,
|
||||
bind freevars::annotate_freevars(def_map, crate));
|
||||
time(time_passes, "const checking",
|
||||
bind middle::check_const::check_crate(sess, crate));
|
||||
let ty_cx = ty::mk_ctxt(sess, def_map, ext_map, ast_map, freevars);
|
||||
let ty_cx = ty::mk_ctxt(sess, def_map, ast_map, freevars);
|
||||
let method_map = time(time_passes, "typechecking",
|
||||
bind typeck::check_crate(ty_cx, impl_map, crate));
|
||||
time(time_passes, "block-use checking",
|
||||
@ -270,10 +270,10 @@ fn pretty_print_input(sess: session::session, cfg: ast::crate_cfg, input: str,
|
||||
ppm_typed. {
|
||||
crate = syntax::ext::expand::expand_crate(sess, crate);
|
||||
let amap = middle::ast_map::map_crate(*crate);
|
||||
let {def_map, ext_map, impl_map, _} =
|
||||
let {def_map, impl_map, _} =
|
||||
resolve::resolve_crate(sess, amap, crate);
|
||||
let freevars = freevars::annotate_freevars(def_map, crate);
|
||||
let ty_cx = ty::mk_ctxt(sess, def_map, ext_map, amap, freevars);
|
||||
let ty_cx = ty::mk_ctxt(sess, def_map, amap, freevars);
|
||||
typeck::check_crate(ty_cx, impl_map, crate);
|
||||
ann = {pre: ann_paren_for_expr, post: bind ann_typed_post(ty_cx, _)};
|
||||
}
|
||||
|
@ -151,8 +151,7 @@ tag dir { inside; outside; }
|
||||
tag namespace { ns_value; ns_type; ns_module; }
|
||||
|
||||
fn resolve_crate(sess: session, amap: ast_map::map, crate: @ast::crate) ->
|
||||
{def_map: def_map, ext_map: ext_map,
|
||||
exp_map: exp_map, impl_map: impl_map} {
|
||||
{def_map: def_map, exp_map: exp_map, impl_map: impl_map} {
|
||||
let e =
|
||||
@{cstore: sess.get_cstore(),
|
||||
def_map: new_int_hash(),
|
||||
@ -178,8 +177,7 @@ fn resolve_crate(sess: session, amap: ast_map::map, crate: @ast::crate) ->
|
||||
if sess.get_opts().warn_unused_imports {
|
||||
check_unused_imports(e);
|
||||
}
|
||||
ret {def_map: e.def_map, ext_map: e.ext_map,
|
||||
exp_map: e.exp_map, impl_map: e.impl_map};
|
||||
ret {def_map: e.def_map, exp_map: e.exp_map, impl_map: e.impl_map};
|
||||
}
|
||||
|
||||
// Locate all modules and imports and index them, so that the next passes can
|
||||
|
@ -411,8 +411,7 @@ fn mk_rcache() -> creader_cache {
|
||||
}
|
||||
|
||||
|
||||
fn mk_ctxt(s: session::session, dm: resolve::def_map,
|
||||
_em: hashmap<def_id, [ident]>, amap: ast_map::map,
|
||||
fn mk_ctxt(s: session::session, dm: resolve::def_map, amap: ast_map::map,
|
||||
freevars: freevars::freevar_map) -> ctxt {
|
||||
let ntt: node_type_table =
|
||||
@smallintmap::mk::<ty::ty_param_substs_opt_and_ty>();
|
||||
|
Loading…
Reference in New Issue
Block a user