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

migrate avoid_null_checks_in_equality_operators away from traverseNodesInDFS() #3714

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

pq
Copy link
Member

@pq pq commented Sep 22, 2022

Before:

image

After:

image

/cc @bwilkerson @srawlins

@pq pq marked this pull request as draft September 22, 2022 18:39
@github-actions github-actions bot added the linter-set-recommended Affects a rule in the recommended Dart rule set label Sep 22, 2022
@pq pq changed the title migrate away from traverseNodesInDFS() migrate avoid_null_checks_in_equality_operators away from traverseNodesInDFS() Sep 22, 2022
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0005%) to 95.76% when pulling 522899d on avoid_null_checks_in_equality_operators_visit into 648ff0a on main.

@srawlins
Copy link
Member

Pretty cheap already, but I can imagine generated code which may create classes with equality operators with many checks inside. Protos, etc.

@pq
Copy link
Member Author

pq commented Sep 22, 2022

Pretty cheap already, but I can imagine generated code which may create classes with equality operators with many checks inside. Protos, etc.

Exactly. This was the lesson of dart-lang/sdk#58881

@pq pq marked this pull request as ready for review September 22, 2022 21:49
@pq pq merged commit 1de8549 into main Sep 22, 2022
@pq pq deleted the avoid_null_checks_in_equality_operators_visit branch September 22, 2022 21:50
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linter-set-recommended Affects a rule in the recommended Dart rule set type-performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants