dillon1000/react
Commit
Browse files Repro for missing dep with while/if using externally declared "index" variable
What happens here is that the phi node for `i` has its mutable range set to start at 0, because it has a back edge and we haven't initialized the mutable ranges of all its operands yet when we iterate the operands and set range.start = min(start of operand starts). Then the corresponding scope has its range set to start at 0 too. When PropagateScopeDeps runs it sees that `b` is from instruction 1, which is after the start of the scope (0), so it thinks `b` isn't a valid dependency. The fix is in InferMutableRanges, where we need to make sure that phis ignore their operand's ranges until those ranges are initialized.
Changed paths3 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug-repro-missing-dependency-if-within-while.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug-repro-missing-dependency-if-within-while.js AddedM compiler/packages/snap/src/SproutTodoFilter.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…