mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Auto merge of #52476 - wesleywiser:categorize_queries, r=nikomatsakis
Categorize queries for later self-profiling Change the define_queries! macro per feedback on #51657. Big thanks to @mark-i-m for the help getting the macro changes correct! I'm pulling this commit out of the other PR because it's hard to keep up-to-date as queries are added or changed. r? @nikomatsakis
This commit is contained in:
commit
3bea4d1fc6
File diff suppressed because it is too large
Load Diff
@ -631,9 +631,19 @@ macro_rules! handle_cycle_error {
|
||||
}
|
||||
|
||||
macro_rules! define_queries {
|
||||
(<$tcx:tt> $($category:tt {
|
||||
$($(#[$attr:meta])* [$($modifiers:tt)*] fn $name:ident: $node:ident($K:ty) -> $V:ty,)*
|
||||
},)*) => {
|
||||
define_queries_inner! { <$tcx>
|
||||
$($( $(#[$attr])* category<$category> [$($modifiers)*] fn $name: $node($K) -> $V,)*)*
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! define_queries_inner {
|
||||
(<$tcx:tt>
|
||||
$($(#[$attr:meta])*
|
||||
[$($modifiers:tt)*] fn $name:ident: $node:ident($K:ty) -> $V:ty,)*) => {
|
||||
$($(#[$attr:meta])* category<$category:tt>
|
||||
[$($modifiers:tt)*] fn $name:ident: $node:ident($K:ty) -> $V:ty,)*) => {
|
||||
|
||||
use std::mem;
|
||||
#[cfg(parallel_queries)]
|
||||
|
Loading…
Reference in New Issue
Block a user