-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flow analysis: add infrastructure for tracking SSA nodes.
This is the first step in a sequence of CLs to support type promotion based on local boolean variables (dart-lang/language#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: dart-lang/language#1274 Change-Id: Id729390655c9371cba264816b418f6c0463e1758 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176180 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Paul Berry <[email protected]>
- Loading branch information
1 parent
222f3dc
commit 1eb147d
Showing
4 changed files
with
582 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.