Overhaul rustc_middle::query - #161433
Conversation
Because `ActiveKeyStatus` wraps `QueryJob`, and `QueryState` is a collection of `ActiveKeyStatus`es.
Because cycles are stored within `QueryWaiter`. Also, rename `Cycle` as `QueryCycle`, to be less generic and match most of the other nearby types.
|
|
This comment has been minimized.
This comment has been minimized.
It gains three types from `plumbing.rs` that define the high level query system structures.
372e3b5 to
d194c82
Compare
This comment has been minimized.
This comment has been minimized.
Because it's a clearer name. Also move some call-related stuff from `plumbing.rs` to `calls.rs`.
At this point all `plumbing.rs` contains is the `define_callbacks!` macro. Rename that macro as `define_query_api!` because it defines a lot more than just callbacks. And also rename the file to match.
From `mod.rs` to `queries.rs`, the one file that uses it. This leaves `mod.rs` containing only `use` and `mod` items.
d194c82 to
40e321a
Compare
|
Looks good, thanks. @bors r+ |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Overhaul `rustc_middle::query`
…uwer Rollup of 7 pull requests Successful merges: - #161433 (Overhaul `rustc_middle::query`) - #158370 (rewrite never type documentation) - #160354 (update `ambiguous_glob_imported_trait` lint explanation and example.) - #161447 (Construct paramenvs from an iterator) - #161707 (pattern_type: make print format match the current syntax) - #161773 (Update WASI targets to wasi-sdk-34) - #161807 (bootstrap: skip StdarchVerify when remote testing is enabled)
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (370ae5b): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (primary 2.1%, secondary 13.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 476.994s -> 476.802s (-0.04%) |
Rollup merge of #161433 - nnethercote:overhaul-rustc_middle-query, r=Zalathar Overhaul `rustc_middle::query` Overhaul `rustc_middle::query` The file/module structure is a mess. High-level changes: - The vaguely-named mish-mash file `plumbing.rs` is split across multiple other files. - The vaguely-named `inner.rs` gains some additions and becomes `calls.rs`. - `system.rs` is added. - New file `query_api.rs` is added. It contains the big macro, which is renamed from `define_callbacks` to `define_query_api`. This is a follow-up to #160843, which did a similar restructuring of `rustc_query_impl`. r? @Zalathar
…uwer Rollup of 7 pull requests Successful merges: - rust-lang/rust#161433 (Overhaul `rustc_middle::query`) - rust-lang/rust#158370 (rewrite never type documentation) - rust-lang/rust#160354 (update `ambiguous_glob_imported_trait` lint explanation and example.) - rust-lang/rust#161447 (Construct paramenvs from an iterator) - rust-lang/rust#161707 (pattern_type: make print format match the current syntax) - rust-lang/rust#161773 (Update WASI targets to wasi-sdk-34) - rust-lang/rust#161807 (bootstrap: skip StdarchVerify when remote testing is enabled)
…uwer Rollup of 7 pull requests Successful merges: - rust-lang/rust#161433 (Overhaul `rustc_middle::query`) - rust-lang/rust#158370 (rewrite never type documentation) - rust-lang/rust#160354 (update `ambiguous_glob_imported_trait` lint explanation and example.) - rust-lang/rust#161447 (Construct paramenvs from an iterator) - rust-lang/rust#161707 (pattern_type: make print format match the current syntax) - rust-lang/rust#161773 (Update WASI targets to wasi-sdk-34) - rust-lang/rust#161807 (bootstrap: skip StdarchVerify when remote testing is enabled)
Overhaul
rustc_middle::queryThe file/module structure is a mess. High-level changes:
plumbing.rsis split across multiple other files.inner.rsgains some additions and becomescalls.rs.system.rsis added.query_api.rsis added. It contains the big macro, which is renamed fromdefine_callbackstodefine_query_api.This is a follow-up to #160843, which did a similar restructuring of
rustc_query_impl.r? @Zalathar