dillon1000/react
Commit
Browse files [hir] Update mutable range of operands during LeaveSSA
It's not enough to only update the mutable range of the canonical id created instead of the phi but we need to update the mutable range of each of the operands of the phi as well to account for the fact that the phi could've been mutated later. The operands are updated only if the phi is mutated later. Otherwise these operands can be cached in their blocks. Fixes https://github.com/facebook/react-forget/issues/978
Changed paths6 files
First-parent comparisoncompiler/forget/src/SSA/LeaveSSA.ts ModifiedA compiler/forget/src/__tests__/fixtures/hir/obj-literal-cached-in-if-else.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/obj-literal-cached-in-if-else.js AddedA compiler/forget/src/__tests__/fixtures/hir/obj-literal-mutated-after-if-else.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/obj-literal-mutated-after-if-else.js AddedM compiler/forget/src/__tests__/fixtures/hir/obj-mutated-after-if-else.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…