Johnni Winther
231416f39e
[cfe] Implement ClassHierarchyBuilder supertype computation in terms of DartType
...
Change-Id: I2a471460c4e10c6625e7aa93c589587f1c98ac85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132340
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-21 14:29:42 +00:00
Dmitry Stefantsov
619fcd9ad1
[cfe] Allow invocations of Object's member on nullable receivers
...
Closes #40079 .
Bug: http://dartbug.com/40079
Change-Id: Ib837a96c8ceb3371dfce61fdda2229800afa1336
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132605
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-01-21 13:12:11 +00:00
Konstantin Shcheglov
020585872a
Intersect promoted types in joinV().
...
Bug: https://github.com/dart-lang/sdk/issues/40010
Change-Id: I02299e48ab1c9305a2d29f804796182444f3d9aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132166
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2020-01-17 22:31:37 +00:00
Konstantin Shcheglov
58a65fe4ba
Issue 40110. Update switchStatement_end() to 'isExhaustive', use for switch on enum in analyzer.
...
Bug: https://github.com/dart-lang/sdk/issues/40110
Change-Id: Ic17ab4562f518b7e69b78c3285b577ea3b8d1223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131712
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-01-17 22:07:16 +00:00
Johnni Winther
47743990a1
[cfe] Provide file offset on StringConcatenation
...
Change-Id: I70d5f47fd118f9b40c01f0f71057bd8e244561d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132240
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-17 09:48:12 +00:00
Johnni Winther
45e966a9eb
[cfe] Ensure internal fields for late lowering are not overridden.
...
Change-Id: I3b40c311cd81966d3c09ee362b96cc7d98890d66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131829
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-17 08:01:45 +00:00
Dmitry Stefantsov
369bfd094a
[cfe] Fix type inference for various if-null nodes
...
Change-Id: I70abfb7032194cac07028b50d16125e74b518bb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131823
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-01-16 09:39:49 +00:00
Jens Johansen
128771af8a
[CFE] Version 2 of incremental compiler invalidation strategy
...
Change-Id: Iff860e2665dee64fc005a50237ae890986ddb0f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127896
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-01-16 07:50:39 +00:00
Johnni Winther
862d5012ae
[cfe] Handle explicit opt-out in nnbd-not-enabled message
...
Closes #39835
Change-Id: I4ffa3377289f45b7ea909b5477ba53508040b9d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131076
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-01-15 10:30:43 +00:00
Johnni Winther
99e2a348b3
[dart2js,cfe] Move filenames.dart to _fe_analyzer_shared
...
... and use it fix perf_test on Windows
`currentDirectory` is replaced by `Uri.base` (the former sounded more magical than it was!)
Change-Id: I5fb8dc5dba004ebad221d4b39d213d51964c5ea2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131622
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-01-15 10:12:23 +00:00
Johnni Winther
d302d7f10a
[cfe] Insert member signatures for nnbd aware inheritance
...
Change-Id: I86dbbd586434af81b6dc4f4ae748cbd8177d06e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129080
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-15 07:36:28 +00:00
Johnni Winther
280fbf2c15
[cfe] Handle type variable typed late fields and locals
...
Change-Id: I98fb0526369881506b1a494f9b30de4a25dbbc57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131068
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-14 14:27:35 +00:00
Johnni Winther
d08f070b28
[cfe] Add canonical way to detect the synthesized redirecting factory field
...
Change-Id: Ied5ffe786558856c4e63881880cbd19fa0bd6c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131620
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-14 09:42:45 +00:00
Dmitry Stefantsov
89a7dfb10e
[cfe] Add more tests for compile-time errors related to Null Safety
...
Bug: http://dartbug.com/40054
Change-Id: Idcfaf9ef61d023f6e88507447459f21b6b324a3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131079
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-01-14 09:02:25 +00:00
Jens Johansen
ecae983ef3
[CFE] Fix incremental compiler and incremental serialization when package changes path
...
The incremental compiler doesn't initialize from dill when it finds that
something in that dill has changed path (because of a change in package
version for instance).
Before this CL, though, it still initialized the incremental serializer
from the data, leading to weird and wrong results: If a package still in
use had been changed it could output the old serialization for that
package because invalidations didn't come into effect (as the incremental
compiler was starting from scratch and there thus was no libraries that
it didn't reuse (which are the ones that are "invalidated" in the
serialization world)).
This CL fixes the issue by only initializing the incremental serializer
when the incremental compiler has sucessfully initialized from the dill.
This should fix the problem that caused #39851 .
Fixes #39851 .
Change-Id: Ia62c4b7d96878174e0950a0dbbcdcbc4187615c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130371
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-01-07 13:10:33 +00:00
Dmitry Stefantsov
d8a211206a
[cfe] Fix upper bound algorithm for optional positional parameters
...
Closes #39930 .
Bug: http://dartbug.com/39930
Change-Id: If102ccfbd7fe439c29e803cf9bb16f2dfa317892
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130366
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-01-07 09:16:12 +00:00
Johnni Winther
96a8282cd9
[cfe] Use structural equality for generic function types
...
Change-Id: Iecff57779243e042c5e9cad96c96139da9d93380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129719
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-07 07:52:32 +00:00
Dmitry Stefantsov
89e95a550c
[cfe] Choose parameter's bound of LHS in lower / upper bounds algorithms
...
Change-Id: I2757e1a64928f0e8247c75a703b0ab28d7c59667
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130363
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-01-06 14:27:59 +00:00
Dmitry Stefantsov
9283a168dc
[cfe] Add upper / lower bounds tests with generic functions
...
Change-Id: I4ab715617dba52efeb96d9542ac6a33040f3465d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130362
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-01-06 11:41:09 +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
Johnni Winther
21a7cec251
[cfe] Don't report "missing input" on unknown command line option
...
Change-Id: I59da6c993c34e02fcb0ee6f09517cc8f9842578f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129281
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-12-20 15:37:00 +00:00
Kallen Tu
aa6709974d
[cfe] Fix inference for variant parameters leaking UnknownTypes.
...
Change-Id: I056535cbfc74554de408ce4f9d89c142c4c860cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128771
Reviewed-by: Leaf Petersen <leafp@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2019-12-19 02:14:59 +00:00
Sigmund Cherem
884f7af3ce
Whitelist _2 suites as opted out from NNBD
...
Change-Id: I66cc12858b3166b7c635fc91693dddc7ba362fca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128779
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-18 18:11:31 +00:00
Dmitry Stefantsov
a7a73e23b4
[cfe] Report an error if thrown expression isn't assignable to Object
...
Closes #39659 .
Bug: http://dartbug.com/39659
Change-Id: Ibf54cf25ed9593c33e3d6576bab345070bb44d6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128669
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-18 15:26:01 +00:00
Dmitry Stefantsov
01a8d76307
[cfe] Fix compiler crashes on for-in iterables with Null type
...
Closes #39817 .
Bug: http://dartbug.com/39817
Change-Id: Id60a3d35d73880c68e6a73adffd4c8c96e9b49fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128664
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-18 15:14:21 +00:00
Dmitry Stefantsov
f10fa3df28
[cfe] Split the lines that span over the 80-symbols boundary
...
Change-Id: Id21b1ca238d080cbe5a108def7d66b5c955b823c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128680
Auto-Submit: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-12-17 16:32:06 +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
Dmitry Stefantsov
c85979a280
[cfe] Implement the NNBD variation of the assignability property
...
Change-Id: I802e5668952f918919bd4fda4fd0102623a20ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128544
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2019-12-16 12:38:27 +00:00
Johnni Winther
eda5188a0e
[cfe] Implement flow analysis on if elements
...
Change-Id: I5d8afac580c0bd038e3287bea6dd74cb51f3f2f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128541
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-16 11:48:07 +00:00
Sigmund Cherem
35bc105c45
Whitelist all packages in the .packages file as opt-out from nnbd.
...
Change-Id: Ic52130d4853a32664ab0fe9db32be12e55d763db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128421
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2019-12-13 21:19:54 +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
Johnni Winther
a577d0aea5
[cfe] Add weak mode testing
...
Change-Id: I3670e77a205404c0b35ee551a18c6ebdc2ecab33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128069
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-13 09:20:08 +00:00
Johnni Winther
72eb475f6c
[cfe] Refactor for-in loops to handle flow analysis
...
Change-Id: Iddbf84e9d878fc828280c76cdaa22f3082b6b842
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128067
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2019-12-12 13:53:59 +00:00
Dmitry Stefantsov
4df5b5458a
[cfe] Implement NNBD-aware lower / upper bound algorithms
...
Change-Id: I1def2843f41938e8aee39d12fc4e2807b0c5a1b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126725
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-12 11:00:21 +00:00
Johnni Winther
d9fa37e85d
[kernel] Use Never as static type for throw/rethrow
...
Change-Id: Iba61a834827747e656a6dc14d73ee152f66864cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127882
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-11 08:37:59 +00:00
Johnni Winther
de11b7b373
[cfe] Implement legacy erasure
...
Change-Id: I4f152264469e7cb6d23c7502e277004cd35e8527
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127463
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-12-09 13:07:07 +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
Erik Ernst
80a400297a
[cfe] Add initial version of support for nonfunction-type-aliases
...
Change-Id: I9ff3f0c18a31bd1e0d16ba8b6ccd0cc261250c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127005
Commit-Queue: Erik Ernst <eernst@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-06 13:35:30 +00:00
Johnni Winther
97c2ca5ff1
[cfe] Use valid static types and file offsets in collections transformation
...
Closes #39566
Change-Id: I589d0dd568b3ea939bb1238b1c61fca6867e737e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127320
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-06 10:58:20 +00:00
Dmitry Stefantsov
47a9ebea76
[cfe] Make API of as-instance-of and legacy LUB/GLB library-specific
...
Change-Id: I1991c66e654ef537243d9f25f17070acbfa13af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126380
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-05 13:32:28 +00:00
Johnni Winther
e4e3f3fbc4
[cfe] Handle for-in on type variables in TypeEnvironment.forInElementType
...
Closes #39565
Change-Id: I5b4c437879be0a97b306c5cc3579faac917d7e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127162
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-05 12:26:58 +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
f7941eb850
[cfe] Handle break/continue in flow analysis
...
Change-Id: Ic02e60237b8eda3c98c0715e3fcc668d21e1bf62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126728
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-03 11:25:51 +00:00
Konstantin Shcheglov
0dc58fdcea
Format long lines in shared_type_tests.
...
Change-Id: Iaa5c65c24d0d16bfa5493aa6f927c74340d9fa69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126907
Auto-Submit: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-12-03 10:58:40 +00:00
Jens Johansen
12d9bedb33
[CFE] Let spell checker report all reported words at the end
...
Change-Id: Iefa2b72cc1af12957e34525e263fe2dfcf076dd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126727
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-12-02 10:41:27 +00:00
Jens Johansen
c1d21c368a
Move a few methods from ClassBuilderImpl to SourceClassBuilder
...
Change-Id: I85553b68f497f58d32721a93a718a069c8d783e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125968
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-02 09:34:32 +00:00
Jens Johansen
1c3468a646
[kernel] Remove Library.isExternal
...
Change-Id: I6638b915c1189838e7081069a0075e4ecd9ee9d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125600
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-02 09:24:42 +00:00
Karl Klose
f7549f6dd7
[cfe] Test suites runner: improve format of timing information
...
Change-Id: I5f5b648501e61c224d5faffd8bbd7d62391558e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126721
Auto-Submit: Karl Klose <karlklose@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-11-29 23:48:26 +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
Johnni Winther
8d874a5bd8
[cfe] Avoid cascading errors from part versioning mismatch
...
Change-Id: I8a233ff6c3b727176b812db203dac87f022f8a84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126643
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-11-28 10:48:34 +00:00