Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

migrate parameter_assignments from traverseNodesInDFS() #3715

Merged
merged 5 commits into from
Oct 4, 2022

Conversation

pq
Copy link
Contributor

@pq pq commented Sep 22, 2022

BEFORE

image

AFTER

image

@bwilkerson: it's still a bit awkward but on the right track I think. Comments welcome!

@coveralls
Copy link

coveralls commented Sep 22, 2022

Coverage Status

Coverage increased (+0.02%) to 95.779% when pulling 49ea271 on parameter_assignments_perf into 648ff0a on main.

@pq pq marked this pull request as ready for review September 22, 2022 22:37
Copy link
Contributor

@bwilkerson bwilkerson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, but we still visit the function body once for every parameter. Given how expensive visitors are, consider rewriting the logic to something like:

for each parameter,
  if the parameter should be checked, add it and information about it to a map
if there are any parameters to check
  visit the body looking for assignments to any of those parameters

@pq
Copy link
Contributor Author

pq commented Oct 4, 2022

@bwilkerson: comments addressed (thank you!!!) would you mind taking a fresh look?

@pq pq merged commit 9894b8d into main Oct 4, 2022
@pq pq deleted the parameter_assignments_perf branch October 4, 2022 21:04
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Aug 23, 2023
…hive/linter#3715)

* migrate from `traverseNodesInDFS()`

* imports

* fmt

* typo

* review feedback
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants