-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make ast MutVisitor
have the same method name and style as Visitor
#127524
Conversation
Some changes occurred in src/tools/clippy cc @rust-lang/clippy These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
That would be wonderful! |
e8d7873
to
9844d13
Compare
7f18720
to
e89df61
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Make ast `MutVisitor` have the same method name and style as `Visitor` It doesn't map 100% because some `MutVisitor` methods can filter or even expand to multiple items, but consistency seems nicer. The last commit showcases how similar they are by changing ast validation to a `MutVisitor` (without actually doing any mutation yet). My plan is to replace all nodes that support it with error nodes if validation failed on them. This allows ast lowering to just assume things are error or valid, and avoids having to redo some checks, delaying bugs or checking the global error counter. tracking issue: rust-lang#127615
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (abb4640): comparison URL. Overall result: ❌ regressions - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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: 705.609s -> 703.847s (-0.25%) |
Instruction count changes are unsurprising considering 46c6db8, but it looks like cycles are unaffected. I'll do some local profiling |
unsure what's the exact cause. Should probably benchmark without the last few commits |
I'm skeptical about these parts of the motivation
because we should probably not introduce new mutable visitors, which is a part of the larger discussion in https://rust-lang.zulipchat.com/#narrow/stream/315146-t-compiler.2Fetc.2Fincremental-hir/topic/Outlining.20modules.20from.20AST. But having consistent naming is good in any case. |
The PR does many changes of different kinds in addition to the visitor renamings, they should probably be all landed and reviewed separately. |
…ions, r=petrochenkov Various ast validation simplifications Changes pulled out of rust-lang#127524 These are needed to make ast validation a mutable visitor, as we can't keep immutable references to the AST around in that case. But I think they are simplifying things in general and can stand on their own
This comment has been minimized.
This comment has been minimized.
Make ast `MutVisitor` have the same method name and style as `Visitor` It doesn't map 100% because some `MutVisitor` methods can filter or even expand to multiple items, but consistency seems nicer. tracking issue: rust-lang#127615
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (e58bcf0): 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 -2.7%)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.
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: 771.169s -> 771.842s (0.09%) |
@bors r+ |
…nkov Make ast `MutVisitor` have the same method name and style as `Visitor` It doesn't map 100% because some `MutVisitor` methods can filter or even expand to multiple items, but consistency seems nicer. tracking issue: rust-lang#127615
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d24930c): 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)Results (primary 3.3%)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.
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: 769.585s -> 771.472s (0.25%) |
…nkov Make ast `MutVisitor` have the same method name and style as `Visitor` It doesn't map 100% because some `MutVisitor` methods can filter or even expand to multiple items, but consistency seems nicer. tracking issue: rust-lang#127615
It doesn't map 100% because some
MutVisitor
methods can filter or even expand to multiple items, but consistency seems nicer.tracking issue: #127615