dillon1000/react
Commit
Browse files Model assignment as value
This PR subtly changes how we represent assignment expressions in order to accurately model them _as expressions_. Specifically, the result of lowering an assignment is now the temporary created for the assignment's lvalue. This allows us to restore the assignment as a value (expression) during codegen. Note how this fixes a bug and cleans up some output.
Changed paths11 files
First-parent comparisoncompiler/forget/src/HIR/BuildHIR.ts ModifiedM compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedM compiler/forget/src/__tests__/fixtures/compiler/expression-with-assignment-dynamic.expect.md ModifiedR compiler/forget/src/__tests__/fixtures/compiler/_bug.ssa-reassign-in-rval.expect.md →compiler/forget/src/__tests__/fixtures/compiler/ssa-reassign-in-rval.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/_bug.ssa-reassign-in-rval.js →compiler/forget/src/__tests__/fixtures/compiler/ssa-reassign-in-rval.js RenamedM compiler/forget/src/__tests__/fixtures/compiler/ternary-assignment-expression.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-ternary-with-mutation.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-ternary.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-unconditional-ternary-with-mutation.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-unconditional-ternary.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-unconditional-with-mutation.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…