Back to Pull RequestsView on GitHub
#35298Open
Complex Review
[compiler][poc] Improve impurity/ref tracking
by josephsavona•Dec 5, 2025
Summary
This PR refactors how React's compiler tracks impure functions (like Date.now()) by changing the 'Impure' effect to signify that the *value* itself is impure, rather than the act of calling it. It enhances data flow analysis to propagate this impurity, but stops propagation when reaching refs, thereby allowing refs to hold impure values.
Changes
+1054 additions-196 deletions
Impact Areas
CompilerStatic AnalysisPerformance Optimizations