Skip to main content

Module dep_graph

Module dep_graph 

Source

Re-exports§

pub use self::dep_node::DepKind;
pub use self::dep_node::DepKindVTable;
pub use self::dep_node::DepNode;
pub use self::dep_node::DepNodeKey;
pub use self::dep_node::WorkProductId;
pub use self::dep_node::dep_kind_from_label;
pub use self::dep_node::dep_kinds;
pub use self::dep_node::label_strs;

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 Fingerprint, a 128-bit hash value, the exact meaning of which depends on the node’s DepKind. Together, the kind and the fingerprint fully identify a dependency node, even across multiple compilation sessions. In other words, the value of the 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 🔒
graph 🔒
query 🔒
serialized 🔒
The data that we will serialize and deserialize.

Structs§

DepGraph
DepGraphData
DepGraphQuery
DepNodeFilter
A dep-node filter goes from a user-defined string to a query over nodes. Right now the format is like this:
DepNodeIndex
EdgeFilter
A filter like F -> G where F and G are valid dep-node filters. This can be used to test the source/target independently.
SerializedDepGraph
Data for use when recompiling the current crate.
SerializedDepNodeIndex
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§

FingerprintStyle
Describes the contents of the fingerprint generated by a given query.
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

Functions§

hash_result
read_deps 🔒
Access dependencies from current implicit context.
with_deps 🔒
Execute the operation with provided dependencies.

Type Aliases§

WorkProductMap