Crate rustc_query_impl[−][src]
Expand description
Support for serializing the dep-graph and reloading it.
Modules
Defines the set of legal keys that can be used in queries.
The implementation of the query system itself. This defines the macros that generate the actual methods on tcx which find and execute the provider, manage the caches, and so forth.
Defines how the compiler represents types internally.
Structs
This struct stores metadata about each DepKind.
A LocalDefId is equivalent to a DefId with krate == LOCAL_CRATE. Since
we encode this information in the type, we can ensure at compile time that
no DefIds from upstream crates get thrown into the mix. There are quite a
few cases where we know that only DefIds from the local crate are expected
and a DefId from a different crate would signify a bug somewhere. This
is when LocalDefId comes in handy.
Provides an interface to incremental compilation data cached from the
previous compilation session. This data will eventually include the results
of a few selected queries (like typeck and mir_optimized) and
any side effects that have been emitted during a query.
Represents a span and a query key.
Represents an active query job.
A value uniquely identifying an active query job.
Values used when checking a query cache which can be reused on a cache-miss to execute the query.
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.
Description of a frame in the query stack.
A compressed span.
When hashing something that ends up affecting properties like symbol names, we want these symbol names to be calculated independently of other factors like what architecture you’re compiling from.
The central data structure of the compiler. It stores references to the various arenas and also houses the results of the various compiler queries that have been performed. See the rustc dev guide for more details.
Enums
A simplified version of rustc_hir::def::DefKind.
Traits
Something that implements HashStable<CTX> can be hashed in a way that is
stable across multiple compilation sessions.
Functions
All self-profiling events generated by the query engine use
virtual StringIds for their event_id. This method makes all
those virtual StringIds point to actual strings.
Checks if the query is already computed and in the cache. It returns the shard index and a lock guard to the shard, which will be used if the query is not in the cache and we need to compute it.