Module rustc::dep_graph [] [src]

🔬 This is a nightly-only experimental API. (rustc_private)

Modules

debug [
Experimental
]

Code for debugging the dep-graph.

Structs

AssertDepGraphSafe [
Experimental
]

A convenient override that lets you pass arbitrary state into a task. Every use should be accompanied by a comment explaining why it makes sense (or how it could be refactored away in the future).

DepGraph [
Experimental
]
DepGraphQuery [
Experimental
]
DepTask [
Experimental
]
DepTrackingMap [
Experimental
]

A DepTrackingMap offers a subset of the Map API and ensures that we make calls to read and write as appropriate. We key the maps with a unique type for brevity.

WorkProduct [
Experimental
]

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.

WorkProductId [
Experimental
]

A "work product" corresponds to a .o (or other) file that we save in between runs. These ids do not have a DefId but rather some independent path or string that persists between runs without the need to be mapped or unmapped. (This ensures we can serialize them even in the absence of a tcx.)

Enums

DepNode [
Experimental
]

Traits

DepGraphSafe [
Experimental
]

The DepGraphSafe trait is used to specify what kinds of values are safe to "leak" into a task. The idea is that this should be only be implemented for things like the tcx as well as various id types, which will create reads in the dep-graph whenever the trait loads anything that might depend on the input program.

DepTrackingMapConfig [
Experimental
]

Functions

visit_all_bodies_in_krate [
Experimental
]
visit_all_item_likes_in_krate [
Experimental
]

Visit all the items in the krate in some order. When visiting a particular item, first create a dep-node by calling dep_node_fn and push that onto the dep-graph stack of tasks, and also create a read edge from the corresponding AST node. This is used in compiler passes to automatically record the item that they are working on.