Commit graph

56386 commits

Author SHA1 Message Date
Alexander Markov 4995c482bf [vm/compiler] Remove overflow checks from 64-bit int operations
This is a follow-up cleanup after '--limit-ints-to-64-bits' was removed.

Change-Id: Ifb02ca8055ddb830cf0bd5dd2a591d6ae5a1ab74
Reviewed-on: https://dart-review.googlesource.com/58921
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-07 17:19:49 +00:00
Ryan Macnak 4be0e45895 [vm-service] More thoroughly guard RPCs that require a compiler or debugger.
Change-Id: I1d6d5b9d9df5586b9c317b2c858c91b9b496ff6a
Reviewed-on: https://dart-review.googlesource.com/58922
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-07 16:48:14 +00:00
Zach Anderson 87b5112d5b [dart:_http] Adds Dart-styled constants
Change-Id: I42e0c02b3aac7f952c5346bbcddd50293bf2b5b8
Reviewed-on: https://dart-review.googlesource.com/58620
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-07 16:18:33 +00:00
Alexander Thomas a73ff63fd5 [gardening] Update status for app_jitk builders
TBR=whesse@google.com

Change-Id: Ieb713aab20377fff8ee4f7637fd05a580f037bff
Reviewed-on: https://dart-review.googlesource.com/59095
Reviewed-by: Alexander Thomas <athom@google.com>
2018-06-07 15:55:09 +00:00
Alexander Thomas e0552b0cdd [gardening] Update status for chrome minified csp
TBR=whesse@google.com

Change-Id: I26e13bf513f9a498231b247b831d73fa02245492
Reviewed-on: https://dart-review.googlesource.com/59094
Reviewed-by: Alexander Thomas <athom@google.com>
2018-06-07 15:29:23 +00:00
Alexander Thomas 2c780c4b1d [gardening] Make gardening tools accept more swarming URLs & Dart 2 fixes
Change-Id: I9101020f3a32da130e26c53391477dc5501ef6ff
Reviewed-on: https://dart-review.googlesource.com/59080
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-06-07 14:57:26 +00:00
Devon Carew 50b610cc9c Add a 'Core' category for doc generation.
Change-Id: I56b6b20935f5d543ccf3b9546191203096ed1c47
Reviewed-on: https://dart-review.googlesource.com/58880
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-07 14:47:41 +00:00
Danny Tuppeny 111b621828 Handle folding for function expression invocations
Change-Id: Id93004c1ea218b1768d649a2a806ce58a9d7f0a5
Reviewed-on: https://dart-review.googlesource.com/59061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-06-07 14:42:42 +00:00
Alexander Thomas 5616ec9d6d [infra] Mark analysis/package_root_test as flaky on linux
Change-Id: I611aa7bc9b96a8bd322333814dce35f44f61ac0d
Reviewed-on: https://dart-review.googlesource.com/59092
Reviewed-by: William Hesse <whesse@google.com>
2018-06-07 14:31:12 +00:00
Kevin Millikin 292b9037e1 Update a pair of analyzer tests
The static type of invocations of methods from class Object on
receivers with static type dynamic has changed.  Clean up a pair of
analyzer tests that expected the previous behavior and were expected
to fail because the analyzer already implemented the intended
behavior.

Change-Id: I7a65fa4e46a0da51bcf1c183a7c30f0976baaef5
Reviewed-on: https://dart-review.googlesource.com/58205
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-06-07 13:24:41 +00:00
Brian Wilkerson 9c5d54cc7e Fix the generation of labels
Change-Id: I486e5a23d31bc85ad534b072867db883f5d60c33
Reviewed-on: https://dart-review.googlesource.com/58981
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-07 13:22:55 +00:00
Lasse R.H. Nielsen b9381d3378 Fix strong-mode bug in dart2js ConstantMap.from.
Fixes 33371.

Bug: http://dartbug.com/33371
Change-Id: I57eeeb2a0eca198c76c3470706648110da45775b
Reviewed-on: https://dart-review.googlesource.com/59082
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-06-07 12:31:50 +00:00
Alexander Thomas cf319e484a [infra] Remove checked tests from VM product builders in test matrix
Change-Id: I32a68f18eaad0d999d1c3f51795da5f50ab84e50
Reviewed-on: https://dart-review.googlesource.com/59081
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2018-06-07 12:23:53 +00:00
Martin Kustermann a603635b85 [VM] Decouple frontend from frame layout
So far the frontend (parser, flow graph builder, ssa construction) were
aware of the actual frame layout.

This CL makes the indices we assign to [LocalVariable]s logical
indices, assigning:

  * M parameters the indices      1 ... M
  * N local variables the indices 0 -1 ... -(N-1)

The scope building, flow graph builder and ssa construction operate on
those logical indices.

When emitting actual code, the backend will translate those indices into
actual FP relative indices. This allows us to be more flexible in the
backend which frame layout we choose.

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

Change-Id: I9a504bf97821c257aafd2b3430df9f4c9da4b442
Reviewed-on: https://dart-review.googlesource.com/57321
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-07 11:35:58 +00:00
Vyacheslav Egorov 0d6be92bfb [gardening] Mark snapshot determinism tests flaky Pass, Fail
TBR=rmacnak@google.com

Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I850056ff2fc42d1a2df8c709cfd1371ac9bcab3b
Reviewed-on: https://dart-review.googlesource.com/59062
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-06-07 10:39:12 +00:00
Andrew Janke 61e57e2012 update_homebrew🎯 also make a dart@2, for Dart 2 migration
This PR modifies update_homebrew to also generate a dart@2 versioned formula. The new file is dropped out right next to the old `dart.rb` file.

The dart@2 formula is a temporary measure to aid application developers
migrating from Dart 1 to Dart 2.

Supersedes https://github.com/dart-lang/homebrew-dart/pull/52.

This looks right by inspection, but I haven't been able to test it yet: my local `dart` environment is all messed up, and I am a Dart newbie. Still, I'm putting this out here as a PR so the discussion from https://github.com/dart-lang/homebrew-dart/pull/52 can proceed.

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

GitOrigin-RevId: 5230782aabf4f45199cff9b1fb9c5304e5dcb21c
Change-Id: I78cf5b066d85ac8b0ef51ed44e6eb1a15192b23c
Reviewed-on: https://dart-review.googlesource.com/58120
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-06-07 10:17:22 +00:00
Peter von der Ahé 656ed8491e Follow up to previous CL
This addresses comments from
https://dart-review.googlesource.com/c/sdk/+/58201.

Change-Id: I59fd5ea06fbd644a7ba5e6be842ce20cfaee7536
Reviewed-on: https://dart-review.googlesource.com/59060
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-06-07 09:33:52 +00:00
Danny Tuppeny 3af09b5b26 Add support for invocation + list/map literal folding
Bug: https://github.com/Dart-Code/Dart-Code/issues/966
Change-Id: Id85471f095b26349e60e0b10f89b4465d4c9b138
Reviewed-on: https://dart-review.googlesource.com/58740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-06-07 09:05:33 +00:00
Terry Lucas 5ec940a2e0 Updated to expose APIs promiseToFuture calls for users.
Fixes #33226

R=kevmoo@google.com, sra@google.com

Change-Id: I04995b33e9445d0fcef8d874315f14fd272018d1
Reviewed-on: https://dart-review.googlesource.com/57482
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-06-07 01:40:22 +00:00
Jenny Messerly 8cd33751c6 optimize string concat in dartdevc
String concat now uses + rather than tagged template strings.
Also refactors the JSTypeRep code into a shared location, and fixes a
bug in null inference for op assign expressions in Analyzer backend.

Change-Id: I74fb6950c1d739efb977a03bd639a07afe453eb6
Reviewed-on: https://dart-review.googlesource.com/57522
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-07 01:28:02 +00:00
Konstantin Shcheglov 80dd725f36 Fix search for private elements inside of discovered packages.
R=brianwilkerson@google.com

Change-Id: Ie2e4055369624d89c090a55787477a235754db5e
Reviewed-on: https://dart-review.googlesource.com/58940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-06 23:31:25 +00:00
Alexander Markov e285bc52d7 [vm/kernel/bytecode] Optimize instantiation of types and type arguments
This CL contains 2 optimizations:

* instantiator type arguments are reused if possible;

* instantiator and function type arguments are not loaded if they are
  not needed for a particular type being instantiated.

Change-Id: Id1f6e5385051044b3b9f78cef884a917e65e801d
Reviewed-on: https://dart-review.googlesource.com/58680
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-06 22:03:54 +00:00
Jenny Messerly f059df7cc5 unfork DDC package:async_helper
This code was from the old travis/karma test runner setup, it is no
longer used. Also deletes the old browser test runner files.

Change-Id: I7eab3ebdc709cfc9c48d6f230c73035bc512cea9
Reviewed-on: https://dart-review.googlesource.com/57780
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-06 21:58:01 +00:00
Paul Berry b74d27d1b2 Fix navigation_test.dart to use new MockAnalysisResult.
Change-Id: I282821c3d8566265616d54d9284ff077a562bd1a
Reviewed-on: https://dart-review.googlesource.com/58900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-06 20:47:54 +00:00
Brian Wilkerson 87c62539a8 Fix issues in the test framework that were causing some tests to fail
Change-Id: I6dd8ef3f044fa6f968fe5f4449421ce15225b50f
Reviewed-on: https://dart-review.googlesource.com/58802
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-06 20:08:34 +00:00
Dan Rubel 3ece660fea Update AstBuilder to handle implicit creation expression
Change-Id: I772cbef5ad7e87ecedf0b05551e04ec938cd0096
Reviewed-on: https://dart-review.googlesource.com/58583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-06 20:00:56 +00:00
Alexander Thomas 94091b10f2 [infra] Use the correct runtime for dartjs-csp-minified builder in the test matrix
TBR=whesse@google.com

Change-Id: I925f16ef8c143a743f5ca4e12dc15bd21098834f
Reviewed-on: https://dart-review.googlesource.com/58861
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2018-06-06 19:40:34 +00:00
Konstantin Shcheglov 8c20f26234 Use mock of AnalysisResult in analyzer_plugin.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ia185d6f24d3cd250dc0b42aecb64aea482e0a46a
Reviewed-on: https://dart-review.googlesource.com/58841
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-06 19:09:54 +00:00
Nate Bosch 2f79dc3f00 Bring in the latest pub
Fixes https://github.com/dart-lang/pub/issues/1914

Includes fixes for snappshotting and running executables in Dart 2 mode.

Change-Id: If35c22859b3985fee769e15d2606f484746f2926
Reviewed-on: https://dart-review.googlesource.com/58804
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-06-06 19:06:04 +00:00
Konstantin Shcheglov 1031735707 Fix DriverBasedUriConverterTest on Windows.
R=brianwilkerson@google.com

Change-Id: I58de679d86f9e210dad629aa1614027df3b8f6c6
Reviewed-on: https://dart-review.googlesource.com/58803
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-06 18:10:04 +00:00
Mike Fairhurst 4d23db795c Fix a bug in optional const: missing instantiation to bounds on ctors
Part of #30384. This was usually not a problem as most cases involve
additional visitors which rewrite this (for instance, inference).

However, in some cases (appears to be summaries only), that extra
resolution is not needed/skipped, so the non-instantiated constructors
remain.

That makes the constantValue of annotations vulnerable to this, and the
resulting DartObject types will have 'TypeParameterType's for there
typeArguments.

Instantiate the types to bounds, and get the ctor from the type rather
than the element, inside of AstRewriter in order to ensure these
constructors are instantiated.

Change-Id: I65f55feb751e139e68c774786bfbc53788d32995
Reviewed-on: https://dart-review.googlesource.com/58800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-06-06 17:38:24 +00:00
Florian Loitsch 9672d69a06 Mark pause_on_unhandled_async_exceptions_test as flaky with optimization_counter_threshold. with optimization_counter_threshold.
Change-Id: Ic9895b8638bf218dab63f42b6d8cc11d37f93dfa
Reviewed-on: https://dart-review.googlesource.com/58782
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-06-06 17:09:08 +00:00
Adam Barth 6dd945599e [fuchsia] Move FDIO headers
These headers are now at this location.

Change-Id: I61bbe005093e241d9d7ca4435e3d7bbd6f9d27b8
Reviewed-on: https://dart-review.googlesource.com/58701
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Adam Barth <abarth@google.com>
2018-06-06 16:47:05 +00:00
Florian Loitsch 31e3441816 Fix bad status lines (wrong tests...)
Change-Id: Icc25dd8c915e4f99ff57dd39c08a0ea000144bea
Reviewed-on: https://dart-review.googlesource.com/58781
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-06-06 16:31:22 +00:00
Florian Loitsch 18828ac77a Mark some co19 tests as crashing.
Change-Id: I1d977b176dee5711a3b09ca7715171853994f3d7
Reviewed-on: https://dart-review.googlesource.com/58780
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-06 15:54:31 +00:00
Konstantin Shcheglov 36e73371fb Switch analyzer_cli to using AnalysisDriver only.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Ibb97bf4843636655e646ee994532ec7e74c43b62
Reviewed-on: https://dart-review.googlesource.com/58622
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-06 15:47:03 +00:00
Florian Loitsch 2b36f923d9 Fix status file.
Change-Id: Ica224de62d1db05715c6fd1ac609759118e2cce0
Reviewed-on: https://dart-review.googlesource.com/58722
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-06-06 15:11:27 +00:00
Florian Loitsch 398ba13e4a Reapply "Make --sync-async the default for the VM."
Change-Id: I6e4da0da6c3f635d84380b384ae17fbb55587895
Reviewed-on: https://dart-review.googlesource.com/58721
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2018-06-06 14:32:13 +00:00
Sam Rawlins c95617b19c Add a release note about the VM going sync-async
Bug: none
Change-Id: Idf1499bddb3f40034512d8ee349b3bee5f4c552b
Reviewed-on: https://dart-review.googlesource.com/57641
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-06-06 13:24:42 +00:00
Dmitry Stefantsov 05f11aa74c [kernel] Account for defaultType in some of the Kernel visitors
Fixes #33324

Bug: http://dartbug.com/33324
Change-Id: I6c6a503a1fe016d7a8743df1597660c979ce27ea
Reviewed-on: https://dart-review.googlesource.com/58720
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-06 12:44:51 +00:00
Johnni Winther c39c2c8ac1 Handle type variables in optional function typed parameter in jsinterop methods
Closes ##33162

Change-Id: If31e7c793cc9312e584817cf4c373b8f10ff3bc1
Reviewed-on: https://dart-review.googlesource.com/58460
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-06-06 11:06:10 +00:00
Martin Kustermann a4af44b470 [VM] Do not invoke any functions during AOT compilation
In Dart 2.0 AOT compilations we give dart_bootstrap/gen_snapshot the
fully linked Kernel IR file (*.dill file) with evaluated constants.

This CL will make the 2.0 AOT compiler

   * only accept .dill files as input
   * no longer invoke various functions during startup
   * no longer start the VM service
   * hit unreachable in DartEntry::InvokeFunction()

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

Change-Id: Iaba44386633856774a0c29be043780b9b262df0f
Reviewed-on: https://dart-review.googlesource.com/56520
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-06 10:56:10 +00:00
Aske Simon Christensen 5be73cd166 Make debug printing of function types more robust.
Sometimes when printing stack states in the outline builder,
a formal in a function type is a FormalParameterBuilder,
and sometimes a formal or the return type is null.

Change-Id: I2bed0baae2a80e894e170a85744e382e763c8944
Reviewed-on: https://dart-review.googlesource.com/58207
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-06-06 10:28:00 +00:00
Peter von der Ahé 6054cb3e1f CompilerContext always expects a Future now
This change is made because we were incorrectly calling
CompilerContext.clear *before* running the main compilation
task which is async.

Change-Id: I7181af33fe733e5bc653fa742b9e06782f4278d0
Reviewed-on: https://dart-review.googlesource.com/58201
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-06-06 09:35:31 +00:00
Kevin Millikin 6213303e65 Fix some runtime check failures in tests
Fix some Dart 2 runtime check failures due to inferred List<dynamic>.

Change-Id: I09215629d4d6c70cd56930b0d19de2a092a7facd
Reviewed-on: https://dart-review.googlesource.com/58208
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-06-06 08:09:58 +00:00
Johnni Winther d17ec7c131 Move inference data from JClosedWorld to GlobalTypeInferenceResults.
Change-Id: I19fdd6771c78c022fd5ca9a3f63c01064bc34d07
Reviewed-on: https://dart-review.googlesource.com/58220
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-06-06 07:49:08 +00:00
Alexander Aprelev 6fcc68bee3 Adjust test status.
Mark isolate/message4_test as Pass, Timeout.

Change-Id: I6103b35d874766030c8219dfde43890aafd382d2
Reviewed-on: https://dart-review.googlesource.com/58621
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-06 03:47:59 +00:00
Dan Rubel fe21518df8 Improve literal list recovery
Change-Id: Ie0e7934d139e84b96add2f0e56051295849ce1bc
Reviewed-on: https://dart-review.googlesource.com/58580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-06 01:44:39 +00:00
Emily Fortuna 134e00fd73 Treat 64 bit ints as unsigned until conversion to JS.
Change-Id: Idb9c5d4a3562f59bc75a5bb7eef4b7af8f5df992
Reviewed-on: https://dart-review.googlesource.com/57714
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-06-06 00:28:28 +00:00
Ryan Macnak b375d69800 [observatory] When the VM is forwarding events to the Android or Fuchsia system tracers, link to the document describing how to use them.
Change-Id: I940b2d5b47a54661c5d25e6d52e714b8819d79a6
Reviewed-on: https://dart-review.googlesource.com/58601
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-05 21:55:56 +00:00