Files
sdk/pkg/front_end/test
Paul Berry 5eacff3ab8 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 <cstefantsova@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
2024-10-08 05:44:20 +00:00
..
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-08-29 10:06:25 +00:00
2024-09-12 08:47:53 +00:00
2024-06-27 08:54:39 +00:00
2024-07-09 14:50:59 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00
2024-06-27 08:54:39 +00:00