mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
d1d6310f25cd74ce9f79ab22ec947fec67eecec5
The previous implementation used IdentifierId, but since this pass operates after LeaveSSA the identifier ids are no longer distinct for different SSA instances. Instead we use the Identifier instance, which preserves SSA information (even ever LeaveSSA) and allows distinguishing between variables whose value always changes vs variables that may be reassigned such that they don't always invalidate. In the future when we use HIR everywhere, this pass should use the HIR CFG to understand that phi nodes whose operands all will always invalidate can also be treated as always invalidating. ## Test Plan Synced to www, 91 files have output changes (https://fburl.com/everpaste/3e3hjpjs). I spot checked these and confirmed that they are all from cases where there was already missing memoization of earlier values, where we now can prune later reactive scopes that depend on the un-memoized values.
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%