mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
748859a00e
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.