Conversation
(needs cleanup) - Scopes no longer store a flat list of their dependencies. Instead: - Scope terminals are effectively a `goto` for scope dependency instructions (represented as value blocks that terminate with a `goto scopeBlock` for HIR and a series of ReactiveInstructions for ReactiveIR) - Scopes themselves store `dependencies: Array<Place>`, which refer to temporaries written to by scope dependency instructions Next steps: - new pass to dedupe scope dependency instructions after all dependency and scope pruning passes, effectively 'hoisting' dependencies out - more complex dependencies (unary ops like `Boolean` or `Not`, binary ops like `!==` or logical operators)
Greptile OverviewGreptile SummaryThis PR fundamentally restructures how the React Compiler represents scope dependencies, moving from a flat list stored directly on scopes to a more sophisticated representation using value blocks and instruction sequences. Key Changes
Implementation Quality
The changes enable future work on hoisting and deduplicating scope dependencies, and support more complex dependency patterns (unary/binary operations). Confidence Score: 4/5
Important Files ChangedFile Analysis
|
This file contains hidden or 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
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.
Mirror of facebook/react#32099
Original author: mofeiZ
(needs cleanup)
gotofor scope dependency instructions (represented as value blocks that terminate with agoto scopeBlockfor HIR and a series of ReactiveInstructions for ReactiveIR)dependencies: Array<Place>, which refer to temporaries written to by scope dependency instructionsNext steps:
BooleanorNot, binary ops like!==or logical operators)Stack created with Sapling. Best reviewed with ReviewStack.