Skip to main content

Module graph

Module graph 

Source

Re-exportsΒ§

use std::assert_matches; πŸ”’
use std::cell::Cell; πŸ”’
use std::fmt::Debug; πŸ”’
use std::fmt::Debug; πŸ”’
use std::hash::Hash; πŸ”’
use std::hash::Hash; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::atomic::AtomicU32; πŸ”’
use std::sync::atomic::Ordering; πŸ”’
use rustc_data_structures::fingerprint::Fingerprint; πŸ”’
use rustc_data_structures::fingerprint::PackedFingerprint; πŸ”’
use rustc_data_structures::fx::FxHashSet; πŸ”’
use rustc_data_structures::profiling::QueryInvocationId; πŸ”’
use rustc_data_structures::sharded::ShardedHashMap; πŸ”’
use rustc_data_structures::stable_hash::StableHash; πŸ”’
use rustc_data_structures::stable_hash::StableHasher; πŸ”’
use rustc_data_structures::sync::AtomicU64; πŸ”’
use rustc_data_structures::sync::Lock; πŸ”’
use rustc_data_structures::sync::WorkerLocal; πŸ”’
use rustc_data_structures::unord::UnordMap; πŸ”’
use rustc_errors::DiagInner; πŸ”’
use rustc_index::IndexVec; πŸ”’
use rustc_macros::Decodable; πŸ”’
use rustc_macros::Encodable; πŸ”’
use rustc_serialize::opaque::FileEncodeResult; πŸ”’
use rustc_serialize::opaque::FileEncoder; πŸ”’
use rustc_session::Session; πŸ”’
use rustc_span::Symbol; πŸ”’
use smallvec::SmallVec; πŸ”’
use tracing::instrument; πŸ”’
use tracing::instrument; πŸ”’
use super::debug::EdgeFilter; πŸ”’
use std::env; πŸ”’
use std::env; πŸ”’
use super::edges::ReadsRecorder; πŸ”’
use super::edges::SMALL_READS_MAX; πŸ”’
use super::edges::TaskReads; πŸ”’
use super::retained::RetainedDepGraph; πŸ”’
use super::serialized::GraphEncoder; πŸ”’
use super::serialized::SerializedDepGraph; πŸ”’
use super::serialized::SerializedDepNodeIndex; πŸ”’
use super::DepKind; πŸ”’
use super::DepNode; πŸ”’
use super::WorkProductId; πŸ”’
use super::read_deps; πŸ”’
use super::with_deps; πŸ”’
use crate::ich::StableHashState; πŸ”’
use crate::ty::TyCtxt; πŸ”’
use crate::verify_ich::incremental_verify_ich; πŸ”’

StructsΒ§

CurrentDepGraph πŸ”’
CurrentDepGraph stores the dependency graph for the current session. It will be populated as we run queries or tasks. We never remove nodes from the graph: they are only added.
DepGraph
DepGraphData
DepNodeColorMap πŸ”’
DepNodeIndex
EdgeFrame πŸ”’
The edge list of one node being marked green: it occupies buf[start..] of the shared scratch buffer and is popped again on drop, restoring the buffer for the enclosing call.
EdgeIndex πŸ”’
MarkFrame πŸ”’
TaskDeps
WorkProduct
A β€œwork product” is an intermediate result that we save into the incremental directory for later re-use. The primary example are the object files that we save for each partition at code generation time.

EnumsΒ§

DepNodeColor πŸ”’
DesiredColor πŸ”’
The color that DepNodeColorMap::try_set_color should try to apply to a node.
QuerySideEffect
Tracks β€˜side effects’ for a particular query. This struct is saved to disk along with the query result, and loaded from disk if we mark the query as green. This allows us to β€˜replay’ changes to global state that would otherwise only occur if we actually executed the query method.
TaskDepsRef
TrySetColorResult πŸ”’
Return value of DepNodeColorMap::try_set_color, indicating success or failure, and (on failure) what the existing color is.

ConstantsΒ§

COMPRESSED_RED πŸ”’
COMPRESSED_UNKNOWN πŸ”’

FunctionsΒ§

hash_result
panic_on_forbidden_read πŸ”’
print_markframe_trace πŸ”’

Type AliasesΒ§

WorkProductMap