mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
3744930728bfe6a08c382b25834e258bc44bc07f
Not to get ahead of myself (sorry i had to), but i think this is the last order of evaluation bug. At least it's the last one we know of[1]. Per the previous PR, the issue is that constant propagation can copy the last value of a sequence expression to where the sequence is used, leaving the original sequence expression out of order after other instructions are moved around. We fix that here by explicitly skipping constant propagation for the last value of a sequence block. [1] There are some places where we _would_ have evaluation order bugs if we allowed arbitrary expressions, but we explicitly limit the expressions we allow in those places. For the curious: switch test case values and destructuring default values.
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%