dillon1000/react
Commit
Browse files Add `reactive` flag to Place
This is part of a stack for inferring variables which are reactive via *control dependencies* as opposed to a data dependency. In compiler engineering, a statement S2 is control-dependent on statement S1 if S1 is in the post-dominance frontier of S2. Stated more intuitively: if S1 decides whether or not S2 is reached, then S1 is a control dependency of S2. As a start, we add `Place.reactive: boolean` so that individual places can track whether they are reactive or not. This lets us do fine-grained reactivity inference on the control-flow graph, even taking into account different SSA instances of a variable, so that we can say that a particular SSA version of `x` is reactive, while other "versions" of x (due to reassignment) are not.
Changed paths5 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/HIR/MergeConsecutiveBlocks.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/Inference/DropManualMemoization.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…