dillon1000/react
Commit
Browse files Fix for invalid mutable range in phi with backedge
Fixes the repro added in 947832009997bf9149e88e583c46cc39f6a6136c - previously when computing mutable ranges of phis, we didn't check that all operands had been visited. This meant that a backedge could allow a phi's mutable range to start at 0. Then in PropagateScopeDeps, we might see reject dependencies of a scope since they appeared to start after a scope — only because the scope's start was incorrectly too early. The fix here is to initially set phi.id mutable ranges based on only on operands that are already visited. Then, during/after the fixpoint iteration of InferMutableRanges, we start account for all operands since we know they've been visited at least once and have a real range.
Changed paths5 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/Inference/InferMutableLifetimes.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug-repro-missing-dependency-if-within-while.expect.md ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-in-statement-continue.expect.md ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-in-statement-continue.js ModifiedM compiler/packages/snap/src/SproutTodoFilter.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…