mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
f50a2312e15829c2c3ca6bc6b6e3136258dd1426
Summary: This adds a debugging mode to the compiler that simply adds a `|| true` to the guard on all memoization blocks, which results in the generated code never using memoized values and always recomputing them. This is designed as a validation tool for the compiler's correctness--every program *should* behave exactly the same with this option enabled as it would with it disabled, and so any difference in behavior should be investigated as either a compiler bug or a pipeline issue.
(We add `|| true` rather than dropping the conditional block entirely because we still want to exercise the guard tests, in case the guards themselves are the source of an error, like reading a property from undefined in a guard.)
ghstack-source-id: 955a47ec16
Pull Request resolved: https://github.com/facebook/react/pull/29655
DiffTrain build for commit https://github.com/facebook/react/commit/8b01a2e0bf17adc6bb7b81d1d0063c7efe9ea8b1.
react-fbsource-import
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%