-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
hygiene: Rewrite apply_mark_internal
to be more understandable
#139083
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
r? compiler (cjgillot is inactive) |
hygiene: Rewrite `apply_mark_internal` to be more understandable The previous implementation allocated new `SyntaxContext`s in the inverted order, and it was generally very hard to understand why its result matches what the `opaque` and `opaque_and_semitransparent` field docs promise. ```rust /// This context, but with all transparent and semi-transparent expansions filtered away. opaque: SyntaxContext, /// This context, but with all transparent expansions filtered away. opaque_and_semitransparent: SyntaxContext, ``` It also couldn't be easily reused for the case where the context id is pre-reserved like in rust-lang#129827. The new implementation tries to follow the docs in a more straightforward way. I did the transformation in small steps, so it indeed matches the old implementation, not just the docs. So I suggest reading only the new version.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (037210a): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -1.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 777.292s -> 777.64s (0.04%) |
@bors rollup=maybe |
This was included into #129827. |
@bors r+ |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 7bfd952 (parent) -> 10a76d6 (this PR) Test differencesShow 8 test diffsAdditionally, 8 doctest diffs were found. These are ignored, as they are noisy. Job group index Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (10a76d6): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.473s -> 776.145s (-0.04%) |
The previous implementation allocated new
SyntaxContext
s in the inverted order, and it was generally very hard to understand why its result matches what theopaque
andopaque_and_semitransparent
field docs promise.It also couldn't be easily reused for the case where the context id is pre-reserved like in #129827.
The new implementation tries to follow the docs in a more straightforward way.
I did the transformation in small steps, so it indeed matches the old implementation, not just the docs.
So I suggest reading only the new version.