-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
[compiler] Renames and no-op refactor for next PR #31036
Merged
Merged
+95
−108
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This was referenced Sep 23, 2024
facebook-github-bot
added
CLA Signed
React Core Team
Opened by a member of the React Core Team
labels
Sep 23, 2024
mofeiZ
changed the title
[compiler][wip] Refactor HoistablePropertyLoads
[compiler][wip] Renames and no-op refactor for next PR
Sep 25, 2024
mofeiZ
changed the title
[compiler][wip] Renames and no-op refactor for next PR
[compiler] Renames and no-op refactor for #31037
Sep 25, 2024
mofeiZ
commented
Sep 26, 2024
result.add(curr); | ||
curr = curr.parent; | ||
} | ||
result.add(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trust that all previous property loads were added correctly. If a property load chain ever spans multiple blocks, this is technically the correct behavior
mofeiZ
changed the title
[compiler] Renames and no-op refactor for #31037
[compiler] Renames and no-op refactor for next PR
Sep 26, 2024
josephsavona
approved these changes
Sep 27, 2024
mofeiZ
added a commit
that referenced
this pull request
Sep 30, 2024
Rename for clarity: - `CollectHoistablePropertyLoads:Tree` -> `CollectHoistablePropertyLoads:PropertyPathRegistry` - `getPropertyLoadNode` -> `getOrCreateProperty` - `getOrCreateRoot` -> `getOrCreateIdentifier` - `PropertyLoadNode` -> `PropertyPathNode` Refactor to CFG joining logic for `CollectHoistablePropertyLoads`. We now write to the same set of inferredNonNullObjects when traversing from entry and exit blocks. This is more correct, as non-nulls inferred from a forward traversal should be included when computing the backward traversal (and vice versa). This fix is needed by an edge case in #31036 Added invariant into fixed-point iteration to terminate (instead of infinite looping). ghstack-source-id: 1e8eb2d566b649ede93de9a9c13dad09b96416a5 Pull Request resolved: #31036
This was referenced Oct 1, 2024
This was referenced Oct 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Rename for clarity:
CollectHoistablePropertyLoads:Tree
->CollectHoistablePropertyLoads:PropertyPathRegistry
getPropertyLoadNode
->getOrCreateProperty
getOrCreateRoot
->getOrCreateIdentifier
PropertyLoadNode
->PropertyPathNode
Refactor to CFG joining logic for
CollectHoistablePropertyLoads
. We now write to the same set of inferredNonNullObjects when traversing from entry and exit blocks. This is more correct, as non-nulls inferred from a forward traversal should be included when computing the backward traversal (and vice versa). This fix is needed by an edge case in #31036Added invariant into fixed-point iteration to terminate (instead of infinite looping).