diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
commit | d1b2d29528b7794b41e66fc2136e395a02f8529b (patch) | |
tree | a4a17504b260206dec3cf55b2dca82929a348ac2 /compiler/rustc_query_system/src/dep_graph/graph.rs | |
parent | Releasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip |
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_query_system/src/dep_graph/graph.rs')
-rw-r--r-- | compiler/rustc_query_system/src/dep_graph/graph.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index c9e80a6d9..30422ea11 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -1,6 +1,5 @@ -use parking_lot::Mutex; use rustc_data_structures::fingerprint::Fingerprint; -use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::profiling::{EventId, QueryInvocationId, SelfProfilerRef}; use rustc_data_structures::sharded::{self, Sharded}; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; @@ -88,13 +87,13 @@ pub struct DepGraphData<K: DepKind> { colors: DepNodeColorMap, - processed_side_effects: Mutex<FxHashSet<DepNodeIndex>>, + processed_side_effects: Lock<FxHashSet<DepNodeIndex>>, /// When we load, there may be `.o` files, cached MIR, or other such /// things available to us. If we find that they are not dirty, we /// load the path to the file storing those work-products here into /// this map. We can later look for and extract that data. - previous_work_products: FxIndexMap<WorkProductId, WorkProduct>, + previous_work_products: WorkProductMap, dep_node_debug: Lock<FxHashMap<DepNode<K>, String>>, @@ -117,7 +116,7 @@ impl<K: DepKind> DepGraph<K> { pub fn new( profiler: &SelfProfilerRef, prev_graph: SerializedDepGraph<K>, - prev_work_products: FxIndexMap<WorkProductId, WorkProduct>, + prev_work_products: WorkProductMap, encoder: FileEncoder, record_graph: bool, record_stats: bool, @@ -557,7 +556,7 @@ impl<K: DepKind> DepGraph<K> { result, prev_index, hash_result, - |value| format!("{:?}", value), + |value| format!("{value:?}"), ); #[cfg(debug_assertions)] @@ -689,7 +688,7 @@ impl<K: DepKind> DepGraph<K> { /// Access the map of work-products created during the cached run. Only /// used during saving of the dep-graph. - pub fn previous_work_products(&self) -> &FxIndexMap<WorkProductId, WorkProduct> { + pub fn previous_work_products(&self) -> &WorkProductMap { &self.data.as_ref().unwrap().previous_work_products } @@ -1052,6 +1051,8 @@ pub struct WorkProduct { pub saved_files: UnordMap<String, String>, } +pub type WorkProductMap = UnordMap<WorkProductId, WorkProduct>; + // Index type for `DepNodeData`'s edges. rustc_index::newtype_index! { struct EdgeIndex {} @@ -1433,7 +1434,7 @@ pub(crate) fn print_markframe_trace<K: DepKind>( let mut current = frame; while let Some(frame) = current { let node = data.previous.index_to_node(frame.index); - eprintln!("#{i} {:?}", node); + eprintln!("#{i} {node:?}"); current = frame.parent; i += 1; } |