dillon1000/react

Commit

[rhir] small: ReactiveDependency uses Identifier instead of Place

--- 

We never use the `Place` of a ReactiveScopeDependency, except for when we want 
to access its identifier. Later PRs in this stack will convert 
`ReactiveScopeDependency` to property access trees (and traverse over the tree). 
This usually involves merging multiple Dependencies into trees (where each root 
is a unique identifier). We then traverse over each tree to extract its 
dependencies (e.g. unconditional leaves). 

``` 

{place: {loc: 1, identifier: 'props'}, path: ['a', 'b']} 

{place: {loc: 2, identifier: 'props'}, path: ['a']} 

// merges into a single tree root, which should represent a single identifier 

``` 

The `place` of each individual `ReactiveScopeDependency` will be lost during the 
tree traversal, and it doesn't really make sense to recreate them using the 
`Place` attached to the tree root.
Browse files
Changed paths7 files
First-parent comparison
M compiler/forget/src/HIR/HIR.ts ModifiedM compiler/forget/src/Inference/AnalyseFunctions.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 Modified
Patch

Files changed

Rendering syntax-highlighted changes…