dillon1000/react

Commit

Stop shrinking HIR to preserve fallthrough nodes

This is part of a stack to fix some edge cases in inlining of useMemo closures. 
In this first step, I'm disabling `shrink()` in order to retain more information 
about the data flow. For example, 

``` 

label: if (cond) { 

break label; 

} 

return foo; 

``` 

Would previously have shrunk away the if body, making the IfTerminal.consequent 
point directly to the fallthrough block (w the return). Now we retain a separate 
block.
Browse files
Changed paths11 files
First-parent comparison
M compiler/forget/src/HIR/HIRBuilder.ts ModifiedM compiler/forget/src/HIR/index.ts ModifiedM compiler/forget/src/Inference/InlineUseMemo.ts ModifiedM compiler/forget/src/Optimization/ConstantPropagation.ts ModifiedM compiler/forget/src/ReactiveScopes/BuildReactiveFunction.ts ModifiedM compiler/forget/src/__tests__/fixtures/compiler/complex-while.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/dominator.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/reverse-postorder.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/rules-of-hooks-c1e8c7f4c191.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/switch-non-final-default.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/switch-with-fallthrough.expect.md Modified
Patch

Files changed

Rendering syntax-highlighted changes…