mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
b087635e5db273309930ace018c58cf705989b45
Adds a new `LabelTerminal` which will be used to represent LabeledStatements that contain a statement other than a loop. What we do for these cases is basically break the containing block in two, with a goto after the inner statement to the fallthrough. This allows us to model the label, and any `break` to it, in the HIR. However this fails in codegen because we can't find the fallthrough branch — we need a high level terminal that knows about this structure. Hence LabelTerminal. Now, instead of just a continuation block and a goto, we have a structured terminal. The LabelTerminal expresses the block for the labeled statement and the continuation, and we can use this to put it back together when constructing a ReactiveFunction. Note that this PR is just the scaffolding for LabelTerminal, the next PR is the interesting bits.
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%