-
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.
Make type variable constraint generation conventions uniform.
This CL changes the CFE's TypeConstraintGatherer._isNullabilityAwareSubtypeMatch method so that it is responsible for restoring the constraint state if there is no match, making it consistent with the contraint gathering methods in the analyzer and _fe_analyzer_shared. This made it possible to remove much of the calls to state restoring logic that _isNullabilityAwareSubtypeMatch previously had to do after making recursive calls to itself, as well as a lot of state restoring logic in _fe_analyzer_shared. It also made it possible to eliminate _tryNullabilityAwareSubtypeMatch from the CFE (since _isNullabilityAwareSubtypeMatch now has the same behavior). Making this change now should hopefully simplify the remaining steps in sharing type variable constraint generation logic, since it will no longer be necessary to adjust state restoring logic when moving code between the CFE and _fe_analyzer_shared. I also took the liberty of rewriting some of the documentation comments to try to clarify the new conventions. In the process I also discovered several instances of unnecessary state restoring logic in the analyzer; I'll make a separate CL to clean those up (and adjust the analyzer documentation too). Change-Id: If74c8be06f1d53f61d109e5ea2a8526d5cbcd347 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388265 Commit-Queue: Chloe Stefantsova <[email protected]> Reviewed-by: Chloe Stefantsova <[email protected]> Auto-Submit: Paul Berry <[email protected]>
- Loading branch information
1 parent
b4d5272
commit 5eacff3
Showing
3 changed files
with
54 additions
and
91 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,7 @@ awaited | |
awaiting | ||
awaits | ||
b | ||
backing | ||
backlog | ||
backping | ||
backstop | ||
|