rustc_query_system: explicitly register reused dep nodes
Register nodes that we've reused from the previous session explicitly with `OnDiskCache`. Previously, we relied on this happening as a side effect of accessing the nodes in the `PreviousDepGraph`. For the sake of performance and avoiding unintended side effects, register explictily.
This commit is contained in:
parent
eb4fc71dc9
commit
7795801902
6 changed files with 51 additions and 62 deletions
|
@ -15,7 +15,6 @@ use rustc_data_structures::profiling::SelfProfilerRef;
|
|||
use rustc_data_structures::sync::Lock;
|
||||
use rustc_data_structures::thin_vec::ThinVec;
|
||||
use rustc_errors::Diagnostic;
|
||||
use rustc_span::def_id::DefPathHash;
|
||||
|
||||
use std::fmt;
|
||||
use std::hash::Hash;
|
||||
|
@ -33,7 +32,7 @@ pub trait DepContext: Copy {
|
|||
/// Try to force a dep node to execute and see if it's green.
|
||||
fn try_force_from_dep_node(&self, dep_node: &DepNode<Self::DepKind>) -> bool;
|
||||
|
||||
fn register_reused_dep_path_hash(&self, hash: DefPathHash);
|
||||
fn register_reused_dep_node(&self, dep_node: &DepNode<Self::DepKind>);
|
||||
|
||||
/// Return whether the current session is tainted by errors.
|
||||
fn has_errors_or_delayed_span_bugs(&self) -> bool;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue