dillon1000/react

Commit

Add support for DoWhile statements

Adds support for DoWhileStatements. It's pretty similar to how we handle While, 
except in the case where a test block is unreachable (for example, an early 
unconditional `break` within the loop body). In this scenario we eliminate the 
terminal altogether and replace it with a goto to the loop block.
Browse files
Changed paths26 files
First-parent comparison
M compiler/forget/src/HIR/BuildHIR.ts ModifiedM 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/Optimization/ConstantPropagation.ts ModifiedM compiler/forget/src/ReactiveScopes/BuildReactiveFunction.ts ModifiedM compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedM compiler/forget/src/ReactiveScopes/FlattenReactiveLoops.ts ModifiedM compiler/forget/src/ReactiveScopes/PropagateScopeDependencies.ts ModifiedM compiler/forget/src/ReactiveScopes/visitors.ts ModifiedM compiler/forget/src/Utils/VisualizeHIRMermaid.ts ModifiedA compiler/forget/src/__tests__/fixtures/hir/do-while-break.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-break.js AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-compound-test.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-compound-test.js AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-conditional-break.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-conditional-break.js AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-continue.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-continue.js AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-early-unconditional-break.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-early-unconditional-break.js AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-simple.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/do-while-simple.js AddedM compiler/forget/src/__tests__/fixtures/hir/error.todo-kitchensink.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/error.todo-kitchensink.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…