dart-sdk/pkg/_fe_analyzer_shared
Paul Berry 832ae6722d Flow analysis: add support for relational patterns.
There are two new API methods: `equalityRelationalPattern_end` (for
relational patterns using `==` or `!=`, where some degree of flow
analysis is warranted) and `nonEqualityRelationalPattern_end` (for all
other relational patterns, where all we care about is making sure that
both the "matched" and "unmatched" branches are reachable).

I've moved most of the logic for constant patterns into
`equalityRelationalPattern_end`, since it's essentially the same logic
(except that `equalityRelationalPattern_end` also has support for
`!=`).  So now, `constantPattern_end` simply calls
`equalityRelationalPattern_end` in the case where pattern support is
enabled.

I also had to make a change to `RelationalOperatorResolution` to make
it possible to distinguish `==` from `!=`.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: Idc5dbcfb02e3f8b57cfcccb3f46364fe34268ded
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280900
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-02-07 21:08:50 +00:00
..
benchmark [patterns] Handle nullability in StaticType for top/nullType 2022-12-14 09:21:27 +00:00
lib/src Flow analysis: add support for relational patterns. 2023-02-07 21:08:50 +00:00
test Flow analysis: add support for relational patterns. 2023-02-07 21:08:50 +00:00
tool Change : to = for default values in pkg. 2022-08-24 15:57:16 +00:00
analysis_options.yaml Enable annotate_overrides lint in _fe_analyzer_shared/ 2022-11-17 15:13:39 +00:00
analysis_options_no_lints.yaml [_fe_analyzer_shared][cfe][analyzer] Initial implementation of exhaustiveness checking 2023-01-24 13:34:46 +00:00
LICENSE Update LICENSE 2021-04-07 10:28:38 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
PRESUBMIT.py [python3] Migrate PRESUBMIT.py files 2021-08-16 08:29:54 +00:00
pubspec.yaml Prepare to publish analyzer 5.4.0 and _fe_analyzer_shared 52.0.0 2023-01-04 19:33:48 +00:00
README.md

FE/analyzer shared code

This package contains logic that is shared between the front_end and analyzer packages. It is intended solely to facilitate development of the Dart SDK, and is not intended for use by end users. In particular, this package has no public API, so no guarantee is made of compatibility between one version of the package and the next.

End users should consider using the analyzer package to analyze Dart source code.