(Closes #3328) fixes duplicated nodes in definition use chains#3353
(Closes #3328) fixes duplicated nodes in definition use chains#3353LonelyCat124 wants to merge 4 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3353 +/- ##
=======================================
Coverage 99.95% 99.95%
=======================================
Files 384 384
Lines 54271 54275 +4
=======================================
+ Hits 54249 54253 +4
Misses 22 22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This reminds me I wanted to do type hints for this file so I'll check that before this is ready for review. |
|
@arporter @sergisiso Ready for a review, once this is in I might look at martin's PR and try to extend that to also support improved start_point/stop_point logic. |
sergisiso
left a comment
There was a problem hiding this comment.
Looks good @LonelyCat124, only a couple of very minor comments.
| stop_point=None, | ||
| reference: Reference, | ||
| control_flow_region: Iterable[Node] = (), | ||
| start_point: int = None, |
There was a problem hiding this comment.
Optional[int] if these 2 can be None
| # We will only ever reach a reference once, so | ||
| # we don't need to check uniqueness. | ||
| self._reaches.append(ref) | ||
| # We need to check for uniqueness |
There was a problem hiding this comment.
Can you expand this a bit, it was not clear to me at first look. Maybe: "# Add node to the _reaches list if it is not already there (note that a "not in" check is not enough because the references are equal, but this needs identity uniqueness)"
No description provided.