Build the query vtable directly.
This commit is contained in:
parent
55ccbd090d
commit
7c0920f5fb
7 changed files with 67 additions and 120 deletions
|
@ -14,15 +14,13 @@ extern crate rustc_macros;
|
|||
#[macro_use]
|
||||
extern crate rustc_middle;
|
||||
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_middle::arena::Arena;
|
||||
use rustc_middle::dep_graph::{self, DepKindStruct};
|
||||
use rustc_middle::dep_graph::{self, DepKindStruct, SerializedDepNodeIndex};
|
||||
use rustc_middle::ty::query::{query_keys, query_storage, query_stored, query_values};
|
||||
use rustc_middle::ty::query::{Providers, QueryEngine};
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_query_system::ich::StableHashingContext;
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::Span;
|
||||
|
||||
#[macro_use]
|
||||
|
@ -39,9 +37,8 @@ use keys::Key;
|
|||
mod values;
|
||||
use self::values::Value;
|
||||
|
||||
use rustc_query_system::query::QueryAccessors;
|
||||
pub use rustc_query_system::query::QueryConfig;
|
||||
pub(crate) use rustc_query_system::query::QueryDescription;
|
||||
pub(crate) use rustc_query_system::query::{QueryDescription, QueryVtable};
|
||||
|
||||
mod on_disk_cache;
|
||||
pub use on_disk_cache::OnDiskCache;
|
||||
|
@ -51,6 +48,14 @@ pub use self::profiling_support::alloc_self_profile_query_strings;
|
|||
|
||||
mod util;
|
||||
|
||||
fn describe_as_module(def_id: LocalDefId, tcx: TyCtxt<'_>) -> String {
|
||||
if def_id.is_top_level_module() {
|
||||
"top-level module".to_string()
|
||||
} else {
|
||||
format!("module `{}`", tcx.def_path_str(def_id.to_def_id()))
|
||||
}
|
||||
}
|
||||
|
||||
rustc_query_append! { [define_queries!][<'tcx>] }
|
||||
|
||||
impl<'tcx> Queries<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue