1eb147d8af
This is the first step in a sequence of CLs to support type promotion based on local boolean variables (https://github.com/dart-lang/language/issues/1274). To do this, we will need a way to reliably tell whether a variable's value has changed from one point in program execution to another, and to associate additional information with a particular value of a variable. We'll accomplish both of these tasks by associating each variable with a pointer to an "SSA node". This pointer is updated to point to a fresh node whenever the variable is written to, or two different possible values come together at a control flow join. Note that when a variable is write captured, it becomes impossible to track when/if its value might change Previously we tracked this using a `writeCaptured` boolean; now we track it by setting the SSA node pointer to `null`. This CL just lays the groundwork infrastructure and unit tests it; there is no user-visible change. Bug: https://github.com/dart-lang/language/issues/1274 Change-Id: Id729390655c9371cba264816b418f6c0463e1758 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176180 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>