-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Rollup of 6 pull requests #151208
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
Closed
Closed
Rollup of 6 pull requests #151208
Conversation
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
Support {bool,char,int,uint,float,str} primitive types for feature
`type_info` reflection.
Now that Rc::new_zeroed is stable, remove the cfg(feature = "nightly") branch and the temporary zeroed array on stable. This avoids copying a potentially large [Word; CHUNK_WORDS] into the Rc. Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Provide `const` functions to get around lack of `const Default` for `FxHash*` types. Use default field values in `Resolver` more.
To be consistent with the closely related `cycle_stash` and `cycle_delay_bug`.
Issue rust-lang#124901 was an OOM caused by a query cycle. It was fixed by a complex change in PR rust-lang#138672, but that PR did not add the test case. Let's add it now, because it's the only known reproducer of the OOM.
PR rust-lang#138672 introduced a complex and invasive split of `QueryStackFrame` to avoid a query cycle. This commit reverts that change because there is a much simpler change that fixes the problem, which will be in the next commit.
This changes the error message of `query-cycle-issue-124901.rs`, which doesn't matter much.
…henkov Cache derive proc macro expansion with incremental query This is a revival of rust-lang#129102, originally implemented by @futile. Since it looks like they are not active currently, I'd like to push this work forward. The first commit is squashed and rebased work from the original PR, with author attribution to futile. The rest of the commits are some additional comments that I created mostly for myself to understand what happens here. I also did some cleanups based on Vadim's review comments on the original PR, plus I refactored the TLS access a bit using `scoped_tls`. The biggest issue, as usually, are tests... I tried using `#[rustc_clean(..., loaded_from_disk = "derive_macro_expansion")]`, but the problem is that since this query cannot recover the original key from its hash, and thus its fingerprintstyle is `FingerprintStyle::Opaque`, [this](https://github.com/rust-lang/rust/blob/2fef0a30ae6b2687dfb286cb544d2a542f7e2335/compiler/rustc_incremental/src/persist/dirty_clean.rs#L388) crashes when I try to use `loaded_from_disk`. Any suggestions from someone who actually understands the query system would be welcome 😅 TODO: document the new unstable flag On a no-op change re-check of `octocrab 0.49` (which has a ton of `serde` derive proc macro invocations), this saves ~0.6s out of ~6s (so a ~10% win) on my PC. r? @petrochenkov
Support primitives in type info reflection Tracking issue: rust-lang#146922 `#![feature(type_info)]` This PR supports {`bool`,`char`,`int`,`uint`,`float`,`str`} primitive types for feature `type_info` reflection. r? @oli-obk
simplify words initialization using Rc::new_zeroed Now that Rc::new_zeroed is stable, remove the cfg(feature = "nightly") branch and the temporary zeroed array on stable. This avoids copying a potentially large [Word; CHUNK_WORDS] into the Rc.
Use `default_field_values` more in `Resolver` Extend more ways of building `FxHashSet`, `FxHashMap`, `UnordSet`, `UnordMap` and `DisambiguatorState` in `const` contexts to allow for more fields in `Resolver` to have a default value. `FxIndexSet`/`FxIndexMap` are still outstanding and not const-buildable. r? @petrochenkov
remove lcnr from compiler review rotation Have been feeling somewhat swamped by review and mentoring work and want to focus my review time on involved type system changes. I am very much available to review specific changes, but don't want to be auto-assigned to general compiler changes.
…i-obk Revert `QueryStackFrame` split PR rust-lang#138672 fixed a query cycle OOM reported in rust-lang#124901. The fix involved delaying computation of some query stack frame elements and was very complex. It involved the addition of two new types, the addition of a generic `I` parameter to eleven(!) other types, a `PhantomData` field, and even required an unsafe transmute of a closure. [This comment](rust-lang#124901 (comment)) had suggested a much simpler fix, but it was ignored. The PR also failed to add a test case. This PR adds a test case, reverts the complex fix, applies the simpler fix, and does a few other minor cleanups. r? @oli-obk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-meta
Area: Issues & PRs about the rust-lang/rust repository itself
A-query-system
Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)
rollup
A PR which is a rollup
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
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:
default_field_valuesmore inResolver#151187 (Usedefault_field_valuesmore inResolver)QueryStackFramesplit #151203 (RevertQueryStackFramesplit)r? @ghost
Create a similar rollup