dillon1000/react

Commit

LabelTerminal scaffolding

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.
Browse files
Changed paths6 files
First-parent comparison
M compiler/forget/src/HIR/HIR.ts ModifiedM compiler/forget/src/HIR/HIRBuilder.ts ModifiedM compiler/forget/src/HIR/PrintHIR.ts ModifiedM compiler/forget/src/HIR/visitors.ts ModifiedM compiler/forget/src/ReactiveScopes/BuildReactiveFunction.ts ModifiedM compiler/forget/src/Utils/VisualizeHIRMermaid.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…