Skip to main content

Module infer_reactive_scope_variables

Module infer_reactive_scope_variables 

Source
Expand description

Infers which variables belong to reactive scopes.

Ported from TypeScript src/ReactiveScopes/InferReactiveScopeVariables.ts.

This is the 1st of 4 passes that determine how to break a function into discrete reactive scopes (independently memoizable units of code):

  1. InferReactiveScopeVariables (this pass, on HIR) determines operands that mutate together and assigns them a unique reactive scope.
  2. AlignReactiveScopesToBlockScopes aligns reactive scopes to block scopes.
  3. MergeOverlappingReactiveScopes ensures scopes do not overlap.
  4. BuildReactiveBlocks groups the statements for each scope.

Functionsยง

infer_reactive_scope_variables
Infer reactive scope variables for a function.