Move most of make_query into a generic function, away from the macro

This should both make the code easier to read and also greatly reduce the amount of codegen
the compiler has to do, since it only needs to monomorphize `create_query_frame` for each
new key and not for each query.
This commit is contained in:
Joshua Nelson 2022-08-11 20:36:13 -05:00
parent 1de08b19d1
commit 0bedd354ca
2 changed files with 56 additions and 42 deletions

View file

@ -15,7 +15,6 @@ extern crate rustc_macros;
#[macro_use]
extern crate rustc_middle;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::sync::AtomicU64;
use rustc_middle::arena::Arena;
use rustc_middle::dep_graph::{self, DepKindStruct, SerializedDepNodeIndex};