Johnni Winther
d2fcd678fd
[analyzer,cfe,dart2js] Improve offset of generated library/class/member annotations
...
Change-Id: I76fea5f3479b5185433ec56efefb89071676e1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130375
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-08 14:47:28 +00:00
Johnni Winther
64dae246db
[dart2js] Use CFE constant evaluator for non-required constants
...
Change-Id: Id363332caf29e98307553ec048c2dea36c739d95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129701
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2020-01-08 08:21:59 +00:00
Johnni Winther
969fa962da
[analyzer,cfe,dart2js] Do not generate annotations for empty values.
...
Change-Id: I0efa6287a44e340f9dc242b4ffc84fc8723e1049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129718
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-03 20:12:39 +00:00
Johnni Winther
e3a20bf361
[analyzer,cfe,dart2js] Support annotated code generation
...
Add support for generating annotations from actual data using
option -g
Change-Id: I88d9cdb62a38d579234b15097c9e9bb3d81ebe8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129708
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-03 13:57:39 +00:00
Konstantin Shcheglov
36ded5cdd9
Issue 39875. Don't report unchecked nullable when resovled to an extension with nullable extended type.
...
Bug: https://github.com/dart-lang/sdk/issues/39875
Change-Id: I8beff226da4b301b0d2903788b44705985c89823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129323
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-12-20 23:39:44 +00:00
Johnni Winther
904a822432
[cfe+analyzer] Use TryStatement for try/catch and try/finally in CFE
...
This includes an alignment of assigned variables info collection between
analyzer and cfe by always collecting assigned variables info for both
the try statement and the try block.
Change-Id: I789527adc24da025a85e73cdd98392efe7fc97bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128407
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-16 13:55:50 +00:00
Johnni Winther
818ec6db92
[cfe] Implement nnbd-top-merge
...
+ and use nnbd-top-merge and legacy erasure in hierarchy computation
Change-Id: I4bf06ce8d3c68a9926865ebf84b24b4029828d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128065
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-12-13 17:19:59 +00:00
Konstantin Shcheglov
52dc7690ef
Issue 39667. Use flow analysis in IfElement.
...
Bug: https://github.com/dart-lang/sdk/issues/39667
Change-Id: I4528869a8d39d1b27c0cdf21ab20173bdb0efbc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127482
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-12-07 03:32:14 +00:00
Johnni Winther
42a4442521
[cfe] Handle promotion of Null to Never
...
Change-Id: If784cc315e0ea179e98df45a06d4a99179e4c197
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127140
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-04 12:41:38 +00:00
Johnni Winther
441a17d1f9
[cfe] Fix flow analysis for type parameter promotion, initializers, switch continue and for loops
...
Change-Id: Ia0bbbeb7f968961846a30a31471399bef9065842
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127003
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-03 14:28:48 +00:00
Johnni Winther
659b32ffc8
[cfe] Handle chained null shorting and null aware if-null set
...
Change-Id: I39d2448a957ca7f4f3d1f027e543f773b300ce9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126645
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2019-11-28 12:44:55 +00:00
Dmitry Stefantsov
d9d5fbc109
[cfe] Create TypeParameterTypes with default nullabilities
...
Change-Id: I85be937240ba5cc39840e78f374902c1e36521a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124327
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2019-11-19 11:22:43 +00:00
Johnni Winther
f443bc918e
[cfe] Add tests for inheritance from opt-out libraries
...
Change-Id: If139945dfdd808da0c24ac550ecfa235b41d3c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123737
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-11-13 10:08:08 +00:00
Johnni Winther
462a448ac8
[cfe] Integrate definite assignment, nullability and type promotion analysis
...
Currently not handled: null-aware and break/continue
Change-Id: I61b3ef92c974a2e98a010e091ba81cbefa0f6069
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124127
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-11-06 12:28:52 +00:00
Paul Berry
bb8ddfcdd6
Format definite_assignment test cases.
...
These were proably not formatted when they were initially written
because the formatter didn't support enough of NNBD at the time.
Change-Id: Ib2f4400081835d3a797d7e4394a069b9b122efe4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123681
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-10-31 15:02:03 +00:00
Paul Berry
a0ee662b7b
Move shared analyzer/FE integration test data into shared package.
...
This moves the five test suites for flow analysis along with the
constants test suite.
Note that a few files have formatting errors. I'll fix those in a
follow-up CL.
Change-Id: Ie9bba74c7d91e49ac6c9d3c64a96be007b6a94c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123680
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-10-31 15:02:03 +00:00
Paul Berry
29ab43e0e2
Move flow_analysis tests into package:_fe_analyzer_shared.
...
Change-Id: I3f95b1124ceb5c465a88e30bd161c0a2832a9772
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123625
Reviewed-by: Jens Johansen <jensj@google.com >
2019-10-31 13:05:53 +00:00