Dmitry Stefantsov
b4dbbe220c
[cfe] Use type parser in type constraint gatherer tests
...
Closes #44096 .
Bug: https://github.com/dart-lang/sdk/issues/44096
Change-Id: Id977e1ef70a1c17b30aedf072be7e6d2ea812d8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171587
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-12 17:25:27 +00:00
Johnni Winther
b38821f39d
[kernel] Enforce lints in pkg/kernel
...
Change-Id: I954f7632f22b552febed2a3140f81245277cb050
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171581
Reviewed-by: Jens Johansen <jensj@google.com >
2020-11-11 12:51:28 +00:00
Dmitry Stefantsov
783d83950b
[cfe] Use type parser in type schema elimination tests
...
Closes : #44095 .
Bug: https://github.com/dart-lang/sdk/issues/44095
Change-Id: Iff15b0686557388c4e701075a4f6e4fc16dfa5fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170901
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-09 16:54:39 +00:00
Dmitry Stefantsov
d54e2bb568
[cfe,ddc,dart2js,vm] Add NullType
...
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/170342/
* https://dart-review.googlesource.com/c/sdk/+/170344/
* https://dart-review.googlesource.com/c/sdk/+/170345/
* https://dart-review.googlesource.com/c/sdk/+/170346/
* https://dart-review.googlesource.com/c/sdk/+/170347/
The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.
Closes #40122 .
TEST=Verified by changes in .expect files in pkg/vm/.
Bug: https://github.com/dart-lang/sdk/issues/40122
Change-Id: Ib8197802fdc69694387ae47ac990c58b3aaab7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170689
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-06 12:43:52 +00:00
Johnni Winther
942f765763
[cfe] Use semantic nullability for "is non-nullable" queries in UP/DOWN
...
Previously declaredNullability was used which missed that FutureOr<Function?>
is nullable.
+ add computation, test and use of NonNull in UP/DOWN
Closes #43742
Change-Id: Icf0b95143a85abb5eec056ee0aea23ef40a5283a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168946
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-10-23 14:58:42 +00:00
Johnni Winther
34f5c9d0b4
[cfe] Implement new async return rules
...
Closes #41800
Closes #41900
Closes #42134
Closes #42282
Closes #42236
Closes #42169
Change-Id: Ia994bc07fba4e2342fcb59d44fc77608198a328b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152150
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-07-06 07:04:40 +00:00
Dmitry Stefantsov
929d5e4a98
[cfe,ddc,dart2js,vm] Add FutureOrType
...
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/149297/
* https://dart-review.googlesource.com/c/sdk/+/149299/
* https://dart-review.googlesource.com/c/sdk/+/149320/
* https://dart-review.googlesource.com/c/sdk/+/149321/
* https://dart-review.googlesource.com/c/sdk/+/149323/
The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.
Closes #40123 .
Bug: https://github.com/dart-lang/sdk/issues/40123
Change-Id: Ice52250a98acfe455b1d7fa5bb0624c115ca5dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150934
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-06-15 12:18:46 +00:00
Dmitry Stefantsov
e53e5f2475
[cfe] Separate nullability and declared nullability
...
For some types it makes sense to distinguish between nullability as a
property of including null and the declared nullability, such as for
type-parameter types and FutureOr types. This CL introduces the
separation between the two concepts. The plan is to use that when
implementing FutureOrType.
Bug: https://github.com/dart-lang/sdk/issues/40123
Change-Id: I90b45bea768e89c213d021d360a481d38377c682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147903
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-05-15 07:38:05 +00:00
Dmitry Stefantsov
dea82cc39a
[cfe] Make instantiation-to-bound algorithm NNBD-aware
...
Closes #40764 .
Bug: https://github.com/dart-lang/sdk/issues/40764
Change-Id: Ia9eff062f54632edbdb26937879742d7a813a07c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139643
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-03-20 09:03:41 +00:00
Dmitry Stefantsov
535ee87c21
[kernel] Add NORM implementation
...
Change-Id: I6292a4247ed0c418f2d3d6fa841ed086894c31c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134335
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-07 15:00:24 +00:00
Johnni Winther
42f954d5f1
[cfe] Move type parser to package:kernel
...
Change-Id: Icbb37b586dd4113605f9a0959e585586ee94c33c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131836
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-21 14:37:32 +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
Dmitry Stefantsov
0b9665fc8b
[cfe] Use library's non-nullable modifier when creating new types
...
It's a part of internal cleanup of pkg/kernel and pkg/front_end. The
library's status is queried when the new types are created for it in
order to determine the value of the nullability modifier of the type.
Change-Id: Id653c511d17b3811a26b1751876a6e5036cdbed9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125261
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-11-21 16:00:25 +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
Dmitry Stefantsov
b4554c1215
[cfe] Make nullability a required parameter for types
...
Change-Id: Id787291294cafb15cf4ecad4a9db9da4c6066638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124135
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Auto-Submit: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-11-07 13:24:47 +00:00
Dmitry Stefantsov
515a597710
[cfe] Remove Class.rawType
...
Bug: http://dartbug.com/38224
Change-Id: If0af5487b1d43125738575ee3e0fcd747db54fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117546
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-09-19 10:42:10 +00:00
Peter von der Ahé
4f2bdff90b
Rename Program to Component
...
Change-Id: I1a3cc03fba9783807fa637a9d42fdbad68ee7686
Reviewed-on: https://dart-review.googlesource.com/31040
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2018-03-15 12:22:23 +00:00
Paul Berry
bf15116d0f
Handle FutureOr type when inferring async closures.
...
R=asgerf@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2892593005 .
2017-05-20 20:16:59 -07:00
Konstantin Shcheglov
bdedd6768b
Add a way to use shared CanonicalName root to deserialize Program.
...
This allows for example to add SDK into a Program, then load the
"incomplete" Program A that has only the library A, and name sequences
that references SDK classes. Because we look into the nameRoot which
aleady has SDK CanonicalName(s), we can find these names while filling
the link table and use references which point to the existing SDK
AST nodes. Then we can load another set of library cycles, etc.
At the end we have a set of self-consistent libraries that we can
feed into DillTarget/DillLoader and resolve anothersource target
against it.
This CL is based on https://codereview.chromium.org/2872903005/
which has not been reviewed yet.
R=kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2874723002 .
2017-05-12 10:42:08 -07:00
Paul Berry
932a749bbc
Begin implementing subtype matching for type inference.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2856383003 .
2017-05-04 08:40:45 -07:00
Paul Berry
29570728a3
Implement Dart 1.0 LUB algorithm (for interface types) in kernel.
...
Note: I intend to implement the full LUB algorithm (including strong
mode behaviors) in front_end, however this piece of the algorithm
makes sense to be in kernel so that it can take advantage of
_ClassInfo.
R=ahe@google.com , johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2848083002 .
2017-05-01 11:25:47 -07:00