Closed
Conversation
…ng the buffer on start = end range
These two types fit the pattern because they have no generics.
The `DerefMut` impl for `Providers` was removed in rust-lang#151096.
`tcx` is the usual name for `TyCtxt` parameters.
We compute `key_hash` in `try_execute_query`, so we can just pass the value in.
`execute_job` has a single call site in `try_execute_query`. This commit inlines and removes `execute_job`, but also puts the part that checks feedable results in its own separate function, `check_feedable`, because it's a nicely separate piece of logic. The big win here is that all the code dealing with the `QueryState` is now together in `try_execute_query`: get the lock, do the lookup, drop the lock, create the job guard, and complete the job guard. Previously these steps were split across two functions which I found hard to follow. This commit purely moves code around, there are no other changes.
The previous commit inlined `execute_job` without changing any of its code. This commit does a few tiny follow-up changes.
By removing the ones in `compiler/rustc_middle/src/queries.rs`, and making `compiler/rustc_middle/src/query/modifiers.rs` the single source of truth.
…r=joboet fixed VecDeque::splice() not filling the buffer correctly when resizing the buffer on start = end range This PR fixes rust-lang#151758. The issue came from `Splice::move_tail`, which as joboet pointed out: > The issue is in move_tail, which resizes the buffer, but fails to account for the resulting hole. The problem with reserving more space through `VecDeque`'s `buf.reserve()` is that it doesn't update `VecDeque`'s `head`, which means that this code in `move_tail`: ```rust deque.wrap_copy( deque.to_physical_idx(tail_start), deque.to_physical_idx(new_tail_start), self.tail_len, ); ``` could move over the section of data that `tail_start..tail_start + self.tail_len` of the buffer is supposed to be held at to the incorrect destination since all `.to_physical_idx()` is doing is a wrapping add on the `VecDeque`'s head with the passed in `idx` value. To avoid this I decided to use `VecDeque::reserve` to both allocate more space into the `VecDeque` if necessary and update head appropriately. However, `VecDeque::reserve` internally relies on the `VecDeque`'s `len` field. Earlier in `VecDeque::splice`, it modifies the `VecDeque`'s `len` constructing the drain via `Drain::new` (as it does a `mem::replace` on `deque.len` with the start bound of the passed in `range`). The `VecDeque`'s `len` can also be potentially modified in the earlier `Splice::fill()` call if it does any replacement towards elements within the passed in `range` value for `VecDeque::splice()`. I needed to temporarily restore the `VecDeque`'s `len` to its actual len, so that `VecDeque::reserve` can work properly. Afterward, you can bring back the `VecDeque`'s `len` to what its value was before and fill the gap appropriately with the rest of the `replace_with` content. r? @joboet
Miscellaneous tweaks A hodge-podge of small changes that didn't fit anywhere else. r? @yaahc
…ks, r=cjgillot `try_execute_query` tweaks Details in individual commits. r? @cjgillot
implementation of `-Z min-recursion-limit` impl of rust-lang/compiler-team#969, closes rust-lang#153132 r? lcnr
…Zalathar Avoid duplicated query modifier comments. There is currently some duplication.
Member
Author
|
Rollup of everything. @bors r+ rollup=never p=5 |
Contributor
Contributor
|
PR #153766, which is a member of this rollup, was unapproved. This rollup was thus unapproved. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
try_execute_querytweaks #153766 (try_execute_querytweaks)-Z min-recursion-limit#153188 (implementation of-Z min-recursion-limit)r? @ghost
Create a similar rollup