Commit graph

55346 commits

Author SHA1 Message Date
Alexander Thomas 03ca45c0a8 [release] Merge changelog corrections from dev branch
Change-Id: I11bf3b4dde2b62d1f52bcb512311832ef97a54fb
Reviewed-on: https://dart-review.googlesource.com/53005
Reviewed-by: Jonas Termansen <sortie@google.com>
2018-05-01 08:38:33 +00:00
Johnni Winther 54b8ebd992 Support js-interop classes that implement generic types in Dart 2
This adds a special RTI representation for a type argument of a
(supertype of a) js-interop class, which effectively is the Dart 1
`dynamic` type.

Closes #32969

Change-Id: Ifd92b3fc6779d96d354ad929bd7c07a349299ae6
Reviewed-on: https://dart-review.googlesource.com/53002
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 08:37:11 +00:00
Johnni Winther 20c7725954 Handle deferred constant instantiations
Closes #32997

Change-Id: I31661bb223ca9d9bdee2e7cabe4e62bf18e87509
Reviewed-on: https://dart-review.googlesource.com/53007
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 08:31:01 +00:00
Alexander Thomas 95338ced3a [infra] Sort CQ builders in config
Change-Id: I798b6c9cd214b86eec11645239844209f6f4edb8
Reviewed-on: https://dart-review.googlesource.com/53020
Reviewed-by: Jonas Termansen <sortie@google.com>
2018-05-01 08:27:52 +00:00
Ryan Macnak cff0e751a5 [vm] Add Dart_NewExternalTypedDataWithFinalizer.
Allows the finalizer to be associated with the correct object when creating ByteData. The finalizer should be associated with the underlying ExternalUint8List, since it can outlive the ByteData via byteData.buffer.asUint8List()

Bug: b/78150644
Change-Id: I3db58792bbe3abf7ed41d2adaf225fa554b8fb25
Reviewed-on: https://dart-review.googlesource.com/52860
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-01 01:57:41 +00:00
asiva b64f2acfb9 Revert "[VM] Improve code generation for uint32"
Please see issue https://github.com/dart-lang/sdk/issues/33008 for more
details on the regression caused by this commit.

This reverts commit 9741c220f3.

It also effectively reverts

https://dart-review.googlesource.com/c/sdk/+/53006
https://dart-review.googlesource.com/c/sdk/+/53001

which were follow up CLs to the main commit.

Change-Id: Iac399c620a312ab3c3b27a3cba4e681742bcfe33
Reviewed-on: https://dart-review.googlesource.com/53164
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-05-01 00:25:01 +00:00
Bob Nystrom 26cf0d559c Roll dart_style to 1.0.12.
This has no formatting changes, so is safe to roll without coordinating
with a new prebuilt SDK.

Change-Id: If8b966a7fd402909f82aa016ee9958672a275e8b
Reviewed-on: https://dart-review.googlesource.com/53161
Reviewed-by: Natalie Weizenbaum <nweiz@google.com>
2018-05-01 00:05:21 +00:00
Stephen Adams 1f6f9adb6c dart2js co19 status bingo
TBR=sigmund@google.com

Change-Id: I7f6e1a3e3f80cab42102e1cefa9238ba6b94f6df
Reviewed-on: https://dart-review.googlesource.com/53165
Reviewed-by: Stephen Adams <sra@google.com>
2018-04-30 23:40:38 +00:00
Bob Nystrom 9d34963947 Stop ignoring explicit ("as") cast failures on all but function types.
Change-Id: Ia421cce7bab4fe9c74775b5bf2474901475cfa89
Reviewed-on: https://dart-review.googlesource.com/53160
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-30 23:05:24 +00:00
Stephen Adams d6a3b85ed2 Use factory methods for async/sync*/async* transforms
The static methods allow type parameters to be registered,
but this means that the type parameters will be dropped unless in strong mode.

Change-Id: I91c1977c287c14742df7d59b988e64ddc46f794d
Reviewed-on: https://dart-review.googlesource.com/52870
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-30 22:32:56 +00:00
Jenny Messerly 2df8db486d fix #30184, private symbols in DDC
Change-Id: I77fe11b49b3f19b0241c8e08c313cb051c4d019b
Reviewed-on: https://dart-review.googlesource.com/52281
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-30 21:20:40 +00:00
Ryan Macnak 82bf4bb135 [vm] Fail gracefully when a snapshot is loaded without the proper alignment.
Change-Id: Ie9164d54cbea08d0da5b36bfc36ef1a3e7a46b0b
Reviewed-on: https://dart-review.googlesource.com/53122
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-30 21:12:41 +00:00
Ryan Macnak 265ab831b6 [vm] Partial fixes for LTO.
Change-Id: Ic867777a7fc5df6631ce11030195d1323d7111ed
Reviewed-on: https://dart-review.googlesource.com/52983
Reviewed-by: Zach Anderson <zra@google.com>
2018-04-30 19:23:58 +00:00
Janice Collins 6d9371aec3 Prepare for analyzer-0.31.2-alpha.2
Change-Id: Ib428b7316633bb77978428a17956bc05e736d57d
Reviewed-on: https://dart-review.googlesource.com/52981
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-04-30 17:56:31 +00:00
Konstantin Shcheglov b7d8ae30e2 Change 'Extract Widget' to generate named constructor parameters, with 'key'.
R=devoncarew@google.com, paulberry@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2166
Change-Id: Ie698dc27a1328b7e18e92f46583f84c22c84de57
Reviewed-on: https://dart-review.googlesource.com/53060
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-30 16:49:00 +00:00
Konstantin Shcheglov b4a2259b5f Enhance DartEditBuilder.writeConstructorDeclaration() to support parameter/initializer/bodyWriter.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: If6be2f3e095ae03355c04ea3f6a8524e478c1552
Reviewed-on: https://dart-review.googlesource.com/52989
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-30 15:56:19 +00:00
Samir Jindel 69f35c18bc Test code for CFE expression compilation.
Change-Id: I90f953592d66be04bfb26ffb5f604ba5e7f010a5
Reviewed-on: https://dart-review.googlesource.com/51322
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-04-30 15:33:11 +00:00
Vijay Menon 001af89c8e Flip DDC to default to sync-async
See #32868

Change-Id: I757321632c9f383edea398741c67fc7c3e3815e5
Reviewed-on: https://dart-review.googlesource.com/52900
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-30 15:04:51 +00:00
Martin Kustermann a31d24dbd8 [vm/kernel] Add a knob to constant evaluate annotations only conditionally
This "knob" to turn off constant evaluation for annotations is required
because the TFA transformation leaves annotations in a state where they
cannot be evaluated anymore.

Change-Id: I7720a07ef42ff69834e24a856613ea2e846b4f2d
Reviewed-on: https://dart-review.googlesource.com/52803
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-30 13:34:35 +00:00
Dmitry Stefantsov 5af05d407d [fasta] Report type argument number mismatch during outline building
Change-Id: I1c1f22f3117ccbfc8620b3b0459bc96ed1ad1bdf
Reviewed-on: https://dart-review.googlesource.com/51128
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-04-30 13:01:15 +00:00
Erik Corry 9eea773342 [VM] Remove assert code accidentally left in release
R=vegorov@google.com

Change-Id: I78e4fc35f1153b333a8fdc340ea78199f9cc6b27
Reviewed-on: https://dart-review.googlesource.com/53006
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-30 11:38:53 +00:00
Martin Kustermann 4697e3c8f6 [vm/kernel] Change "constants" kernel2kernel transformation to be able to recover from errors
Instead of simply throwing an exception when a compile-time error was
discovered during constant evaluation, we report the error and continue
transforming.

This also collects a context, which can be used by error reporters to
show users in which context an error occured.

The reason for using an interface for reporting errors is to be able to
report reasonable nice error messages, keep the transformation inside
package:kernel and allow users of the transformation to possibly report
nicer error message, e.g. by adding quotes of source positions (which
will come in another CL). This makes it slightly verbose.

Change-Id: I965cafc690dddb525b20368d03bb978e18a6ee58
Reviewed-on: https://dart-review.googlesource.com/52447
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-30 11:27:55 +00:00
Martin Kustermann 690b4f793b [VM] Be more defensive against constants coming from vmservice library (if we skip it)
Change-Id: I23900daadf030dcf46cec11008ec15e43245040f
Reviewed-on: https://dart-review.googlesource.com/52804
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-30 10:57:45 +00:00
Alexander Thomas c164f92397 [release] Prepare CHANGELOG.md for 2.0.0-dev.51.0
TBR=sortie@google.com

Change-Id: I63f807c3e12ddd4f704400f7f7e2052c56415055
Reviewed-on: https://dart-review.googlesource.com/53003
Reviewed-by: Alexander Thomas <athom@google.com>
2018-04-30 07:40:01 +00:00
Erik Corry a8b0a1a5fa [VM] Except SIMDBC from change for x64 and ARM64
R=vegorov@google.com
TBR=vegoroc@google.com
Change-Id: I1ddb72e0de13400d57dd6ca0a551a7273c4dea24
Reviewed-on: https://dart-review.googlesource.com/53001
Reviewed-by: Erik Corry <erikcorry@google.com>
2018-04-29 18:15:03 +00:00
Erik Corry 9741c220f3 [VM] Improve code generation for uint32
Simplify by no longer using the signed unboxed int32 type on
64 bit platforms.

R=vegorov@google.com

Change-Id: Ic8eab7308f2ce01e5618344f50f72b95ce13a0dc
Reviewed-on: https://dart-review.googlesource.com/52762
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-29 12:41:43 +00:00
Erik Corry 580315af53 [VM] Fix bad assert in compactor that triggers on Mac
R=rmacnak@google.com
TBR=rmacnak@google.com

Change-Id: Ia9a783d7b8870b5482ff797487046e6ebea4eb3d
Reviewed-on: https://dart-review.googlesource.com/53000
Reviewed-by: Erik Corry <erikcorry@google.com>
2018-04-29 11:04:53 +00:00
Dan Rubel 2e19e275e8 Update status file
Change-Id: I661e46a1b6ff2f42d32c3e17a3292b8412c95fc3
Reviewed-on: https://dart-review.googlesource.com/52922
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-04-29 00:57:32 +00:00
danrubel 663a9f2b32 Update status file
Change-Id: Icfa3c31900391a456e5ddb376c148674bebfe4ad
Reviewed-on: https://dart-review.googlesource.com/52921
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-04-28 21:27:59 +00:00
Dan Rubel 79a15f52bf Fix isValidMethodTypeArguments
Change-Id: I3c4bb8dc981c285b8ecfad7dcd7dc849ed1bda7b
Reviewed-on: https://dart-review.googlesource.com/52920
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-28 18:10:06 +00:00
Ryan Macnak 32f10d6f7a [test] app_snapshot_share_test cannot run on Android.
The device running the test doesn't have dart_bootstrap or the SDK tree.

Change-Id: Ifb8047c6ddbc8d9d7fd5d0b728ab5ee732403bfc
Reviewed-on: https://dart-review.googlesource.com/52987
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-28 00:30:54 +00:00
Ryan Macnak aee4561882 [vm] Remove dependency of platform/assert.cc on vm/profiler.h
Change-Id: Ieab84b164ed620d5edca06e3c7b63b33bdcd6569
Reviewed-on: https://dart-review.googlesource.com/52943
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-27 23:30:48 +00:00
Bob Nystrom 162d6c3b0c Turn label negative tests into multitests.
Found two mistakes in the tests:

- label2_negative_test had no labels whatsoever.
- label8_negative_test called an undefined function, doAgain().

Change-Id: I4d17c969a2b1422ff96cf68996225ecaaf5fe829
Reviewed-on: https://dart-review.googlesource.com/52868
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-27 23:14:17 +00:00
Bob Nystrom 881e35ee82 Migrate library_negative_test.
In the process, I discovered multitests can't handle imports to
non-existent libraries. So I fixed that and cleaned up the code.

Change-Id: I9a8557e84f91ba7858bdf98f8732cd0ded55aa1a
Reviewed-on: https://dart-review.googlesource.com/52869
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-27 22:28:27 +00:00
Sigmund Cherem 594aaf57f4 Fix status of isolate test
This test "passes" now that sync-async is enabled by default because the test
completes before it gets a chance to fail.

TBR=sra@google.com

Change-Id: I4e8aaade6b618ab8cd79fbfff354dc99214feb27
Reviewed-on: https://dart-review.googlesource.com/52982
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-27 22:15:57 +00:00
Leaf Petersen 0b8734acb2 Fix some erroneous errors associated with returns in void functions.
Fixes https://github.com/dart-lang/sdk/issues/32443 .

A separate CL with language tests for a super set of the errors covered by this CL is in progress.

Change-Id: I1a0f6a6a347f75b8e332c8bfccf8fbbd32f20efe
Reviewed-on: https://dart-review.googlesource.com/52980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-27 22:08:09 +00:00
Mike Fairhurst f22cdd8def Revert "Change completionTarget.forOffset to accept & wrap dangling AstNodes."
This reverts commit fbfe5691cb.

Reason for revert: Subtle backwards incompatibility, with no obvious win-win fix.

Original change's description:
> Change completionTarget.forOffset to accept & wrap dangling AstNodes.
>
> Deprecate the entryPoint parameter, but still accept it in place of what
> used to be (positionally) compilationUnit.
>
> Detect if we have a compilation unit or not; and in the case we don't,
> add a new protection by asserting that it has no parent (its the root of
> the dangling tree).
>
> Its more of an implementation detail that completion contributors don't
> work well on dangling nodes, so fix it up for clients rather than
> expecting them to do it themselves.
>
> Change-Id: I3e454734e5b515f4e536f7229d541ca8c6aed60c
> Reviewed-on: https://dart-review.googlesource.com/52645
> Reviewed-by: Paul Berry <paulberry@google.com>
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>

Change-Id: I64a6689f7862fb2d256b348491c79c58ee0fe1a9
Reviewed-on: https://dart-review.googlesource.com/52962
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-04-27 21:23:06 +00:00
Ryan Macnak c354caa80d [vm, fuchsia] Build the VM as a shared library instead of a static library.
Change-Id: I791063fb0e32d56ca04de09486b41e4e98450c92
Reviewed-on: https://dart-review.googlesource.com/34304
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-27 21:14:37 +00:00
Konstantin Shcheglov c17ef848d6 Don't try to add new imports before leading comments of another import.
By doing this we tried to fix keeping "// ignore: xyz" correct.
https://github.com/dart-lang/sdk/issues/32432

Unfortunately this breaks a more often case, when there is a license
comment before the first import directive, and there is no reliable
way to decide if a comment is a license or not.

R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2169
Change-Id: Id5bdf7af48bd0b8748a53f8c5b3eb79ac2d6ae01
Reviewed-on: https://dart-review.googlesource.com/52940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-27 20:59:09 +00:00
Sigmund Cherem 239b2fd090 move changelong entry
TBR=vsm@google.com

Change-Id: I0c50ae409124be8ea27e8533a17d5841dc135d68
Reviewed-on: https://dart-review.googlesource.com/52960
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-27 20:07:55 +00:00
Sigmund Cherem 3c9d0858b0 dart2js: turn on sync-async by default
Closes https://github.com/dart-lang/sdk/issues/32869

Change-Id: I79b2d02d13adccdfbbd3a78158805244aceff7de
Reviewed-on: https://dart-review.googlesource.com/52061
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-27 19:48:46 +00:00
Ben Konyi 60f807baa5 [ VM / Hot-Reload ] Updated vm.status with more descriptive issue numbers.
Change-Id: I4d80ad745262aa81645dccccbfc43b874df1c213
Reviewed-on: https://dart-review.googlesource.com/52660
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-27 18:30:06 +00:00
Konstantin Shcheglov e44bc903e0 Remove UnitLintRule.
R=brianwilkerson@google.com

Change-Id: Ib89333a6afc6a4785eff47ee3433c9e0dc8a5a40
Reviewed-on: https://dart-review.googlesource.com/52883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-27 17:51:26 +00:00
Ryan Macnak 0cc70c4a7c [vm] Support for sharing parts of an app snapshot.
In addition, this removes support for seeding the VM isolate snapshot with Instructions and referencing those Instructions in the isolate snapshot. This was leftover from an earlier experiment to share Instructions between a Core-JIT snapshot and App-JIT snapshots. Removing this reclaims the sign bit on Instruction offsets.

Add missing cases to TypeTestingStubFinder::StubNameFromAddresss.

Change-Id: Ie87216b4e284db1dc3eddb12f38ddbe8a841d312
Reviewed-on: https://dart-review.googlesource.com/50620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-27 17:42:16 +00:00
Alexander Aprelev cd0c4e4fe1 Kernel service just returns errors. Leaves printing to the VM.
Bug: https://github.com/dart-lang/sdk/issues/32976
Change-Id: I797adc8d6db02441d8ffa0972cd6f1be051efa6a
Reviewed-on: https://dart-review.googlesource.com/52882
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-04-27 17:17:28 +00:00
Paul Berry 010d8144bc Add missing copyright notice
Change-Id: I1283a9536c6ddad3c99e644cd8619e7202cfc5f6
Reviewed-on: https://dart-review.googlesource.com/52880
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-04-27 17:06:09 +00:00
Konstantin Shcheglov 70547d8197 Change linter subscriptions from functions to AstVisitor(s).
The performance I see is similar to using functions.

R=brianwilkerson@google.com

Change-Id: Ib5f675f07b422bd9e6f28df0f9d7ea8b24669f63
Reviewed-on: https://dart-review.googlesource.com/52881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-27 16:51:47 +00:00
danrubel 88a098c71c Improve fasta parser field name recovery
Change-Id: I3a27b765df7543eda56c8ef691d6a3192a2769f1
Reviewed-on: https://dart-review.googlesource.com/52621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-27 11:58:30 +00:00
Jenny Messerly bd76221d58 fix #31489, JS interop to prototype getter in dartdevk
Change-Id: I6a3e1e25e0113bfcc49de19f250c23027ea3a69f
Reviewed-on: https://dart-review.googlesource.com/52865
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-27 00:17:29 +00:00
Stephen Adams ca419a9251 dart2js status refresh
TBR=sigmund@google.com

Change-Id: I5433f177557953c6ab578ec2fc7765b04ef88ac7
Reviewed-on: https://dart-review.googlesource.com/52866
Reviewed-by: Stephen Adams <sra@google.com>
2018-04-26 23:57:49 +00:00