forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flow analysis: Track expression variables separately from promotion i…
…nfo. Previously, we used a single class hierarchy, ExpressionInfo, to store all the information that flow analysis needs to know about a variable, including: 1. What is known about the program state if the expression evaluates to true/false 2. Whether the expression is a `null` literal 3. Whether the expression is a reference to a variable. However, in order to address dart-lang/language#1274 (Infer non-nullability from local boolean variables), we'll need flutter#3 to be tracked orthogonally from flutter#1, so that when a local boolean is referred to later, we can track information of type flutter#1 and flutter#3 simultaneously. However, it makes sense to keep flutter#1 and flutter#2 in the same data structure, because future work is planned to represent them in a more uniform way, as part of addressing dart-lang/language#1224 (Using `if (foo?.bar == somethingNotNull)` should promote `foo`). Change-Id: I432f6e2e80543bb1d565b49403180c520eef66a5 Bug: dart-lang/language#1274 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175008 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
- Loading branch information
1 parent
81c3e8c
commit fd2a6c6
Showing
1 changed file
with
67 additions
and
59 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