1
Fork 0

rustc: remove usage of root_map from astencode

This commit is contained in:
Flavio Percoco 2014-04-15 22:43:24 +02:00
parent 71f054ddd0
commit 13c8edfa2e
3 changed files with 4 additions and 10 deletions

View file

@ -359,11 +359,10 @@ pub fn phase_3_run_analysis_passes(sess: Session,
time(time_passes, "liveness checking", (), |_| time(time_passes, "liveness checking", (), |_|
middle::liveness::check_crate(&ty_cx, &capture_map, krate)); middle::liveness::check_crate(&ty_cx, &capture_map, krate));
let root_map = time(time_passes, "borrow checking", (), |_|
time(time_passes, "borrow checking", (), |_| middle::borrowck::check_crate(&ty_cx, &moves_map,
middle::borrowck::check_crate(&ty_cx, &moves_map, &moved_variables_set,
&moved_variables_set, &capture_map, krate));
&capture_map, krate));
drop(moves_map); drop(moves_map);
drop(moved_variables_set); drop(moved_variables_set);
@ -391,7 +390,6 @@ pub fn phase_3_run_analysis_passes(sess: Session,
exported_items: exported_items, exported_items: exported_items,
public_items: public_items, public_items: public_items,
maps: astencode::Maps { maps: astencode::Maps {
root_map: root_map,
capture_map: RefCell::new(capture_map) capture_map: RefCell::new(capture_map)
}, },
reachable: reachable_map reachable: reachable_map

View file

@ -54,7 +54,6 @@ use writer = serialize::ebml::writer;
// Auxiliary maps of things to be encoded // Auxiliary maps of things to be encoded
pub struct Maps { pub struct Maps {
pub root_map: middle::borrowck::root_map,
pub capture_map: RefCell<middle::moves::CaptureMap>, pub capture_map: RefCell<middle::moves::CaptureMap>,
} }

View file

@ -24,7 +24,6 @@ use syntax::visit;
use syntax::{ast, ast_map, ast_util}; use syntax::{ast, ast_map, ast_util};
use std::cell::RefCell; use std::cell::RefCell;
use collections::HashMap;
use std::rc::Rc; use std::rc::Rc;
// //
@ -127,7 +126,6 @@ pub fn lookup_variant_by_id(tcx: &ty::ctxt,
None => {} None => {}
} }
let maps = astencode::Maps { let maps = astencode::Maps {
root_map: HashMap::new(),
capture_map: RefCell::new(NodeMap::new()) capture_map: RefCell::new(NodeMap::new())
}; };
let e = match csearch::maybe_get_item_ast(tcx, enum_def, let e = match csearch::maybe_get_item_ast(tcx, enum_def,
@ -166,7 +164,6 @@ pub fn lookup_const_by_id(tcx: &ty::ctxt, def_id: ast::DefId)
None => {} None => {}
} }
let maps = astencode::Maps { let maps = astencode::Maps {
root_map: HashMap::new(),
capture_map: RefCell::new(NodeMap::new()) capture_map: RefCell::new(NodeMap::new())
}; };
let e = match csearch::maybe_get_item_ast(tcx, def_id, let e = match csearch::maybe_get_item_ast(tcx, def_id,