dillon1000/react

Commit

Memoize arrays/objects created with destructuring spread

We were treating Destructuring as if it could never allocate and therefore 
didn't have to be memoized. That's only true if there are no rest spreads 
though. This PR teaches the compiler to treat rest spreads differently for 
scoping and memoization 

purposes, fixing the newly added test case and some existing bugs.
Browse files
Changed paths6 files
First-parent comparison
M compiler/forget/src/HIR/visitors.ts ModifiedM compiler/forget/src/ReactiveScopes/InferReactiveScopeVariables.ts ModifiedM compiler/forget/src/ReactiveScopes/PruneNonEscapingScopes.ts ModifiedM compiler/forget/src/__tests__/fixtures/hir/destructuring.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/escape-analysis-destructured-rest-element.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/unused-object-element-with-rest.expect.md Modified
Patch

Files changed

Rendering syntax-highlighted changes…