Skip to main content

Module dep_graph

Module dep_graph 

Source

Re-exportsΒ§

use std::panic; πŸ”’
use std::panic; πŸ”’
use tracing::instrument; πŸ”’
use tracing::instrument; πŸ”’
pub use self::dep_node::DepKind;
pub use self::dep_node::DepKindVTable;
pub use self::dep_node::DepNode;
pub use self::dep_node::WorkProductId;
pub use self::dep_node::dep_kind_from_label;
pub use self::dep_node_key::DepNodeKey;
pub use self::graph::DepGraph;
pub use self::graph::DepGraphData;
pub use self::graph::DepNodeIndex;
pub use self::graph::QuerySideEffect;
pub use self::graph::TaskDepsRef;
pub use self::graph::WorkProduct;
pub use self::graph::WorkProductMap;
pub use self::graph::hash_result;
use self::graph::MarkFrame; πŸ”’
use self::graph::print_markframe_trace; πŸ”’
pub use self::retained::RetainedDepGraph;
pub use self::serialized::SerializedDepGraph;
pub use self::serialized::SerializedDepNodeIndex;
pub use crate::dep_graph::debug::DepNodeFilter;
pub use crate::dep_graph::debug::EdgeFilter;
pub use crate::ty::print::with_reduced_queries;
pub use crate::ty::print::with_reduced_queries;
use crate::ty; πŸ”’
use crate::ty::TyCtxt; πŸ”’

ModulesΒ§

debug πŸ”’
Code for debugging the dep-graph.
dep_node πŸ”’
This module defines the DepNode type which the compiler uses to represent nodes in the dependency graph. A DepNode consists of a DepKind (which specifies the kind of thing it represents, like a piece of HIR, MIR, etc.) and a β€œkey fingerprint”, a 128-bit hash value, the exact meaning of which depends on the node’s DepKind. Together, the kind and the key fingerprint fully identify a dependency node, even across multiple compilation sessions. In other words, the value of the key fingerprint does not depend on anything that is specific to a given compilation session, like an unpredictable interning key (e.g., NodeId, DefId, Symbol) or the numeric value of a pointer. The concept behind this could be compared to how git commit hashes uniquely identify a given commit. The fingerprinting approach has a few advantages:
dep_node_key πŸ”’
edges πŸ”’
How a task’s reads are recorded and deduplicated into the edge list of its node.
graph πŸ”’
retained πŸ”’
serialized πŸ”’
The data that we will serialize and deserialize.

EnumsΒ§

KeyFingerprintStyle
Describes the contents of the fingerprint generated by a given query.

FunctionsΒ§

read_deps πŸ”’
Access dependencies from current implicit context.
with_deps πŸ”’
Execute the operation with provided dependencies.