dillon1000/react

Commit

Fix for mutable ranges ended early with interleaving

Fixes T180504437. In MergeOverlappingReactiveScopes we track the active scopes 
and mark them as "ended" when reaching the first instruction after their mutable 
range. However, in cases of interleaving that will be merged, we could 
previously mark a scope as complete when it's original range was completed, even 
though the range would get extended post-merge. The fix here detects 
interleaving earlier, and eagerly updates the mutable ranges of the merged 
scopes to ensure that neither is "ended" earlier than it should. 

The repro here fails without this change.
Browse files
Changed paths3 files
First-parent comparison
M compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/MergeOverlappingReactiveScopes.ts ModifiedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/repro-instruction-part-of-already-closed-scope.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/repro-instruction-part-of-already-closed-scope.js Added
Patch

Files changed

Rendering syntax-highlighted changes…