dillon1000/react

Commit

Prune scopes wo own outputs

#1507 Ensured that declarations of reactive scopes were propagated to parent 
reactive scopes as necessary to ensure that those declarations would be 
available at the appropriate block scope. This meant that some scopes that were 
previously pruned would no longer be pruned. Specifically, an outer scope wo any 
declarations, but which contained a nested scope _with_ a propagated 
declaration, would now end up with non-empty declarations and not be pruned. 

This PR changes to track the declaring scope of each declaration, so we still 
prune scopes that don't have any of their own declarations.
Browse files
Changed paths8 files
First-parent comparison
M compiler/forget/src/HIR/HIR.ts ModifiedM compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedM compiler/forget/src/ReactiveScopes/PrintReactiveFunction.ts ModifiedM compiler/forget/src/ReactiveScopes/PromoteUsedTemporaries.ts ModifiedM compiler/forget/src/ReactiveScopes/PropagateScopeDependencies.ts ModifiedM compiler/forget/src/ReactiveScopes/PruneNonReactiveDependencies.ts ModifiedM compiler/forget/src/ReactiveScopes/PruneUnusedScopes.ts ModifiedM compiler/forget/src/__tests__/fixtures/compiler/dependencies.expect.md Modified
Patch

Files changed

Rendering syntax-highlighted changes…