Commit Graph

2004 Commits

Author SHA1 Message Date
Karl Klose cd229de42b [cfe] Increase unit test suites time out to 15 minutes
Change-Id: Iad751b95875b2b7a82f3d19cb4e49552d67e9ee5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126640
Auto-Submit: Karl Klose <karlklose@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-28 07:59:08 +00:00
Johnni Winther a17809ad18 [kernel] Add TypeEnvironment.forInElementType
Adds convenience method for computing the element type of a for-in
iterable.

Change-Id: Idd1bf0a9b80523c49130b2d7f17590dcf86d3e40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126581
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-27 19:18:21 +00:00
Jens Johansen 61f5e88454 [CFE] [Strong test] Check non-serialized expectations first
This gives a "MismatchExpectations" error instead of
"MismatchExpectationsSerialized" if the serialization doesn't matter in
getting to the mismatch.
The serialized version is skipped when updating expectations to not
makeing the serialized version the "right" verison (which could get
you into a position where updating expectations and rerunning would
tell you the (normal) expectations needed updating).

Change-Id: I99b3af5fa823010d4abbf0837faf00e17b303c0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126540
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-27 13:04:00 +00:00
Johnni Winther cdb9830a54 [cfe] Shard text_serialization tests
Change-Id: Ibfa8a254f4918f96dee2a7fe72250766dcbdca65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126321
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2019-11-26 09:56:53 +00:00
Aske Simon Christensen 18f23124ad [cfe] Print nullability on types in messages for opt-in libraries.
This CL changes the message template generator to add an extra
'isNonNullableByDefault' parameter to 'withArguments' for all
messages that include types, thus forcing the reporter to specify
whether the library that the message belongs to is opted in to NNBD.

When the message is formatted, a '?' is added to all nullable types
if the message is reported for an opt-in library.

Change-Id: I4e1861eba48043c570afad3f40bc3dccfd2e5668
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124984
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-25 14:58:45 +00:00
Johnni Winther cb6ab6eaa2 [cfe] Handle untyped initializing formals for late fields
Change-Id: I7cd0612ea7690d1679fbd7269f628ec5bc65dd05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126040
Reviewed-by: Jens Johansen <jensj@google.com>
2019-11-25 13:59:25 +00:00
Jens Johansen 4d884229ab [kernel] Add (internal) relink method
Think of this as an internal method. You probably shouldn't call this
method without being told to by the kernel team.

Change-Id: I76d55870ee781646a648e8e253a33a1d497eed81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125963
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-25 12:44:25 +00:00
Aske Simon Christensen e78a2fd0df [cfe] Remove optional parameter to toString
Violates usual toString interface for no good reason.

Change-Id: I8f92f1c91c40bcab192e0862b920a4dabf259d57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125262
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-11-22 14:37:54 +00:00
Dmitry Stefantsov 1f382890a7 [cfe] Make inference NNBD-aware
Change-Id: I7a793c87b00c97a7d4b05ba94116215d8f6d2a89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125970
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-22 12:09:14 +00:00
Karl Klose bd06f1bf51 [cfe/infra] Unit test suites: print re-run command when a test fails
Closes #39423

Change-Id: Ifa3fbe4d670f4f95beceb2aae8769a553a9fbe7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125604
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-22 10:45:54 +00:00
Johnni Winther 970c164826 [cfe] Use correct types in transformations and start verifying getStaticType
With this fix Expression.getStaticType no longer throws on any known cases.
Users of getStaticType can therefore avoid enclosing static type computation
in try-catch.

Closes #38597

Change-Id: I52eaacd30256333d7c368e5d14f4e4956bafc96f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121988
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-21 22:15:58 +00:00
Erik Ernst 6808c563aa Adjusted front end to allow non-function type aliases
This change does not enable much (because the backends do not support
non-function type aliases), but this change makes it possible to work
on this feature in dart2js code, without making the changes to the
front end and the changes to dart2js part of the same cl.

Change-Id: I0d8a27a0e87cf6908f914b2c10d97ef3d02ebec5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125961
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-21 15:40:45 +00:00
Johnni Winther acff31ed26 [cfe] Support null-aware index access
Change-Id: I54b58624722845e4b008b90e675516ec274bc2da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125960
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-21 14:36:30 +00:00
Dmitry Stefantsov f692a2fbb8 [cfe] Eliminate Nullability.legacy in transformers
Nullability.legacy is replaced with an appropriate invocation of a
method on Library to retrieve the appropriate nullability.  Only
transformers in pkg/kernel and pkg/front_end are affected.  The
inference transformers are excluded from the scope of this CL.

Change-Id: I691c4343def913388a1277227b760fd7e1aa194c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125666
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-21 09:12:05 +00:00
Johnni Winther 246b23e5be [cfe] Implement late lowering for local variables.
Change-Id: I18f848561f7eca61f662f8083f7ca1451a8a0b3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125605
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-11-20 08:30:18 +00:00
Robert Nystrom db64f9ecb2 Delete standalone_2/io/process_exit_negative_test.dart.
I am trying to migrate all of the negative tests to something more
precise. As far as I can tell, this test stopped being useful with Dart
2.0. Now that all compilation errors are reported eagerly, the file
simply doesn't run at all. It's now just another test of an unresolved
identifier.

(This is a good example of *why* I want to get rid of negative tests.
This test silently went from a desired runtime failure to a compile-time
failure.)

Change-Id: Iec3cdd32a15612c0760119e92d618e3a5ba1f5ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125555
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-11-19 18:23:30 +00:00
Johnni Winther c2584d8046 [kernel] Align TypeParameterType.hashCode with the equality strategy
Since we use a unification strategy for function type type parameter
equality, we have to assume they can end up being the same. The
implementation of TypeParameterType.hashCode now reflects that.

Closes #39409

Change-Id: I5054b591253fb7d17208ffebdc5236a7100974de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125607
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-19 16:49:59 +00:00
Jens Johansen fae6affeea [CFE] Incremental compiler has experimental invalidation strategy (first checkpoint)
This CL adds an option to the incremental compiler that enables an experiment
invalidation strategy that only rebuilds bodies for changed libraries (if possible).
As far as we know, for valid applications this should work fine, although,
applications with errors in them (or where the changed libraries have errors in them)
might not issue those errors correctly.

Known caveats:

- Doesn't work on dill library builders (aka if you load from dill we
  still have to invalidate transitively).
- Only body-in-brace-changes --- cannot add new private members for
  instance, nor changed fields.
- It doesn't track which bodies has changed so there's room for
  improvement in regards to for instance mixin stuff where we bail
  if a class from an invalidated file is used as a mixin.
- Offsets for methods, for instance, isn't updated
- Any errors issued at the outline stage won't be issued.

Change-Id: I6edf073ec47ea31429479ffe67e2e8b6d2cb80dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-19 13:27:14 +00:00
Jens Johansen 7543d27445 [CFE] Disable colors for incremental compiler test suite
Before this change, running the tests via a terminal with colors enabled
would result in expectation file mismatches.

Change-Id: I958180074e65b4d0530c79be6bac11ba6d849b5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125602
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-19 13:26:54 +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 7c1f58f9fe [cfe] Demote inferred type variables when used as type arguments
Closes #39346

Change-Id: I997347d04e7a3c3cb9786f31cd6c24513307de92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125502
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-18 14:57:43 +00:00
Johnni Winther 129565a71d [kernel] Handle property invocation in MethodInvocation.getStaticType
Change-Id: I4a1ecdb9842f4f189be67e5f5d1b99ddb40d41da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125202
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-18 10:15:08 +00:00
Johnni Winther 9e03a639ea [cfe] Split inferMethodInvocation into invocation variants
Change-Id: I4ca0cb419652b4d822d8eb945a77b7243012ed1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125411
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-11-18 10:03:33 +00:00
Johnni Winther 764926f37d [cfe] Use BinaryExpression in compounds
Change-Id: I82c420bbc2e6d85eef0d602c3993487b78e91f19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125409
Reviewed-by: Jens Johansen <jensj@google.com>
2019-11-18 10:03:33 +00:00
Jens Johansen 29f127d055 [CFE] Clear initializers unconditionally in prepareInitializers
There doesn't appear to be any reason to guard the clearing,
and in a future CL it makes sense for it to always be cleared.

Change-Id: Id75a0ceb51dff474f20ac5aa5a05e56e49c00698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125401
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-18 08:46:13 +00:00
Johnni Winther 4b5589e0cb Reland "[cfe] Use StaticTypeContext for getStaticType" and more"
This relands commits
 "[cfe] Use StaticTypeContext for getStaticType"
 45033c6ad9

 "[cfe] Move caching of thisType to CoreTypes"
 fab25cbe0c

 "[vm/bytecode] Notify static type context when entering/leaving library"
 c9f88ae253

Change-Id: I407d6b0e3b3df503cedc9fcb2c834d835cf083f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125343
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-16 05:50:58 +00:00
Erik Ernst fdb9d19826 Added aliases and nonfunction to kernel spell check lists
Change-Id: I1d1affaba8b9ac473ecf645d2dc21fe9ffd16ae1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125405
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-15 16:21:22 +00:00
Jens Johansen c37ca05357 [CFE] Plug memory leak in incremental compiler
This CL adds a non-test, "incremental_dart2js_tester.dart" that via the
incremental compiler compiles dart2js, and then invalidates every file
one by one.

This caused a lot of memory usage and leaks was found and plugged.

Memory usage before:

  3.5e+07 +----------------------------------------------------------------+
          |      +      +       +      +      +      +       +      +      |
          |                                          *   **  **VS********* |
    3e+07 |-+                                       **  *** ******** *** *-|
          |                                     *  *** ** *** *** *      * |
          |                                 ** ***** ***   *             * |
  2.5e+07 |-+                               *******   **                 *-|
          |                             ** ****  *                       * |
          |                          * *****                             * |
    2e+07 |-+                     * **** **                              *-|
          |                    ****** *                                  * |
  1.5e+07 |-+               ****** *                                     *-|
          |               ***** *                                        * |
          |             *****                                            * |
    1e+07 |-+        *****                                               *-|
          |       *****                                                  * |
          |    *****                                                     * |
    5e+06 |-+****                                                        *-|
          | ***                                                          * |
          |**    +      +       +      +      +      +       +      +    * |
        0 +----------------------------------------------------------------+
          0     100    200     300    400    500    600     700    800    900

(i.e. it peeks at about 30 GB of ram usage)

Memory usage now:


  1.6e+06 +----------------------------------------------------------------+
          |      +     +      +     +      +     +      +     +  *   +     |
  1.5e+06 |-+                        *        *      *    *    VS* *******-|
          |                    *  *  ** **    *      *    *      *         |
          |                *** *  *  ** **    *      *    *      *         |
  1.4e+06 |-+*  * * *  *   *** *  *  *****    *      *    *      *       +-|
          |  *  * * *  *   *** *  ** *****    *  ************************  |
  1.3e+06 |-**  *** ** *  **** ***** *************************************-|
          | ******* ** *  ********** **** ******************************** |
          |****************************** **********                       |
  1.2e+06 |*********************                                         +-|
          |*****************                                               |
  1.1e+06 |**** *                                                        +-|
          |**                                                              |
          |*                                                               |
    1e+06 |*+                                                            +-|
          |*                                                               |
   900000 |-+                                                            +-|
          |                                                                |
          |      +     +      +     +      +     +      +     +      +     |
   800000 +----------------------------------------------------------------+
          0     100   200    300   400    500   600    700   800    900   1000

(i.e. it peeks at about 1.4 GB of ram usage)

Change-Id: I22f8d9e935dec1e50baa2cbd7ac5724880d6c886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125344
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-15 13:52:35 +00:00
Johnni Winther 45996ee170 [cfe] Add late field lowering for static/top-level fields
Change-Id: I16625257251b0badbcdfc1c9504899421db8b83f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124681
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-11-15 13:29:45 +00:00
Johnni Winther ef5fb7d3f4 Revert "[cfe] Use StaticTypeContext for getStaticType" and more
This reverts commits
 "[cfe] Use StaticTypeContext for getStaticType"
 45033c6ad9

 "[cfe] Move caching of thisType to CoreTypes"
 fab25cbe0c

 "[vm/bytecode] Notify static type context when entering/leaving library"
 c9f88ae253

Change-Id: I6171f6a74b97f2f4a77a36c242330fc2db94c82f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125341
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-11-14 22:51:43 +00:00
Dmitry Stefantsov 60ef22e2e4 [kernel] Add text (de)serialization for other FunctionNodes kinds
Change-Id: I9801f7adb823986c6802a27d030b2fa3f5ca3ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93983
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-14 16:23:16 +00:00
Dmitry Stefantsov fab25cbe0c [cfe] Move caching of thisType to CoreTypes
Closes #38225.

Bug: http://dartbug.com/38225
Change-Id: I0274bc390ca2d098896f578ea7ddf65527d82027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124325
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-14 16:01:26 +00:00
Johnni Winther 3855eeaae7 [cfe] Move shared id-tests into id_tests folder
Change-Id: I5e6efe43c7b0f0b65028cda0a192497e3a378aad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124994
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-14 10:16:16 +00:00
Johnni Winther 45033c6ad9 [cfe] Use StaticTypeContext for getStaticType
Change Expression.getStaticType to take a StaticTypeContext instead
of a TypeEnvironment.

The StaticTypeContext provides access to the TypeEnvironment and the
current 'this type' as well as determining the nullability state of the
enclosing library.

This change is needed to support nnbd types for getStaticType and also
serves as a step towards supporting caching during static type
computations to avoid repeated computations of the same (complex)
expressions.

Change-Id: Ied974dff7f6f7c3c8f262aa80c8dea5c674662f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124683
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-14 09:09:26 +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
Jens Johansen 2b94bd678d [CFE] Fix renames from test to suite and move of parser
Change-Id: Ica6b0acd8fe6acd32b4a6776cb3203cef8ff7210
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124990
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-13 09:26:47 +00:00
Johnni Winther d4f1512e00 [cfe] Support forEffect and readOnlyReceiver in IndexSet
Change-Id: I17aeac01ad4330fe873e7fe693fd2fd6e427d120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124986
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-13 08:50:57 +00:00
Jens Johansen b2fa458f3d [CFE] Support experiments in the incremental compiler tests
Change-Id: I36b7152abc0a9281801d2e1a5e68588d8c0e93a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124981
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-12 09:32:08 +00:00
Johnni Winther 4a661e19e2 [cfe] Remove type_promotion_look_ahead_listener.dart
This experiment isn't used.

Change-Id: I8a45283182e361f6fc69f586346e01913b83560a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124686
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-11 11:51:57 +00:00
Jens Johansen 12c92332f8 [CFE] Parser test can run scanner in non-nnbd-mode
Tests in the folder "non-nnbd" are run in non-nnbd mode.

Change-Id: I27c2acec93f729b76f024f12dcfb84f31903e0b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124688
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-11 11:43:07 +00:00
Jens Johansen 48f0b83ff2 [CFE] Allow ! in cascade
Fixes #39286.

Change-Id: I4e7270dacf7bc43accae4d45d26146cfb7d2b1ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124330
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-11 09:44:12 +00:00
Johnni Winther a7a54afbaa [cfe] Support failure log printing in unit_test_suites
Change-Id: Ibc0d81aaabcf2913ba97f242bbdc2d7968b1a5ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124682
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-11 08:31:52 +00:00
Johnni Winther 9c983d2ee3 [cfe] Support extensions via prefix
Change-Id: I6c1e69e5a5c83f5177754a350f5efbca9384972b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124540
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-11-08 19:53:00 +00:00
Jens Johansen 5eaccc20ba [CFE] Incremental test suite now has expect files
Change-Id: I704b87d56686cb282898511fb95d6b47ee9a1c9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124323
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-08 09:47:36 +00:00
Kallen Tu 54d7b0307b Refactor type_inference_engine and take type parameter variance into account for contra. checks.
This change will optimize code generation for contravariant checks on
variantly sound type parameters. We avoid emitting `_check()`s.

This will also add the change to ensure that reified types of torn off
methods are correct.

Change-Id: Ic7a4aa8f92b5e3489f7cd590070772358ef2c84b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124108
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-07 18:43:19 +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
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
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
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 523e9ffa88 [cfe] Add EqualsExpression, BinaryExpression, UnaryExpression and ParenthesizedExpression
Change-Id: Ida185b192c329f21979f6d5fbf39aa17ef1b9c0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123409
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-11-02 12:33:44 +00:00