Commit Graph

1383 Commits

Author SHA1 Message Date
Dmitry Stefantsov e4a60912a7 [cfe] Use library's NNBD opt-in status while serializing supertypes
Change-Id: Id1ab5fd9a36b4aadb213febb0e1ae2eba968244d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124331
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-08 10:24:36 +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
Aske Simon Christensen c504476dc4 [CFE] Extend verifier to check constants.
Add a flag to the verifier that tells it to assume that full constant
evaluation has been performed. It will then complain about anything
that should not be there after constant evaluation.

Also fix two bugs exposed by the new checks:
- The constant transformer did not visit annotations on type parameters
  in function nodes.
- The InstanceCreation constructor did not set the parent pointers of
  its children.

Change-Id: Ieef865a51892918e524da973b0cbaf52ed467181
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-11-07 09:53:26 +00:00
Dmitry Stefantsov 24f1f313a2 [cfe] Implement the rest of the NNBD-aware subtype relation
Closes #38673.

Bug: http://dartbug.com/38673
Change-Id: I83fd29be0b6b74b8238a8a07c60d95365871c955
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124132
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-06 11:00:21 +00:00
Kallen Tu 11b1433756 Allow downwards inference of sound constructor calls.
Change-Id: Iffe2c6c052cfba40000c0325f5f1fd4ce9b51b9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123941
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-11-06 00:30:07 +00:00
Johnni Winther 75dc8483ab [kernel] Include promoted bound in TypeParameterType equality
Change-Id: I30edcf2ea454efd6e2a1750e826e1a160b7e154a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124125
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-05 13:06:51 +00:00
Jens Johansen f91ef3afd7 [kernel] Deprecate Library.isExternal
We're deprecating kernels Library.isExternal as it wasn't used for
what it was originally intended. It will hopefully go away entirely
soon.

Change-Id: If363c50af5607febae68865875af452c106fff85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123721
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-04 09:24:02 +00:00
Johnni Winther 00c2962db8 [cfe+analyzer] Move messages, scanner and parser to package:_fe_analyzer_shared
Change-Id: I4fa87aee65f30a9868a6cf8f0342591869ece7ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123663
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-01 09:37:57 +00:00
Kallen Tu 94e312f7a6 Added errors for variance positions in method members.
When an explicitly defined type variable is used in an incorrect
variance position in a method (whether in the return or the
parameters), an error is emitted.

Change-Id: I7e49687579bb2ce6e293b052b657b98741cb04f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122740
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-10-31 18:26:43 +00:00
Paul Berry e56612020c Prepare to publish analyzer 0.39.1.
Change-Id: I57132f7ba1e876ce94ae9acd95e702713d79de83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123700
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-31 15:44:23 +00:00
Dmitry Stefantsov 2897bebdef [cfe] Resolve serialization mismatch due to variance computation
Change-Id: Id38c63f5bd659f21423d802fd6180aa04465712c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123406
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-31 10:15:29 +00:00
Kallen Tu 48fbd1aa2b Throw exception when calling defaultDartType in VarianceCalculator.
Prevents the variance computation from silently, and unintentionally
work with new types that may be added in the future.

Change-Id: I94f6b25b26a919cc7cfe6e4b41030f5dd497d5d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123463
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-10-30 17:03:14 +00:00
Johnni Winther 3ccdb01fc9 [cfe] Handle extensions exported through multiple libraries
Closes #39160

Change-Id: I605b1a95ddab822848b33244b3130ebf16b69842
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123523
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-10-30 11:59:44 +00:00
Dmitry Stefantsov 9910fa8454 [cfe] Implement the first part of NNBD-aware isSubtypeOf
This CL is a squashing of the following smaller CLs:

* https://dart-review.googlesource.com/c/sdk/+/120669/
* https://dart-review.googlesource.com/c/sdk/+/120670/
* https://dart-review.googlesource.com/c/sdk/+/121331/
* https://dart-review.googlesource.com/c/sdk/+/121381/
* https://dart-review.googlesource.com/c/sdk/+/121383/
* https://dart-review.googlesource.com/c/sdk/+/121620/
* https://dart-review.googlesource.com/c/sdk/+/121707/
* https://dart-review.googlesource.com/c/sdk/+/122144/
* https://dart-review.googlesource.com/c/sdk/+/122360/
* https://dart-review.googlesource.com/c/sdk/+/122381/
* https://dart-review.googlesource.com/c/sdk/+/122783/
* https://dart-review.googlesource.com/c/sdk/+/122787/

Change-Id: I9d850f531f0fce07055ff9b5cd39abb605752005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122868
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-25 16:37:39 +00:00
Johnni Winther 22856e5d86 [infra] Bump VERSION to 2.7.0
TBR=whesse@google.com

Change-Id: Id73807b571056de253f7bced407402fa9a6d9181
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122800
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-10-25 09:37:34 +00:00
Jens Johansen 18fa7485ad [kernel] Read ContinueSwitchStatements in nested FunctionNodes correctly
Closes #39040

Change-Id: I8ae9a89cfd750dddbf0a994e93d9b2aa2d46490c
Fixed: 39040
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122386
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-23 08:34:27 +00:00
Kallen Tu 4601bd7bff Modified supertype check error message to be more descriptive.
Change-Id: I3068bf195eb9a746d25ac62007eaeac0296d3087
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121463
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-10-22 16:59:16 +00:00
Jens Johansen 0449905e2d [CFE] Add a serialization-and-unserialization step to strong test
Change-Id: Icb6275e9eaec0bbdd890719d780a0218fa660fec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122384
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-22 13:40:01 +00:00
Jens Johansen 596eb91228 [kernel] Update smoke_test_quick after CFE rename of _test to _suite
Change-Id: I87e416aa8838ccafb7d9044b8c30d46bd329cb72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122385
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-22 09:33:13 +00:00
Paul Berry 5d4cd6d589 Breaking changes for analyzer version 0.39.
Change-Id: Ifa9ca24487f93f3eb0ec95eeb64f5bbb5aa32714
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113216
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-21 18:23:10 +00:00
Johnni Winther b1b4f6b7e4 [cfe] Allow assignment to late final fields/variables
Change-Id: I0264904fe6f24f4021cef3d6576b54e11fe0a4d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122143
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-10-21 12:38:51 +00:00
Jens Johansen d40c8a0573 [kernel] Add 'leakingDebugToString' to nodes
This serves two purposes:
1) It can aid in debugging to better know which object you have.
2) It paves the way for a future re-design of toString so toString never
   leaks.

Change-Id: Ice32209b19b961b7e92de829d8bee0ddd8bd6e93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122140
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-18 10:43:58 +00:00
Dmitry Stefantsov b212403cf8 [cfe] Change integer values that encode nullability attributes
This CL also completes the renaming of "neither" into "undetermined" by
renaming kNeither value in the nullability enum in
runtime/vm/kernel_binary.h into kUndetermined.

Change-Id: Ia266bf1b35577212b696fb4a093340ee8e986256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121989
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-18 08:46:16 +00:00
Dmitry Stefantsov a61c775db8 [cfe] Rename "neither" nullability into "undetermined"
Change-Id: Iad242e4ae11147a4d49a7b19c78c09dcb2977188
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121981
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-17 14:39:30 +00:00
Johnni Winther c6cb89c622 [cfe] Replace child nodes in parent nodes on post-traversal
Replace child nodes in parent nodes on post-traversal instead of using
TreeNode.replaceChild and TreeNode.replaceWith

Change-Id: I2f6f908dce0cd38f1d9a68d4183810e2e0cdca71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121622
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-10-17 12:56:49 +00:00
Jens Johansen 95991df628 [CFE] Fix crash with duplicate field and constructor initialization
Fixes #38938

Bug: 38938
Change-Id: Icee8187c2237289640cf7bfa763c8e614c5f1cb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121858
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-17 10:47:53 +00:00
Kallen Tu 7b135fc7a6 Differentiate between legacy and sound covariance.
Used to separate the behaviour without the variance experiment flag
turned off and with the flag turned on. Allows for more specific error
descriptions and allows the backend to avoid emitting variance
annotations for legacy covariance and only when the experiment is
enabled, otherwise there is no way of knowing whether the variance is
user specified.

Change-Id: Ia3070a1358e9b0fef10a3ce5057df881b9659832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121140
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-10-16 18:18:06 +00:00
Dmitry Stefantsov 23e8f2bcfa [cfe] Verify that Null is always nullable
Closes #38360.

Bug: http://dartbug.com/38360
Change-Id: I073a63bc968f1955a3c23bb8ed42e07b5955568a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120668
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-16 11:25:02 +00:00
Dmitry Stefantsov 2ed7b63abd [cfe] Describe subtype relation in "Nullability in CFE"
Change-Id: Ia9426a92f0a6f374bf540f982d1429ff693dad80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121703
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-10-16 08:56:41 +00:00
Dmitry Stefantsov dbf63583ff [cfe] Add .withNullability to the "Nullability in CFE" doc
Change-Id: Ic920d5451a541972f5184e84012b69cd21d70d55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121701
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-10-16 08:50:51 +00:00
Kallen Tu b3df8aaa12 Change subtype checking with variance for assignments and methods.
Change-Id: I2594c8749ee445a02e06f82c65cd34a62fc77a29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120744
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-10-11 19:44:05 +00:00
Johnni Winther 42dcdf903c [cfe] Handle promoted type variables in getStaticType
Change-Id: I05a748ec800c7c18a52f8444ad030208ea14d268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121325
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-10-11 19:04:48 +00:00
Jens Johansen b8aef62abd [kernel] Effectively clear extension members before adding new ones when loaing dill if 'shouldWriteData'
Prior to this change, loading a dill with extensions in it twice,
would mean getting the extension members twice.

Change-Id: I766a4a6b0ade98ce9af803db0c696e64821e015a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121064
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-11 07:33:03 +00:00
Devon Carew b97fc2e05f [kernel] fix a typo
Change-Id: I60aaefd7c1166f862f0f207977ba10db6252d997
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120924
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-10 15:09:07 +00:00
Johnni Winther 72bae7be70 [cfe] Handle all bounds checks on extension methods.
Closes #38755

Change-Id: I3d5449950ecb3268436a3033ae16bac590a1e4b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120790
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-10-09 19:50:02 +00:00
Jens Johansen f09edd1d32 [CFE] Add incremental serializer
Add an incremental serializer that can be used to avoid re-serializing
the same thing again and again.
It does this by grouping libraries into Components / bundles,
serializing them individually and using the concatenated dill feature to
output the wanted data --- just potentially faster if we had the data
in cache.

Note that the serialized output might contain *more* than the input given
if we cached the wanted data into a bigger bundle.
The output will always be "closed" though, i.e. if the stuff that is
included that is too much added a new dependency, that dependency will be
included as well.
This should generally make it safe, although one can imagine situations
where it could pull in lots of dependencies that it wouldn't otherwise
have.

It is being driven by the incremental compiler which makes sure to
invalidate the cache when the data changes.

Except for situations where the libraries are changed externally after
being serialized, but before being serialized again, where one then wants
the updated library serialized, the feature should be safe.

Change-Id: I2a504abe6dbb68434c3b04abff13480ef72a6a6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120786
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-09 13:28:12 +00:00
Jens Johansen 6ebf3f0889 [kernel] Clear a few lists when loading dill
Prior to this change, loading the sdk dill twice for instance would
result in additional exports as well as parameter counts doubling,
essentially destroying the result.

Change-Id: I4d694bec1926d6df6572e9bb36e8a88ec0822e27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120785
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-09 10:34:07 +00:00
Jens Johansen 05f56ef160 [kernel] Fix printing of additional exports
Change-Id: I65ee82646555cd31eccad33e3a125f0ef2af3a35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120784
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-09 10:10:33 +00:00
Johnni Winther 46a9273664 [cfe] Opt in to NNBD using experimental flag _and_ version number
+ add testing of nnbd types and opt-out in static_types_test

Closes #38287

Change-Id: I019753a74cdc6980dadb0608f7ac486c127af6f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120666
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-10-09 08:43:03 +00:00
Kallen Tu e3ca5ee6ba Check variance of type-parameter use in supertypes.
Tests have both correct and erroneous implementations
of variance.

Change-Id: I49dd76f42399015dd6e3f9688e598c271ce7ab1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119722
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-10-08 21:33:40 +00:00
Jens Johansen 41c11716b0 [kernel] Make round-trip script work; improve fastas compare dill tool
Change-Id: I194987772349f6c673263662346a28560ecb168a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120645
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-08 09:55:37 +00:00
Johnni Winther 9276d50fdc [cfe] Remove Severity.errorLegacyWarning
Change-Id: I1cc7a34af307b9edee4c92e43e8607a450cf471d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120585
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-10-08 09:16:47 +00:00
Paul Berry d93a6b596b Prepare to publish analyzer version 0.38.5
Change-Id: I314944fb68375644860477185c88ce93a8839341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-07 16:34:01 +00:00
Dmitry Stefantsov a81ea1e0d2 [cfe] Upload the first draft of Nullability in CFE doc
Change-Id: I48cd08ed885a022e45bc6eae0fae3384728bbf06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118988
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-04 11:04:02 +00:00
Ryan Macnak d65a60db00 [vm, bytecode] Populate bytecode cache when initializing an incremental compiler from a kernel file.
AST
"without_change_elapsed_time_ms": 2863,
"implementation_change_elapsed_time_ms": 6009,
"interface_change_elapsed_time_ms": 5888,
"with_coverage_time_ms": 2884

BYTECODE BEFORE
"without_change_elapsed_time_ms": 5216,
"implementation_change_elapsed_time_ms": 8517,
"interface_change_elapsed_time_ms": 8895,
"with_coverage_time_ms": 5462

BYTECODE AFTER
"without_change_elapsed_time_ms": 3384,
"implementation_change_elapsed_time_ms": 8139,
"interface_change_elapsed_time_ms": 8073,
"with_coverage_time_ms": 3473

Change-Id: Ic8e1c183070cb6019ea48f16c04ea5363df41a97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-10-02 23:53:42 +00:00
Alexander Markov 5a2a5204dd [kernel] Fix metadata_test in presence of control flow collections
Block nodes inside BlockExpression are not serialized separately in
kernel binary, so attached metadata is not preserved.

This change fixes Fixes pkg/kernel/test/metadata_test test failure
revealed by https://dart-review.googlesource.com/c/sdk/+/119520.

Change-Id: I38c2cde6311e001f16faf2641762aaf42dd6d2b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119527
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-10-02 15:53:04 +00:00
Dmitry Stefantsov bdf6b9505e [cfe] Ask for subtype checking mode explicitly
The interpretation of the subtype check result depends on the mode.  In partial
NNBD mode all type errors that wouldn't be errors in non-NNBD programs should
become warnings.  In full NNBD mode all such errors are errors.  This CL adds
the mode explicitly to the interface of the subtype check as a parameter.

Bug: http://dartbug.com/38673
Change-Id: I14bcdd260618530cfdd8189c01abba7469a16679
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119545
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-02 11:30:29 +00:00
Dmitry Stefantsov c1616157d1 [cfe] Use a class instead of the enum for subtype check results
Bug: http://dartbug.com/38673
Change-Id: I3f435c1c9b214ac822e6892849dddc9f6be8a462
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119544
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-02 11:30:29 +00:00
Dmitry Stefantsov be43bce0b6 [cfe] Make interface of subtype checks aware of nullabilities.
Change-Id: Id4dbd2c903a36df511f7d638d24dc63f8a9344c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119541
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-02 11:30:29 +00:00
Jens Johansen 998f1efbe9 [kernel] Add test for keeping sources when loading concatenated component
This CL adds a test for what was fixed in
79cc54e519, namely that when loading a
concatenated component, the uriToSource map shouldn't have its values
overwritten with objects with no source in them.

Change-Id: Ief899295d0b4ab97cbfe598a39bb47441d38c3ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119542
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-01 13:14:52 +00:00