mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update base for Update on "[compiler] ReactiveIR: add Let/Assign/Branch/Join nodes"
Further exploration of the new ReactiveIR sea-of-nodes approach, adding Let/Assign/Branch/Join nodes. See the doc for more about how these work. Notable things in the implementation is that this ensures that reads and writes of variables are always ordered correctly: * Reads after writes: reads have a control dependency that ensures they come after the write they should be reading * Writes after reads: subsequent writes come after any reads of previous writes, or if no reads, after the previous write In both cases, the ordering only applies within consecutive control flow. The first read or write of a variable within a given branch of control flow will only take a dependency on the block's entry node (the default control). Not implemented yet is the logic to ensure that if there is a read within a branch, that we order the branch itself after the value that would be read (and similarly for writes), and also to construct phis for conditionally reassigned values and set the Join as the last write. [ghstack-poisoned]
This commit is contained in: