dillon1000/react

Commit

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.
Browse files
Changed paths1 file
First-parent comparison
M compiler/forget/src/Optimization/ConstantPropagation.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…