dillon1000/react

Commit

Use sequence terminal, fix most remaining order-of-evaluation bugs

Changes the lowering for sequence expressions to use the new terminal. When 
converting to a ReactiveFunction, we convert these terminals into 
ReactiveSequenceValues, which nests the instructions and preserves order of 
evaluation in the output. 

The only catch is constant propagation — constant propagation breaks 
order-of-evaluation because it can effectively copy the final value of a 
sequence elsewhere, leaving the original sequence in the wrong place. I'll 
address that in a follow-up.
Browse files
Changed paths9 files
First-parent comparison
M compiler/forget/src/HIR/BuildHIR.ts ModifiedM compiler/forget/src/HIR/MergeConsecutiveBlocks.ts ModifiedM compiler/forget/src/ReactiveScopes/BuildReactiveFunction.ts ModifiedM compiler/forget/src/__tests__/fixtures/compiler/_bug.computed-call-evaluation-order.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/jsx-tag-evaluation-order-non-global.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/jsx-tag-evaluation-order.expect.md ModifiedR compiler/forget/src/__tests__/fixtures/compiler/_bug.property-call-evaluation-order.expect.md →compiler/forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/_bug.property-call-evaluation-order.js →compiler/forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.js RenamedM compiler/forget/src/__tests__/fixtures/compiler/sequence-expression.expect.md Modified
Patch

Files changed

Rendering syntax-highlighted changes…