Add DepGraph to tcx.
This commit is contained in:
parent
c77cd480cf
commit
aa265869ba
1 changed files with 5 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
// FIXME: (@jroesch) @eddyb should remove this when he renames ctxt
|
// FIXME: (@jroesch) @eddyb should remove this when he renames ctxt
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
|
use dep_graph::{DepGraph, DepNode, DepTrackingMap};
|
||||||
use front::map as ast_map;
|
use front::map as ast_map;
|
||||||
use session::Session;
|
use session::Session;
|
||||||
use lint;
|
use lint;
|
||||||
|
@ -224,6 +225,8 @@ pub struct ctxt<'tcx> {
|
||||||
region_interner: RefCell<FnvHashMap<&'tcx Region, &'tcx Region>>,
|
region_interner: RefCell<FnvHashMap<&'tcx Region, &'tcx Region>>,
|
||||||
stability_interner: RefCell<FnvHashMap<&'tcx attr::Stability, &'tcx attr::Stability>>,
|
stability_interner: RefCell<FnvHashMap<&'tcx attr::Stability, &'tcx attr::Stability>>,
|
||||||
|
|
||||||
|
pub dep_graph: DepGraph,
|
||||||
|
|
||||||
/// Common types, pre-interned for your convenience.
|
/// Common types, pre-interned for your convenience.
|
||||||
pub types: CommonTypes<'tcx>,
|
pub types: CommonTypes<'tcx>,
|
||||||
|
|
||||||
|
@ -483,7 +486,7 @@ impl<'tcx> ctxt<'tcx> {
|
||||||
{
|
{
|
||||||
let interner = RefCell::new(FnvHashMap());
|
let interner = RefCell::new(FnvHashMap());
|
||||||
let common_types = CommonTypes::new(&arenas.type_, &interner);
|
let common_types = CommonTypes::new(&arenas.type_, &interner);
|
||||||
|
let dep_graph = DepGraph::new(s.opts.incremental_compilation);
|
||||||
tls::enter(ctxt {
|
tls::enter(ctxt {
|
||||||
arenas: arenas,
|
arenas: arenas,
|
||||||
interner: interner,
|
interner: interner,
|
||||||
|
@ -491,6 +494,7 @@ impl<'tcx> ctxt<'tcx> {
|
||||||
bare_fn_interner: RefCell::new(FnvHashMap()),
|
bare_fn_interner: RefCell::new(FnvHashMap()),
|
||||||
region_interner: RefCell::new(FnvHashMap()),
|
region_interner: RefCell::new(FnvHashMap()),
|
||||||
stability_interner: RefCell::new(FnvHashMap()),
|
stability_interner: RefCell::new(FnvHashMap()),
|
||||||
|
dep_graph: dep_graph.clone(),
|
||||||
types: common_types,
|
types: common_types,
|
||||||
named_region_map: named_region_map,
|
named_region_map: named_region_map,
|
||||||
region_maps: region_maps,
|
region_maps: region_maps,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue