-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
compiler: Rename several types/traits for per-query vtables #151666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
As a follow-up PR, I might try getting rid of That would sidestep the need to name and document the trait. EDIT: This turns out to be a bit tricky; I would want to land a few other simplifications before trying again. |
4f1952f to
b0532b2
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b0532b2 to
2c9175d
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks!
|
@bors r+ rollup |
compiler: Rename several types/traits for per-query vtables - Follow-up to rust-lang#151577 --- This is another round of renaming for some subtle types and traits used by the query system, to hopefully make them easier to understand. Key renames: - struct `DynamicQuery` → `QueryVTable` (the actual vtable-like structure) - struct `DynamicQueries` → `PerQueryVTables` (holds a vtable for each query) - trait `QueryConfig` → `QueryDispatcher` - (used by generic functions in `rustc_query_system` to interact with query vtables) - struct `DynamicConfig` → `SemiDynamicQueryDispatcher` - (implements `QueryDispatcher` by combining a vtable with some compile-time boolean flags for improved perf) - trait `QueryConfigRestored` → `UnerasedQueryDispatcher` - (provides a `QueryDispatcher` while also remembering the query's unerased value type; allows some per-query code to be moved out of macros and into generic functions) This was trickier than `DepKindVTable`, because there are more types and traits involved, and it's harder to come up with distinctive and useful names for all of them. There should be no change to compiler behaviour. r? Kivooeo (or compiler)
Rollup of 6 pull requests Successful merges: - #151751 (`rust-analyzer` subtree update) - #150893 (offload: move (un)register lib into global_ctors) - #151013 (Add some clarifications and fixes for fmt syntax) - #151666 (compiler: Rename several types/traits for per-query vtables) - #151738 (Add `extern crate core` to diagnostic tests) - #151759 (Update `browser-ui-test` version to `0.23.3`)
DepKindStructtoDepKindVTable#151577This is another round of renaming for some subtle types and traits used by the query system, to hopefully make them easier to understand.
Key renames:
DynamicQuery→QueryVTable(the actual vtable-like structure)DynamicQueries→PerQueryVTables(holds a vtable for each query)QueryConfig→QueryDispatcherrustc_query_systemto interact with query vtables)DynamicConfig→SemiDynamicQueryDispatcherQueryDispatcherby combining a vtable with some compile-time boolean flags for improved perf)QueryConfigRestored→UnerasedQueryDispatcherQueryDispatcherwhile also remembering the query's unerased value type; allows some per-query code to be moved out of macros and into generic functions)This was trickier than
DepKindVTable, because there are more types and traits involved, and it's harder to come up with distinctive and useful names for all of them.There should be no change to compiler behaviour.
r? Kivooeo (or compiler)