-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Rename DepKindStruct to DepKindVTable
#151577
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
Conversation
|
I was also planning some other related changes to this code (e.g. pulling more code out of macros), but I decided to stick with just the rename for this PR. |
|
i really like this renaming prs in query system, it always was a mystery to me, good opportunity to know more about it feel free to assign those to me, when it's not something very specific r? me @bors r+ rollup |
Rename `DepKindStruct` to `DepKindVTable` This type is used by dependency-tracking code in the query system, for looking up function pointers and other metadata associated with a particular `DepKind`. Calling it “struct” is not particularly helpful, whereas calling it a “vtable” at least gives some basic intuition for what it is and how it is used. Some associated identifiers have also drifted a bit over time, and this PR adjusts those as well. There should be no change to compiler behaviour. r? nnethercote (or compiler)
Rename `DepKindStruct` to `DepKindVTable` This type is used by dependency-tracking code in the query system, for looking up function pointers and other metadata associated with a particular `DepKind`. Calling it “struct” is not particularly helpful, whereas calling it a “vtable” at least gives some basic intuition for what it is and how it is used. Some associated identifiers have also drifted a bit over time, and this PR adjusts those as well. There should be no change to compiler behaviour. r? nnethercote (or compiler)
Rename `DepKindStruct` to `DepKindVTable` This type is used by dependency-tracking code in the query system, for looking up function pointers and other metadata associated with a particular `DepKind`. Calling it “struct” is not particularly helpful, whereas calling it a “vtable” at least gives some basic intuition for what it is and how it is used. Some associated identifiers have also drifted a bit over time, and this PR adjusts those as well. There should be no change to compiler behaviour. r? nnethercote (or compiler)
Rollup of 8 pull requests Successful merges: - #145393 (Add codegen test for removing trailing zeroes from `NonZero`) - #149869 (std: avoid tearing `dbg!` prints) - #150065 (add CSE optimization tests for iterating over slice) - #150842 (Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7) - #151244 (Refine dummy_span.rs test) - #151505 (Various refactors to the proc_macro bridge) - #151560 (relnotes: fix 1.93's `as_mut_array` methods) - #151577 (Rename `DepKindStruct` to `DepKindVTable`)
Rename `DepKindStruct` to `DepKindVTable` This type is used by dependency-tracking code in the query system, for looking up function pointers and other metadata associated with a particular `DepKind`. Calling it “struct” is not particularly helpful, whereas calling it a “vtable” at least gives some basic intuition for what it is and how it is used. Some associated identifiers have also drifted a bit over time, and this PR adjusts those as well. There should be no change to compiler behaviour. r? nnethercote (or compiler)
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.
Yeah, this is good. Thanks for doing it.
…uwer Rollup of 11 pull requests Successful merges: - #145393 (Add codegen test for removing trailing zeroes from `NonZero`) - #148764 (ptr_aligment_type: add more APIs) - #149869 (std: avoid tearing `dbg!` prints) - #150065 (add CSE optimization tests for iterating over slice) - #150842 (Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7) - #151505 (Various refactors to the proc_macro bridge) - #151560 (relnotes: fix 1.93's `as_mut_array` methods) - #151611 (Improve is_ascii performance on x86_64 with explicit SSE2 intrinsics) - #151317 (x86 soft-float feature: mark it as forbidden rather than unstable) - #151577 (Rename `DepKindStruct` to `DepKindVTable`) - #151620 (Fix 'the the' typo in library/core/src/array/iter.rs)
Rollup of 10 pull requests Successful merges: - #145393 (Add codegen test for removing trailing zeroes from `NonZero`) - #148764 (ptr_aligment_type: add more APIs) - #149869 (std: avoid tearing `dbg!` prints) - #150065 (add CSE optimization tests for iterating over slice) - #150842 (Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7) - #151505 (Various refactors to the proc_macro bridge) - #151560 (relnotes: fix 1.93's `as_mut_array` methods) - #151317 (x86 soft-float feature: mark it as forbidden rather than unstable) - #151577 (Rename `DepKindStruct` to `DepKindVTable`) - #151620 (Fix 'the the' typo in library/core/src/array/iter.rs)
Rollup merge of #151577 - Zalathar:dep-kind-vtable, r=Kivooeo Rename `DepKindStruct` to `DepKindVTable` This type is used by dependency-tracking code in the query system, for looking up function pointers and other metadata associated with a particular `DepKind`. Calling it “struct” is not particularly helpful, whereas calling it a “vtable” at least gives some basic intuition for what it is and how it is used. Some associated identifiers have also drifted a bit over time, and this PR adjusts those as well. There should be no change to compiler behaviour. r? nnethercote (or compiler)
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145393 (Add codegen test for removing trailing zeroes from `NonZero`) - rust-lang/rust#148764 (ptr_aligment_type: add more APIs) - rust-lang/rust#149869 (std: avoid tearing `dbg!` prints) - rust-lang/rust#150065 (add CSE optimization tests for iterating over slice) - rust-lang/rust#150842 (Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7) - rust-lang/rust#151505 (Various refactors to the proc_macro bridge) - rust-lang/rust#151560 (relnotes: fix 1.93's `as_mut_array` methods) - rust-lang/rust#151317 (x86 soft-float feature: mark it as forbidden rather than unstable) - rust-lang/rust#151577 (Rename `DepKindStruct` to `DepKindVTable`) - rust-lang/rust#151620 (Fix 'the the' typo in library/core/src/array/iter.rs)
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145393 (Add codegen test for removing trailing zeroes from `NonZero`) - rust-lang/rust#148764 (ptr_aligment_type: add more APIs) - rust-lang/rust#149869 (std: avoid tearing `dbg!` prints) - rust-lang/rust#150065 (add CSE optimization tests for iterating over slice) - rust-lang/rust#150842 (Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7) - rust-lang/rust#151505 (Various refactors to the proc_macro bridge) - rust-lang/rust#151560 (relnotes: fix 1.93's `as_mut_array` methods) - rust-lang/rust#151317 (x86 soft-float feature: mark it as forbidden rather than unstable) - rust-lang/rust#151577 (Rename `DepKindStruct` to `DepKindVTable`) - rust-lang/rust#151620 (Fix 'the the' typo in library/core/src/array/iter.rs)
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)
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)
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)
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 merge of #151666 - Zalathar:query-vtable, r=Kivooeo compiler: Rename several types/traits for per-query vtables - Follow-up to #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)
|
I would prefer these renaming PRs to be batched before merging into main. |
I'm not sure what you mean by this. All of my recent query-system rename PRs have been logically distinct. If I had combined them, they would be harder to review, they would be more prone to conflict and harder to rebase, and none of them would have landed yet. |
|
These PRs break other query system PRs. Merging them too rapidly breaks other PRs rapidly too, which is quite distracting. |
The general process is that people work on their own PRs without concern about conflicts with other PRs (with rare exceptions), because a rebase is usually a trivial 5 minute task, especially over renaming changes. |
|
as a reviewer im very much prefer the current approach too |
|
Well I get a notification whenever (AFAIK) first PR conflict with main happens. As who implements those PRs I value tracking PR conflicts because those could mean I have to redo major parts of my code. If I wouldn't handle these then I might have to waste reviewer's precious time by having irrelevant changes stick. AFAIK query system got a single overwhelmed reviewer, so I would really like to track those conflicts. Just a suggestion. |
This type is used by dependency-tracking code in the query system, for looking up function pointers and other metadata associated with a particular
DepKind.Calling it “struct” is not particularly helpful, whereas calling it a “vtable” at least gives some basic intuition for what it is and how it is used.
Some associated identifiers have also drifted a bit over time, and this PR adjusts those as well.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)