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.
In-memory cache for queries whose keys are densely-numbered IDs
(e.g CrateNum, LocalDefId), and can therefore be used as indices
into a dense vector of cached values.
Track a ‘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.
Detects query cycles by using depth first search over all active query jobs.
If a query cycle is found it will break the cycle by finding an edge which
uses a query latch and then resuming that waiter.
There may be multiple cycles involved in a deadlock, but we only search
one cycle at a call and resume one waiter at once. See FIXME below.