Commit Graph

56224 Commits

Author SHA1 Message Date
Samir Jindel 7e64ddd00f [kernel/vm] Update closure conversion to work in Dart 2.
The change to vm.dart which turns it on by default will *not* be committed.

Change-Id: Ia3a80ff8e5335aa326f1ffaa9f5c9728ad511b60
Reviewed-on: https://dart-review.googlesource.com/51721
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-04-19 16:04:08 +00:00
Johnni Winther 6a8cad4877 Optimize RTI capture
Change-Id: I1b1b363de442e118ccb1e2018748a2ba7c5fe9e6
Reviewed-on: https://dart-review.googlesource.com/51642
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-19 16:00:28 +00:00
Lasse R.H. Nielsen fab5bef194 More upper-case constants found.
Change-Id: Ibce257b802d398612ad03e1d53014b82f9b9c54f
Reviewed-on: https://dart-review.googlesource.com/51881
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-04-19 15:08:18 +00:00
Dan Rubel 58dc646c85 Update parser recovery tests
Change-Id: Iab3523b61e878844e7e8ee296a7c4da289758028
Reviewed-on: https://dart-review.googlesource.com/51860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-19 15:05:58 +00:00
Lasse R.H. Nielsen 2eeea7bc30 Remove more usages of upper-case constants in SDK
Change-Id: I4e54ed7eba5f2af7852faba2cffae12f28e618cf
Reviewed-on: https://dart-review.googlesource.com/51844
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-04-19 13:31:57 +00:00
Johnni Winther 1f2f8be33a Add tests for closure/rti optimization
Change-Id: Iedf1d63cb7d87ecd87a059988b1fd95431aeab6a
Reviewed-on: https://dart-review.googlesource.com/51641
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-19 12:51:50 +00:00
Stephen Adams ec1186bc80 update dart2js --strong status
TBR=sigmund@google.com

Change-Id: I95eaeb3f38da163b7bfdbdca1cae4a40aca6b42a
Reviewed-on: https://dart-review.googlesource.com/51803
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-04-19 01:20:47 +00:00
Sigmund Cherem a5e5b7cd80 Minor changes to make dart2js strong-mode clean again
See https://github.com/dart-lang/sdk/issues/31623#issuecomment-381766327

Change-Id: I6aaa939d09ba6f69220f07d56b9fa864f3cb3b64
Reviewed-on: https://dart-review.googlesource.com/51700
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-18 23:57:51 +00:00
Vijay Menon b4d9c77d68 Make DDC sync-async behavior flippable either way
Step (1) to flipping the default.  When this lands and rolls in, we
can change internal code to explicitly opt-out.

See #32868

Change-Id: Ibd6fc08d6d71b0093decf5667e9b8cdc2b49e3d1
Reviewed-on: https://dart-review.googlesource.com/51444
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-04-18 22:54:03 +00:00
Konstantin Shcheglov 1b533921ce Use synchronous broadcasts for notifications about file changes.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32914
Change-Id: I18bdccdcbeb553fe7df5ddd062abd825999eae22
Reviewed-on: https://dart-review.googlesource.com/51702
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-18 21:25:03 +00:00
Zach Anderson 29e78adec8 [infra] Use a relative path for the Linux sysroot
This may help goma have more cache hits.

Change-Id: I44a4ea0d545798f6c7997af89970de9d69e3a6f4
Reviewed-on: https://dart-review.googlesource.com/51701
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-04-18 21:14:23 +00:00
Roland McGrath 29cc7884eb [gn][fuchsia] system_image is now deprecated_system_image
Change-Id: I05cac497a9705b6ea2c12ffbd88681537a8e9a39
Reviewed-on: https://dart-review.googlesource.com/51240
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-18 19:43:13 +00:00
Alexander 9d4514bb9e [release] Merge changelog from dev branch into master
TBR=whesse@google.com

Change-Id: Ib30ca03e2068ebe05a7f00902afcfe62c7ebbc4f
Reviewed-on: https://dart-review.googlesource.com/51663
Reviewed-by: Alexander Thomas <athom@google.com>
2018-04-18 18:50:35 +00:00
Samir Jindel 3a336893c4 Update status files for partial_tearoff_instantiation_test.
Change-Id: I3435f7215cbb17a286a588c41886c727ab8d42bb
Reviewed-on: https://dart-review.googlesource.com/51662
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-18 18:23:34 +00:00
Aske Simon Christensen 2b09c1efc0 Revert "Error on missing method implementation in non-abstract class"
This reverts commit 7cc55d0372.

Reason for revert: More test fixes needed.

Change-Id: Ib36159184ffbd14ce3f7cca184ce2b8cdfec237c
Reviewed-on: https://dart-review.googlesource.com/51680
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-04-18 17:27:22 +00:00
Aske Simon Christensen 7cc55d0372 Error on missing method implementation in non-abstract class
Closes https://github.com/dart-lang/sdk/issues/32013

Change-Id: I8f49d2640ef92a3d9d723969208cdb5f397e806d
Reviewed-on: https://dart-review.googlesource.com/43660
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-18 14:39:09 +00:00
Samir Jindel 4f18af12c7 [vm/kernel] Enable partial instantiation of local functions.
This change introduces some refactoring shared with the instantiate-to-bounds CL.

Change-Id: I65523e2542ba440205814779b7fc97e97a53a0d2
Reviewed-on: https://dart-review.googlesource.com/50980
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-04-18 14:33:39 +00:00
Samir Jindel 8aa36b75c5 Re-land "[vm/kernel] Fix non-canoncialized type arguments in partial instantiation."
Original revision is in Patchset 1.

Run against failing kernel-precomp tests in "cl-linux-try".

Change-Id: I997de294150ef7dd0874eeccb8b6187ae64ea813
Reviewed-on: https://dart-review.googlesource.com/51220
Reviewed-by: Erik Corry <erikcorry@google.com>
2018-04-18 13:44:25 +00:00
danrubel 17d7f23e71 Improve fasta parser conditional import recovery
Change-Id: I5479078d8d2c3de10b74ed04001fdd852a427c5c
Reviewed-on: https://dart-review.googlesource.com/51561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-18 11:04:19 +00:00
Aske Simon Christensen 9988941a37 Rewrite Dart SDK file URIs in test expectations.
Solves problems with absolute Dart SDK file URIs appearing in
expectations files, causing incompatibility between local runs and bots.

Change-Id: I75c5a167834503fa6ffea3b34f6d647e78a46adf
Reviewed-on: https://dart-review.googlesource.com/50700
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-04-18 10:55:49 +00:00
Konstantin Shcheglov 5990a51456 Optimize computing exported namespaces in prelinker.
Similar to https://dart-review.googlesource.com/51442, we compute
export namespaces recursively and remember full export namespaces
when there are no cycles.

This makes Flutter analysis about 8% faster.

Before: 59.8 60.0 59.4
After:  55.2 55.3 55.1 55.6 55.4

R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Id78aae1ff475e4386e5a01a01b92f0768a0cd4aa
Reviewed-on: https://dart-review.googlesource.com/51582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-18 01:11:28 +00:00
Dan Rubel 8e812ddaa5 Pass modifiers in beginFormalParameters event
This CL updates the beginFormalParameters event to include
the covariant and const/final/var modifiers, and cleans up
a number of unused classes and methods including:

* the original implementation of ModifierContext/Recovery
* handleModifier and handleModifiers events

Change-Id: Ie89a202d17872fba85cd1a477091472a8d2d223b
Reviewed-on: https://dart-review.googlesource.com/51380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-17 20:27:37 +00:00
danrubel 0fabb9df42 Move dottedName identifier recovery to IdentifierContext
Change-Id: I7cf764d0bac99f08549e2b399e9a307345ea06e0
Reviewed-on: https://dart-review.googlesource.com/51560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-17 20:18:38 +00:00
Jenny Messerly b62276d97f fix DDC SDK implementation JS type annotations to work with CFE
This migrates the JS builtin's string type to the `<T>` type parameter
for a few more cases. This was done to eliminate null checks, casts and
dynamic calls when dartdevk builds the SDK, so it matches dartdevc.

Change-Id: I8570e5127149a45289a90002c27034333c3038ad
Reviewed-on: https://dart-review.googlesource.com/51207
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-17 19:29:40 +00:00
Dan Rubel 9e3d94ba94 Move class name recovery into ClassOrNamedMixinIdentifierContext
Change-Id: I608c6a0a9f22cbfaf3a5193c0d57c628768475da
Reviewed-on: https://dart-review.googlesource.com/51480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-17 19:01:17 +00:00
Jenny Messerly a3e8a6db98 fix DDC mocks for undefined optional parameters
This reverts part of https://dart-review.googlesource.com/c/sdk/+/48940
while keeping the fix for named arguments. The cleaner fix from that CL
doesn't work for some obscure uses of mocks and optional parameters and
interop scenarios.

Change-Id: I7d7e7ed50574401a70f720a1b4c15578854b2297
Reviewed-on: https://dart-review.googlesource.com/51422
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-17 18:18:47 +00:00
Konstantin Shcheglov 71ca507d3d Fix for 'Extract Widget' refactoring test on Windows.
R=brianwilkerson@google.com

Change-Id: Ibcc2e7a1d080c46168675d62ac9f0462e7d2cad0
Reviewed-on: https://dart-review.googlesource.com/51540
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-17 18:17:21 +00:00
Jenny Messerly e22e3a1884 fix DDC's REPL support functions
these are used by the debugger extension code

Change-Id: If5b9d1aca38fa2f120580d2dbfd02523c6eaa5cf
Reviewed-on: https://dart-review.googlesource.com/51440
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-17 18:15:49 +00:00
Jenny Messerly 5474ce01d5 fix DDC lazy function tagging (used for mirrors) and tearoffs
It's possible for `dart.fn` (tearoff) to be called after `dart.lazyFn`,
so lazyFn needs to support a setter.

Change-Id: Iaba1a1d6145d94501c77de6a6a2c107eac2d92d7
Reviewed-on: https://dart-review.googlesource.com/51441
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-17 18:03:28 +00:00
Brian Wilkerson b936ffb329 Move several libraries out of the public API
Change-Id: I8259de00134310f25b1c6168940aea5190488999
Reviewed-on: https://dart-review.googlesource.com/51443
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-17 17:35:27 +00:00
Zach Anderson 3ac1ee9150 [infra] Removes ninja.py
build.py was only forwarding to ninja.py, so this CL just copies
ninja.py over build.py and removes ninja.py.

Change-Id: I7b13c8fb17dbc05825c35b3d806cd950bf1b953e
Reviewed-on: https://dart-review.googlesource.com/51520
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-04-17 17:05:27 +00:00
Garret Kelly 7ff1a22d3d Call zx_port_{wait,queue} with correct count
In the near future zx_port_{wait,queue} will not accept a count of zero.
Change all callers to call these functions with a count of one.

Change-Id: If37933344e07b96f07504e2837c0c12133a7cb4e
Reviewed-on: https://dart-review.googlesource.com/51500
Reviewed-by: Zach Anderson <zra@google.com>
2018-04-17 15:53:08 +00:00
Kevin Millikin dff3b8f301 Remove MethodInferenceNode
During top-level type inference, method types are inferred
immediately.  There is no need to have MethodInferenceNodes which
exist for the purpose of delaying type inference.

Change-Id: I0044ab64a31e43ca807db75631ee8fa259c07a22
Reviewed-on: https://dart-review.googlesource.com/51320
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-04-17 12:49:17 +00:00
Peter von der Ahé aaff238f8f Use import URIs when invalidating files
Change-Id: Ie260454127e39141bd02578d2511131ea30a2088
Reviewed-on: https://dart-review.googlesource.com/48180
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-04-17 11:36:57 +00:00
Kevin Millikin e7a7ad89df A pair of simple cleanups in top-level inference
Create a single return in ForwardingNode._finalize to make it easier
to inline and specialize.  Use for-in instead of raw iterator methods
in MemberInferenceNode._matchTypes to make it more obvious.

Change-Id: Ie35618fa57db41b8bc070d9cbed46bb717399605
Reviewed-on: https://dart-review.googlesource.com/51300
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-04-17 10:08:37 +00:00
Jens Johansen 16696ca9d5 Cleanup in incremental compiler test
Address comments from https://dart-review.googlesource.com/c/sdk/+/49642.

Change-Id: I80bc2f851d5f65b81d9e44e2c412f2b0b2d208c2
Reviewed-on: https://dart-review.googlesource.com/50200
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-17 09:39:46 +00:00
Jens Johansen f9516e0c98 Forgo bit-perfect result in incremental compiler.
This CL removes the library sorting the produces a (more) bit-perfect
result when initializing from a dill file.
In general it is not needed, and was only added to satisfy tests,
but sorting is now done in the tests instead.

Change-Id: I71e968720439ab6dacd07e6039990915ce4c1286
Reviewed-on: https://dart-review.googlesource.com/49162
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-17 09:26:50 +00:00
Jens Johansen 446463afb3 Cleanup in incremental compiler
This is the 2nd attempt.
First attempt was committed as 5367304ba5
but was reverted as 2676c132cb
This attempt forgoes the "handles change package versions" as it creates
problems for flutter. A subsequent CL the handles it better will be
created later.

This CL addresses comments from previous CLs, mostly renaming variables.

Fixes #32776.

Change-Id: I634056069d3e8c3e41ba349ccd0fe5ffa5f99458
Reviewed-on: https://dart-review.googlesource.com/49510
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-04-17 08:49:22 +00:00
Danny Tuppeny 1855c6ef27 Increase analysis server version to 1.20.1
So clients can detect when the workaround for #29414 is not required.

Closes #32902
https://github.com/dart-lang/sdk/pull/32902

GitOrigin-RevId: e6476b24b905fa718f94516d8ca28dafdc5aa38b
Change-Id: I3aafb29ad5ad92962dfd79373842159deb5994b6
Reviewed-on: https://dart-review.googlesource.com/51400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-04-17 08:11:31 +00:00
Konstantin Shcheglov fcb4c671b0 Optimize computing exported namespaces in FileState.
Instead of chasing exports in each FileState library individually, we
perform recursive computation, and remember computed export namespaces
for visited branches. Cycles require special handling - we don't
remember partial namespaces, we compute one full export namespace and
so break the cycle; then the rest also can be computed in one pass.

This makes Analysis Server a bit faster for some Quick Fixes, and
what is more important, is a playground to test the idea of makeing
the similar change to _Prelinker. We spend 8% of total analysis time
chasing long chains of exports in Flutter.

R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Ia45cff9a7fb24aac2e72fe50752274b764462017
Reviewed-on: https://dart-review.googlesource.com/51442
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-17 04:45:58 +00:00
Jenny Messerly 051aba12d8 fix DDC getter/setter mirror support for metadata
Change-Id: If424ffe61114da68baf4aeb8536bdc29a1ddf5a6
Reviewed-on: https://dart-review.googlesource.com/51420
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-16 23:13:21 +00:00
Brian Wilkerson 5460ddbab5 Move three more libraries out of the public API
Change-Id: I8e6aeaea35c739fb26e22ffcfc30a343ebbb5424
Reviewed-on: https://dart-review.googlesource.com/51363
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-16 22:15:28 +00:00
pq 92a3fd7ffd Bump to latest linter (0.1.48).
* new `avoid_field_initializers_in_const_classes` lint
* miscellaneous documentation fixes
* improved handling of cascades in `unnecessary_statements`
* new `avoid_js_rounded_ints lint`

Change-Id: I0b1e78432404dd1946e187bff88c56342dacfe73
Reviewed-on: https://dart-review.googlesource.com/51364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-16 21:43:26 +00:00
Alexander Aprelev fe606f890b Revert [vm/compiler] Canonicalize more intermediate constants in IL.
Original commit: https://github.com/dart-lang/sdk/commit/5909932d38e12c461f4e15cad0e6ea21031a0fc8

This seems to be causing OOM on some tests.

Bug: https://github.com/flutter/flutter/pull/16518#issuecomment-381677415
Change-Id: Ie4fd924e70b22e4634c07f830beecca86b17a4d3
Reviewed-on: https://dart-review.googlesource.com/51381
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-04-16 21:21:13 +00:00
Natalie Weizenbaum 54531ad4e7 Bring in the latest pub_semver
Change-Id: Icb7419e0922c9bf8a794a324c4da15f1da0e3074
Reviewed-on: https://dart-review.googlesource.com/51200
Reviewed-by: Gary Roumanis <grouma@google.com>
Commit-Queue: Natalie Weizenbaum <nweiz@google.com>
2018-04-16 21:14:59 +00:00
Ryan Macnak 61b15fede8 [build] Remove unnecessary inputs from uses of application_snapshot.
These dependencies are tracked via a depfile generated along with the snapshot.

Change-Id: I4245a982212a5aff28aea8456d0219808df54af0
Reviewed-on: https://dart-review.googlesource.com/51245
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-16 21:13:09 +00:00
Devon Carew 9968728df1 Remove package:cli_util deps from package:analyzer.
Change-Id: I6bda63e31b9a8eb3e7ede406bd7e3e5748130ff6
Reviewed-on: https://dart-review.googlesource.com/51362
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-04-16 20:26:08 +00:00
danrubel 0ca8b6e5be Improve recovery when "assert" is used in an expression
Change-Id: I01e8c6fbe0faf6ce6ded32b2cfa1ec034f22588d
Reviewed-on: https://dart-review.googlesource.com/51341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-16 20:20:49 +00:00
Jenny Messerly 6de5da1f58 fix #32649, add an option to disable asserts in DDC/K
Change-Id: I1cd4c3a568fb2721be04199ed404835f949e1084
Reviewed-on: https://dart-review.googlesource.com/51360
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-16 20:17:30 +00:00
Konstantin Shcheglov afbaf0c4a6 Add 'Extract Widget' to getAvailableRefactorings().
R=brianwilkerson@google.com

Change-Id: Ieb6faa63de75d64edd317bf8b5276f775c634e3c
Reviewed-on: https://dart-review.googlesource.com/51361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-16 20:13:08 +00:00