Remove RawDefId tracking infrastructure from incr. comp. framework.
This infrastructure is obsolete now with the new encoding scheme for the DefPathHash->DefIndex maps in crate metadata.
This commit is contained in:
parent
960893c50a
commit
5445715c20
7 changed files with 6 additions and 134 deletions
|
@ -53,18 +53,6 @@ use std::hash::Hash;
|
|||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable, Decodable)]
|
||||
pub struct DepNode<K> {
|
||||
pub kind: K,
|
||||
// Important - whenever a `DepNode` is constructed, we need to make
|
||||
// sure to register a `DefPathHash -> DefId` mapping if needed.
|
||||
// This is currently done in two places:
|
||||
//
|
||||
// * When a `DepNode::construct` is called, `arg.to_fingerprint()`
|
||||
// is responsible for calling `OnDiskCache::store_foreign_def_id_hash`
|
||||
// if needed
|
||||
// * When we serialize the on-disk cache, `OnDiskCache::serialize` is
|
||||
// responsible for calling `DepGraph::register_reused_dep_nodes`.
|
||||
//
|
||||
// FIXME: Enforce this by preventing manual construction of `DefNode`
|
||||
// (e.g. add a `_priv: ()` field)
|
||||
pub hash: PackedFingerprint,
|
||||
}
|
||||
|
||||
|
|
|
@ -760,20 +760,6 @@ impl<K: DepKind> DepGraph<K> {
|
|||
}
|
||||
}
|
||||
|
||||
// Register reused dep nodes (i.e. nodes we've marked red or green) with the context.
|
||||
pub fn register_reused_dep_nodes<Ctxt: DepContext<DepKind = K>>(&self, tcx: Ctxt) {
|
||||
let data = self.data.as_ref().unwrap();
|
||||
for prev_index in data.colors.values.indices() {
|
||||
match data.colors.get(prev_index) {
|
||||
Some(DepNodeColor::Red) | Some(DepNodeColor::Green(_)) => {
|
||||
let dep_node = data.previous.index_to_node(prev_index);
|
||||
tcx.register_reused_dep_node(&dep_node);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn print_incremental_info(&self) {
|
||||
if let Some(data) = &self.data {
|
||||
data.current.encoder.borrow().print_incremental_info(
|
||||
|
|
|
@ -27,8 +27,6 @@ pub trait DepContext: Copy {
|
|||
/// Access the DepGraph.
|
||||
fn dep_graph(&self) -> &DepGraph<Self::DepKind>;
|
||||
|
||||
fn register_reused_dep_node(&self, dep_node: &DepNode<Self::DepKind>);
|
||||
|
||||
/// Access the profiler.
|
||||
fn profiler(&self) -> &SelfProfilerRef;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue