|
13 | 13 | // FIXME: (@jroesch) @eddyb should remove this when he renames ctxt
|
14 | 14 | #![allow(non_camel_case_types)]
|
15 | 15 |
|
| 16 | +use dep_graph::{DepGraph, DepNode, DepTrackingMap}; |
16 | 17 | use front::map as ast_map;
|
17 | 18 | use session::Session;
|
18 | 19 | use lint;
|
@@ -224,6 +225,8 @@ pub struct ctxt<'tcx> {
|
224 | 225 | region_interner: RefCell<FnvHashMap<&'tcx Region, &'tcx Region>>,
|
225 | 226 | stability_interner: RefCell<FnvHashMap<&'tcx attr::Stability, &'tcx attr::Stability>>,
|
226 | 227 |
|
| 228 | + pub dep_graph: DepGraph, |
| 229 | + |
227 | 230 | /// Common types, pre-interned for your convenience.
|
228 | 231 | pub types: CommonTypes<'tcx>,
|
229 | 232 |
|
@@ -483,14 +486,15 @@ impl<'tcx> ctxt<'tcx> {
|
483 | 486 | {
|
484 | 487 | let interner = RefCell::new(FnvHashMap());
|
485 | 488 | let common_types = CommonTypes::new(&arenas.type_, &interner);
|
486 |
| - |
| 489 | + let dep_graph = DepGraph::new(s.opts.incremental_compilation); |
487 | 490 | tls::enter(ctxt {
|
488 | 491 | arenas: arenas,
|
489 | 492 | interner: interner,
|
490 | 493 | substs_interner: RefCell::new(FnvHashMap()),
|
491 | 494 | bare_fn_interner: RefCell::new(FnvHashMap()),
|
492 | 495 | region_interner: RefCell::new(FnvHashMap()),
|
493 | 496 | stability_interner: RefCell::new(FnvHashMap()),
|
| 497 | + dep_graph: dep_graph.clone(), |
494 | 498 | types: common_types,
|
495 | 499 | named_region_map: named_region_map,
|
496 | 500 | region_maps: region_maps,
|
|
0 commit comments