Commit Graph

6018 Commits

Author SHA1 Message Date
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 d290f1cec2 Add nonfunction-type-aliases experimental flag
Change-Id: I203af5227ecfee8c9e6b0f4985f68e38a18553c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125203
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-15 17:04:15 +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 8e176998b4 [cfe] Support late lowering of instance fields
Change-Id: I9e9261efa9c0b09aa95a083496e8073c56498a38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124987
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-11-15 13:29:45 +00:00
Johnni Winther 09d75d94e7 [cfe] Avoid use of #isSet# field on non-nullabel late fields
Change-Id: I8dd77ee3eb1401ab29c87d303bdcface1d4d823e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124691
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-11-15 13:29:45 +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 49aaed295f [cfe] Refactor field type inference
This prepares for late field lowering by decoupling the field type of a
FieldBuilder from the type of FieldBuilder.field.type.

Change-Id: I0c38f6cb473db81c7fa72c617dadc3563ab12eb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124660
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-11-15 13:29:45 +00:00
Sigmund Cherem a75ffc8956 Add non-NNBD language version marker to all sdk (non-nnbd) files
This is practically a copy of the change in
https://dart-review.googlesource.com/c/sdk/+/118040 but applied to the non-nnbd
sdk.

Even though there is no intent to run the non-nnbd sdk with the non-nullable
experiment, we need to add this annotation because of how we
intend to gradually start testing NNBD. The libraries.json under
sdk_nnbd is allowed to point to libraries under the non-nnbd sdk in order to
temporarily build without errors until all patch files are migrated and all CFE
issues are addressed.

Change-Id: I53c1123a8d86c10695832a8a0ad35adb7b4d92fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125181
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-11-15 00:22:47 +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 6e85f3337a [cfe] Support null-aware cascade
Change-Id: I1db4125b4469e6a8b6adc5ec6e4dcafc0a26da4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124680
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-14 12:39:16 +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
Martin Kustermann 7a0d9455e4 [vm/aot] Ensure interface targets are re-resolved after deduping of mixin application classes
When the CFE compiles an application as a whole (reads in all source
code), the interface targets to members of mixin applications are the
original mixin classes.

When the CFE compiles an application modularly (dependencies are
supplied as kernel files), the interface targets to members of mixin
applications are the copied members in the mixin application classes.

This slight difference does not surface in any test failures. Yet if we
start running our AOT kernel pipeline, we will deduplicate the mixin
application classes. This leaves dangling references (with no target).

The C++ AOT compiler, `gen_snapshot`, will crash if it hits any of
those.

Issue https://github.com/dart-lang/sdk/issues/39375

Change-Id: I17a57370a87cfbdc174829c2e68ecdb7c4a9757e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124993
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-11-13 20:03:04 +00:00
Robert Nystrom cd22f16f0b Fix crash when building //utils/dartdevc:dartdevc_kernel_sdk.
That build step still *fails* because of other static errors in the
migrated corelibs + patch files, but it no longer *crashes*.

Change-Id: Ia763a13bd45cecb148e02ce22d4ed2cc6fdfdfa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125002
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-13 10:34:29 +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 7ebc820ffc [CFE] Also guard _extensions for LazyScope
Change-Id: Iaf55ad1602d6c6f70cc56899114e668de199c471
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124982
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-12 12:06:58 +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
Jens Johansen cf2a474438 [CFE] Fix incremental serialization bug caused by missing parameter passing
When implemention the incremental serializer, I forgot to pass it on in
the incremental kernel generators "IncrementalKernelGenerator.fromComponent"
and only did it in "IncrementalKernelGenerator", meaning that when using
"IncrementalKernelGenerator.fromComponent" the incremental serializer wasn't
used properly, namely nothing got invalidated.
Now it gets passed correctly, things get invalidated and everything should
be fine.

Fixes https://github.com/flutter/flutter/issues/44384.

Change-Id: Ic2e7f7330dc6ee62dd8e7bf6684d7bee8ee328bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124684
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-11 09:40:42 +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
Johnni Winther fd9f79c25d [cfe] Handle deferred explicit extension access
Change-Id: I53e13ac3b4f1bdcd26ccec86814fb4d708c5cceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124542
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-08 14:19:47 +00:00
Jens Johansen ee2efe8e58 [CFE] Add more incremental compiler tests, prepare for better invalidation strategy
Change-Id: I94a61b1fa9bab466a7fc09d873fc75dea6b3aeb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124324
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-08 09:55:26 +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
Jens Johansen 8a1c328852 [CFE] Don't save and reset Library.isExternal for modular incremental compilation
Change-Id: I4fb1a7eb66717c856ee6eeb9ee5e06408931bd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123728
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-07 13:37:17 +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 6d7cfa2a72 [cfe] Verify nullabilities correspond to opted-in status of the library
Most types in opted-out libraries should be legacy (with few exceptions,
such as Null or dynamic).  All types in opted-in libraries should not be
legacy.

Change-Id: Ib595eeae0e76cdbf53ffd92313d429d8381f9786
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124320
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-11-07 12:21:46 +00:00
Jens Johansen ea9242c0ca [CFE] Refactor InferenceVisitors defaultExpression switch
Remove the switch; create a acceptInference implemented by all the
InternalExpressions instead.

Change-Id: Ib58362fee88e5dde8f1331b51e9eece209936f6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124321
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-07 12:02:46 +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
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 37d14ad2ce [ddk] Don't use Library.isExternal (second try)
We're deprecating kernels Library.isExternal as it wasn't used for
what it was originally intended. It will hopefully go away entirely
soon.

This reverts commit 689447d0fb and fixes
the reason for the revert.

Change-Id: I122b5b777a2bf7316fde48e034fa3c566458a0cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124133
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-06 10:05:07 +00:00
Jens Johansen fe3afde2eb [CFE] Parser: Don't report (recovered) operator as endClassConstructor
Before this CL any method with initializers would be ended with a call
to listener.endClassConstructor.
If we know it's an operator, though, we shouldn't: The listener has
most likely created a specific operator name and should't call it a
constructor.

Bug: 39230
Change-Id: I6ee79ba1907cb3932c461e0b00937af23b5b5edb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124121
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-06 09:42:37 +00:00
Johnni Winther e1f19de968 [cfe] Add MemberBuilder.read/write/invokeTarget
Change-Id: Ib0cb9bc8059bfca2558b5a6828fc24109a404c79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124126
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-06 07:27:47 +00:00
Johnni Winther 239ff1408d [cfe] Add MemberBuilder.buildMembers
This generalizes the support for building several members from a single
MemberBuilder. This is needed to support late-field lowering directly
in the body builder.

Change-Id: Ifa3136dff461528667ca0a09410fc43cb4d6de83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123736
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-11-06 07:27:47 +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
Kallen Tu 9ba71b0fdd Modify local inference to generate constraints with respect to variance.
Change-Id: Ia746ea1bb37736d06a5e478f1fddf3e985eb16a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123560
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-05 17:54:13 +00:00
Vijay Menon 689447d0fb Revert "[ddk] Don't use Library.isExternal"
This reverts commit 48ebcdac5f.

This is breaking on internal code.

Change-Id: I9a89267d57b7cbfe94a023ca99e919cfa4ba4573
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124162
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-11-05 16:15:15 +00:00
Johnni Winther d635bdd49c [cfe] Move variance tests to general/
Change-Id: I1d2c48cf96f18a63563a01fe418e3e331061299f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124129
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-05 15:02:31 +00:00
Jens Johansen 48ebcdac5f [ddk] Don't use 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: I3a4537ab566152555095df7461516f110a533896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123722
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-11-05 08:37:51 +00:00