forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the query system to rustc_query_impl.
- Loading branch information
Showing
17 changed files
with
170 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[package] | ||
authors = ["The Rust Project Developers"] | ||
name = "rustc_query_impl" | ||
version = "0.0.0" | ||
edition = "2018" | ||
|
||
[lib] | ||
doctest = false | ||
|
||
[dependencies] | ||
measureme = "9.0.0" | ||
rustc-rayon-core = "0.3.0" | ||
tracing = "0.1" | ||
rustc_ast = { path = "../rustc_ast" } | ||
rustc_attr = { path = "../rustc_attr" } | ||
rustc_data_structures = { path = "../rustc_data_structures" } | ||
rustc_errors = { path = "../rustc_errors" } | ||
rustc_feature = { path = "../rustc_feature" } | ||
rustc_hir = { path = "../rustc_hir" } | ||
rustc_index = { path = "../rustc_index" } | ||
rustc_macros = { path = "../rustc_macros" } | ||
rustc_middle = { path = "../rustc_middle" } | ||
rustc_query_system = { path = "../rustc_query_system" } | ||
rustc_span = { path = "../rustc_span" } | ||
rustc_serialize = { path = "../rustc_serialize" } | ||
rustc_session = { path = "../rustc_session" } | ||
rustc_target = { path = "../rustc_target" } |
File renamed without changes.
10 changes: 5 additions & 5 deletions
10
compiler/rustc_middle/src/ty/query/keys.rs → compiler/rustc_query_impl/src/keys.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
//! Support for serializing the dep-graph and reloading it. | ||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] | ||
#![feature(in_band_lifetimes)] | ||
#![feature(exhaustive_patterns)] | ||
#![feature(nll)] | ||
#![feature(min_specialization)] | ||
#![feature(crate_visibility_modifier)] | ||
#![feature(once_cell)] | ||
#![feature(rustc_attrs)] | ||
#![feature(never_type)] | ||
#![recursion_limit = "256"] | ||
|
||
#[macro_use] | ||
extern crate rustc_middle; | ||
#[macro_use] | ||
extern crate tracing; | ||
|
||
use rustc_data_structures::fingerprint::Fingerprint; | ||
use rustc_data_structures::fx::FxHashMap; | ||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; | ||
use rustc_errors::{Diagnostic, Handler, Level}; | ||
use rustc_hir::def_id::CrateNum; | ||
use rustc_index::vec::IndexVec; | ||
use rustc_middle::dep_graph; | ||
use rustc_middle::ich::StableHashingContext; | ||
use rustc_middle::ty::query::{query_keys, query_storage, query_stored, query_values}; | ||
use rustc_middle::ty::query::{Providers, QueryEngine}; | ||
use rustc_middle::ty::TyCtxt; | ||
use rustc_serialize::opaque; | ||
use rustc_span::{Span, DUMMY_SP}; | ||
use std::mem; | ||
|
||
#[macro_use] | ||
mod plumbing; | ||
pub use plumbing::QueryCtxt; | ||
use plumbing::QueryStruct; | ||
use rustc_query_system::query::*; | ||
|
||
mod stats; | ||
pub use self::stats::print_stats; | ||
|
||
mod keys; | ||
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; | ||
|
||
use rustc_middle::ty::query::on_disk_cache; | ||
|
||
mod profiling_support; | ||
pub use self::profiling_support::alloc_self_profile_query_strings; | ||
|
||
rustc_query_append! { [define_queries!][<'tcx>] } | ||
|
||
impl<'tcx> Queries<'tcx> { | ||
// Force codegen in the dyn-trait transformation in this crate. | ||
pub fn as_dyn(&'tcx self) -> &'tcx dyn QueryEngine<'tcx> { | ||
self | ||
} | ||
} |
Oops, something went wrong.