dillon1000/react
Commit
Browse files Instruction-specific propagation to account for assignment-as-value
Updates ConstantPropagation so that each instruction is responsible for whether to replace its `.value` with the resolved constant value (if found). Specifically, for `StoreLocal` we don't want to replace the value — we want to keep the assignment — but we do want to propagate the _result_ of the assignment downstream. This more accurately models the semantics of assignment expressions, and helps with subsequent PRs.
Changed paths1 file
First-parent comparisoncompiler/forget/src/Optimization/ConstantPropagation.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…