Skip to content

Commit

Permalink
rustc: remove usage of root_map from astencode
Browse files Browse the repository at this point in the history
  • Loading branch information
flaper87 committed Apr 23, 2014
1 parent 71f054d commit 13c8edf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 4 additions & 6 deletions src/librustc/driver/driver.rs
Expand Up @@ -359,11 +359,10 @@ pub fn phase_3_run_analysis_passes(sess: Session,
time(time_passes, "liveness checking", (), |_|
middle::liveness::check_crate(&ty_cx, &capture_map, krate));

let root_map =
time(time_passes, "borrow checking", (), |_|
middle::borrowck::check_crate(&ty_cx, &moves_map,
&moved_variables_set,
&capture_map, krate));
time(time_passes, "borrow checking", (), |_|
middle::borrowck::check_crate(&ty_cx, &moves_map,
&moved_variables_set,
&capture_map, krate));

drop(moves_map);
drop(moved_variables_set);
Expand Down Expand Up @@ -391,7 +390,6 @@ pub fn phase_3_run_analysis_passes(sess: Session,
exported_items: exported_items,
public_items: public_items,
maps: astencode::Maps {
root_map: root_map,
capture_map: RefCell::new(capture_map)
},
reachable: reachable_map
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/astencode.rs
Expand Up @@ -54,7 +54,6 @@ use writer = serialize::ebml::writer;

// Auxiliary maps of things to be encoded
pub struct Maps {
pub root_map: middle::borrowck::root_map,
pub capture_map: RefCell<middle::moves::CaptureMap>,
}

Expand Down
3 changes: 0 additions & 3 deletions src/librustc/middle/const_eval.rs
Expand Up @@ -24,7 +24,6 @@ use syntax::visit;
use syntax::{ast, ast_map, ast_util};

use std::cell::RefCell;
use collections::HashMap;
use std::rc::Rc;

//
Expand Down Expand Up @@ -127,7 +126,6 @@ pub fn lookup_variant_by_id(tcx: &ty::ctxt,
None => {}
}
let maps = astencode::Maps {
root_map: HashMap::new(),
capture_map: RefCell::new(NodeMap::new())
};
let e = match csearch::maybe_get_item_ast(tcx, enum_def,
Expand Down Expand Up @@ -166,7 +164,6 @@ pub fn lookup_const_by_id(tcx: &ty::ctxt, def_id: ast::DefId)
None => {}
}
let maps = astencode::Maps {
root_map: HashMap::new(),
capture_map: RefCell::new(NodeMap::new())
};
let e = match csearch::maybe_get_item_ast(tcx, def_id,
Expand Down

0 comments on commit 13c8edf

Please sign in to comment.