Commit Graph

56224 Commits

Author SHA1 Message Date
Ben Konyi b51f4b7956 [ VM ] Fix failing tests on Windows bots after non-UTF-8 paths change.
Change-Id: Iea81649762e82c74dd275248ae5fdbff420d8654
Reviewed-on: https://dart-review.googlesource.com/55325
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-16 01:19:51 +00:00
Ben Konyi 63242ca459 [ VM ] Fix issue where IsServiceIsolate may fail in the isolate shutdown callback when the service isolate is shutting down
Change-Id: I6dc9786394450ff587ceb45bfa60fd9d40224af6
Reviewed-on: https://dart-review.googlesource.com/55322
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-16 00:28:48 +00:00
Leaf Petersen ed92c91e0a Remove barback from the SDK.
Change-Id: I6843981cda8e0dc7936271bcc019ab9571b15d67
Reviewed-on: https://dart-review.googlesource.com/55321
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2018-05-16 00:01:52 +00:00
Ben Konyi 6327fe91c2 [ VM ] Fixed tests for non-UTF8 paths on Windows / Macos.
Change-Id: I27dc5a3506c1d619e424f363bd405a6d66d44832
Reviewed-on: https://dart-review.googlesource.com/55320
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-15 23:35:28 +00:00
Ben Konyi 7cea07e4bc [ VM / Dart 2 ] Fixed DartAPI_IsolateShutdownRunDartCode for Dart 2.
Change-Id: Ieb39c988fad925c8c4cd6250ea3cda3283b1b2fc
Reviewed-on: https://dart-review.googlesource.com/55023
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-15 23:21:08 +00:00
Stephen Adams 38f0d8faef [dart2js] Check type bounds before value parameters
Change-Id: Ibd75aa67b478b201f1115e9f3dc682bcc5f108c6
Reviewed-on: https://dart-review.googlesource.com/55275
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-15 23:18:57 +00:00
Brian Wilkerson 874f7f6c5c Add Forest support for creating if statements
Change-Id: Ia7f1f672adee0e8da2e5c1c54f9690e7f2597263
Reviewed-on: https://dart-review.googlesource.com/55273
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-15 22:31:42 +00:00
Mike Fairhurst ddd1c3548f Add ability for the angular plugin to set ErrorVerifier.enclosingClass.
There is a similar setter on Resolver, and without it, users are seeing
an issue:
https://github.com/dart-lang/angular_analyzer_plugin/issues/567.

Alternative options to modifying pkg:analyzer APIs are few. One option
is to block UNQUALIFIED_STATIC_REFERNCE errors, however, that will be
too general. We would need to implement a lookup to double-check when
those errors are reported, if they should be.

Alternatively the plugin could block all of them, and then do a second
pass to provide them where the plugins deems they should exist.

This seems the easiest approach and mirrors the api that [Resolver.set
enclosingClass] provides, but the chain of assertions makes we want a
second look on it.

Change-Id: I12df71719c7a0e968a0b3a43cc27c69160ec5210
Reviewed-on: https://dart-review.googlesource.com/54703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-05-15 22:28:47 +00:00
Brian Wilkerson 4b647fcfe1 Add Forest support for creating yield statements
Change-Id: I244d6e17dee72704c6cb5cc2c26b9379fac03440
Reviewed-on: https://dart-review.googlesource.com/55274
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-15 22:23:37 +00:00
Ben Konyi 916b9da48d [ VM ] Fixed issue where backing array was deleted from an ExternalTypedData before the ExternalTypedData was used.
Reland "Fix issues with FileSystemEntities which have non-UTF8 paths causing exceptions to be thrown when converting to/from a Dart VM String."

This reverts commit 4f549e2900.

Change-Id: Ia27c8c300beb178fa7b08ffe0bfcb2d61f65bbb5
Reviewed-on: https://dart-review.googlesource.com/55271
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-15 21:54:46 +00:00
Konstantin Shcheglov 8907348ae9 Issue 2246. Fix for 'Wrap with new widget' assist when activated on a constructor name.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2246
Change-Id: I66ca8b121b2600fa86c787fc26fe6dc01c79c24d
Reviewed-on: https://dart-review.googlesource.com/55272
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-15 21:22:26 +00:00
Bob Nystrom 07f642384e Roll dart_style 1.0.14 into the SDK.
This should be safe to do without rolling the prebuilt SDK since it
makes no changes to existing formatted code.

Change-Id: I3420698b5dac94ab04ee7908940ace70936a3e5b
Reviewed-on: https://dart-review.googlesource.com/55269
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2018-05-15 21:13:27 +00:00
Zach Anderson 1a2046c333 [vm] Roll tcmalloc forward
It hasn't been updated in nearly 2 years. This update adds support for
more modern C++'s.

Change-Id: Ie3cbf95db6073d838a3a4cdbb72c3f50e0777c01
Reviewed-on: https://dart-review.googlesource.com/55265
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-15 21:07:57 +00:00
Konstantin Shcheglov ee414b4d9d Issue 2249. Fix swap with parent/child when code is not formatted.
We cannot just rely on line ends.
AST is our best guide.

R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2249
Change-Id: Id901878f621abc745fb6a380e5cf9afe21884642
Reviewed-on: https://dart-review.googlesource.com/55268
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-15 20:35:06 +00:00
Stephen Adams 8cf81446a3 Add method stubs to support instantiation stubs
Change-Id: Id9cce10b6319d268eb4ec2745465df5f06d3b906
Reviewed-on: https://dart-review.googlesource.com/55081
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-15 20:32:46 +00:00
Alexander Markov a2b1ce8418 [vm/kernel/bytecode] Add an option to drop AST if bytecode was generated
This CL adds experimental option --drop-ast to the gen_kernel tool in
order to remove AST bodies of members with bytecode.

Change-Id: Ib5f02eb189ec1ccd9fa77159c175fc3774998ce5
Reviewed-on: https://dart-review.googlesource.com/55262
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-05-15 20:04:36 +00:00
Stephen Adams 345aacf3bc [dart2js] Update status files
TBR=sigmund@google.com

Change-Id: Ib3d4998c45fe6cfb0b8fff11d9b5ed3d8b98b8c5
Reviewed-on: https://dart-review.googlesource.com/55267
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-15 19:47:06 +00:00
Brian Wilkerson e5853e6098 Remove some unused imports in kernel_ast_api
Change-Id: Ia92bb1c8e30f3f79a7aaa5d3b93e9461cce23c17
Reviewed-on: https://dart-review.googlesource.com/55261
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-15 18:05:58 +00:00
Vyacheslav Egorov d96e1de0bf [vm] Snapshot class'es dependent code array when generating app-jit snapshot
If this array is not snapshotted then optimized code is not invalidated
when new subclasses are finalized leading to execution of incorrect code.

Change-Id: Ib28609a5e6499aedb1b2c19de40ab00fd5a786bc
Reviewed-on: https://dart-review.googlesource.com/55240
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-15 17:33:37 +00:00
Ryan Macnak 6e3f15c109 [vm] Don't serialize the uninitialized alignment gaps in ExceptionHandlers.
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: Ia2c2b30a2b3e5dd9140851f274a85c0883637ef2
Reviewed-on: https://dart-review.googlesource.com/55041
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-15 17:24:36 +00:00
Brian Wilkerson fc5b12ac7b Delay invoking toKernelStatement until necessary; address other comments
Change-Id: I583aa89ba93f945e04e38be4565ace874e1c718a
Reviewed-on: https://dart-review.googlesource.com/55260
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-15 16:56:36 +00:00
Alexander Markov 6b65dcbcf6 [vm/kernel/bytecode] Support closures in bytecode generator
Change-Id: I038ba92c7bc210568d817ebaa109ca0ad02550e1
Reviewed-on: https://dart-review.googlesource.com/52988
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-15 16:51:06 +00:00
Vyacheslav Egorov 7348aa5b6a [vm] Reimplement perf-inject JITDUMP support.
This enables the following profiling workflow on Linux:

  $ perf record -k mono dart --generate-perf-jitdump benchmark.dart
  $ perf inject -j -i perf.data -o perf.data.jitted
  $ perf report -i perf.data.jitted

and allows perf-annotate to recognize and annotate JIT generated code.

Change-Id: Ifd0cb2c9111ef766cc8c3a7634ccf0aefab60bd8
Reviewed-on: https://dart-review.googlesource.com/54912
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-15 16:31:46 +00:00
Martin Kustermann 2dc8f3f0b0 [VM] Mark crashing test in status file
This test was removed from the status file in 87fb51fa8c (after
landing dd3ec65af)

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

Change-Id: I77e4a4f303d6a248a87a9a9739e883d2a68fafc6
Reviewed-on: https://dart-review.googlesource.com/55241
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-15 15:54:47 +00:00
Martin Kustermann 9d9ce8d69a [VM] Ensure constant table is written in depth-first post-order
The addition of recently added [PartialInstantiationConstant] caused an
issue during constant table writing, becaused we the table writing code
wasn't updated.

This change uses visitChildren to guard against such changes in the
future.

Closes https://github.com/dart-lang/sdk/issues/33095

Change-Id: I3c6b19e1383c6825f11120b2d6255b8b747d0063
Reviewed-on: https://dart-review.googlesource.com/55161
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-05-15 15:17:36 +00:00
Samir Jindel 12c65eaeb4 [vm/kernel] Add flag to disable Kernel-based expression compilation.
Change-Id: Ibaa2ccd282b467e2b5ecda09fb86620409d7214b
Reviewed-on: https://dart-review.googlesource.com/55220
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-15 14:55:37 +00:00
Brian Wilkerson fb2f43b175 Introduce toKernelStatement and toStatement to BodyBuilder
Change-Id: I4d3746c85370125c617cd1b331db095689ce4b5b
Reviewed-on: https://dart-review.googlesource.com/54963
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-15 14:33:21 +00:00
Martin Kustermann 0cd9497f96 [VM] Skip all language_2 tests on the **VM** in non-strong mode configurations
Some legacy VM configurations, i.e. non-strong mode VM configurations, will no
longer run the `language_2` tests after this CL, since

   * these configurations run already on the legacy `language`
   * we have many status file entries which are due to legacy mode not
     supporting Dart 2.0 semantics
   * people get regularly beaten by this when adding new tests, which
     usually just results in more status file entries
   * nobody is looking at these status file entries

Change-Id: Ief92d1da616a62572fb20c6c1198bbe818ea180a
Reviewed-on: https://dart-review.googlesource.com/55168
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-05-15 14:26:26 +00:00
Jens Johansen fd26343f98 Fix invalidation not sticking on compile error
Before this CL, the invalidated URLs would be cleared sooner than we
threw away the old "userCode".
On a compile time error (issuing an erroneousComponent) we restore
the old userCode, thus in practical terms forgetting about whatever
had been invalidated prior to that.

This CL introduces a test and fixes the problem.

Change-Id: I8f5329c2f499ec3842d0b7d67e2eda1de1e7d938
Reviewed-on: https://dart-review.googlesource.com/52321
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-05-15 14:25:16 +00:00
Johnni Winther 3fc7925894 Add impact_test
Change-Id: Ic607d69375d1ad41f6aac349822e47c7dbf77b5a
Reviewed-on: https://dart-review.googlesource.com/54906
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 13:53:56 +00:00
Brian Wilkerson 55eba71759 Add Forest method to support the rethrow statement
Change-Id: Iffba18a8c81462373122c9204d758008448fbfed
Reviewed-on: https://dart-review.googlesource.com/55021
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-15 13:40:32 +00:00
Danny Tuppeny 5a3aff60b6 Update annotations to be a single region for all
Bug: https://github.com/dart-lang/sdk/issues/33033
Change-Id: I41586b53814d335046cc18c24936a3d32277deda
Reviewed-on: https://dart-review.googlesource.com/55100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-05-15 13:39:54 +00:00
Alexander Thomas b092930350 [infra] Enable vm-kernel-simdbc64 builder on the CQ
Closes #33021

Change-Id: I452bcade300d7b1ea3b75ad0f174099c5650c383
Reviewed-on: https://dart-review.googlesource.com/55164
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-15 13:37:12 +00:00
Brian Wilkerson 35b14de7b8 Use Forest to build throw expressions
Change-Id: I568edd93204056298b640a09a67fe128f2e2c206
Reviewed-on: https://dart-review.googlesource.com/55022
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-15 13:21:53 +00:00
Martin Kustermann f2b37ab643 [VM] Add support for conditions in switch-case expressions to "constants" transformation
This seems to be the last remaining case which causes constant
evaluation in the VM in AOT mode.

Change-Id: I37dba2c634afa3bebd918ebe6dd93ff52a7708e7
Reviewed-on: https://dart-review.googlesource.com/55163
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-05-15 12:52:22 +00:00
Alexander Thomas 2d5c1064b9 [infra] Add .bat to pub command on Windows
#32656

Change-Id: I3a34bf2c81676eea0ab112a8aad701962590a6c3
Reviewed-on: https://dart-review.googlesource.com/55165
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-05-15 12:50:32 +00:00
Samir Jindel 39c93a2b19 Revert "Revert "[vm/kernel] Expression execution through Kernel."
This reverts commit b5154dd01e.

Original revision is in patchset 1.

Change-Id: Ic0776011c6fdbd64c025086535351474a9a88b6e
Reviewed-on: https://dart-review.googlesource.com/54407
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-15 12:03:22 +00:00
Samir Jindel 1a23ff68a5 Fix incorrect handling of NSM forwarders and pull all logic into CFE. (Take 2)
The behavioral difference is that named and optional arguments are filled in
with their default values in the `Invocation` object passed to `noSuchMethod`.

On the implementation side we make NSM forwarders concrete and fill in their
bodies in the CFE. The custom (and somewhat hacky) VM support is no longer
needed, and Dart2JS can benefit from this implementation as well.

According to discussion on #33031 we will be able to re-land this soon without
breaking Mockito.

Prior failures on precompiler bots are fixed in Patchset 2.

Change-Id: If1b7fe4cf6da5ef38f330e1ad226121bcfc958a1
Reviewed-on: https://dart-review.googlesource.com/54401
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-15 11:23:32 +00:00
Jens Johansen 9d05ada522 Renamings and updated comments in class hierarchy #2
Follow-up to https://dart-review.googlesource.com/c/sdk/+/53804.

Change-Id: I8359985f60207ef92c365c9a6e3833be181b49be
Reviewed-on: https://dart-review.googlesource.com/55162
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-05-15 10:12:32 +00:00
Martin Kustermann 45c524e106 [VM] Mark functions on BG compiler bailouts specially, allow them to be re-optimized on main thread
In some cases, bailouts in the bg compiler, e.g. caused by class
finalization, mark functions as unoptimizable, which can significantly
slow down an application.

Instead of doing this, we mark these functions as non-optimizable on the
BG compiler and trigger re-compilations on the main thread.

Change-Id: Ifbb6aa7972818be8fa1313427e38d8b5576053e3
Reviewed-on: https://dart-review.googlesource.com/54886
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-05-15 09:34:22 +00:00
Jens Johansen 68f2db2f66 Renamings and updated comments in class hierarchy
Follow-up to https://dart-review.googlesource.com/c/sdk/+/53662.

Change-Id: I47923ee7e83800ac9d1f77c5f0e39d4b64bcfc7a
Reviewed-on: https://dart-review.googlesource.com/55120
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-05-15 09:15:53 +00:00
Alexander Thomas dcd842267a [infra] Add experimental vm-kernel-simdbc64 builder to the CQ
Change-Id: I886ccf1fd984d7c71dd04effc42c0f5423f82312
Reviewed-on: https://dart-review.googlesource.com/55141
Reviewed-by: William Hesse <whesse@google.com>
2018-05-15 09:08:18 +00:00
Johnni Winther 6fe26e7e55 Delete ElementVisitor, equivalence_helper and move live Elements functions
Change-Id: I0af209210d4a471ba12f939bd8e3a429dab100df
Reviewed-on: https://dart-review.googlesource.com/54913
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 0cd377fe33 Delete ConstantCompilerBase
Change-Id: Ib2d748d380713b742110c772fac2fe7d428b7ded
Reviewed-on: https://dart-review.googlesource.com/54911
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther af37d7def3 Remove ConstantCompiler
Change-Id: I5c8681de4d5b9865da6a6fbb42900d2a7d2b21c3
Reviewed-on: https://dart-review.googlesource.com/54910
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther f493274ce8 Delete more parts of resolution
Change-Id: I1c9ab31efa7c4a97f283275d5122c7b9a8762fb8
Reviewed-on: https://dart-review.googlesource.com/54908
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 330271ed2b Delete modelx
Change-Id: I8f69655ee251cef097b46d80ddfbb7d2434b1051
Reviewed-on: https://dart-review.googlesource.com/54903
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 351b90cb59 Delete NativeDataResolver
Change-Id: I91d2e1cb8d03bb1d0da7e175c810fa3cf3216962
Reviewed-on: https://dart-review.googlesource.com/54901
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther a86621318d Delete CompileTimeConstantEvaluator
Change-Id: I025566965d992829e93e84912d68317f145d96b2
Reviewed-on: https://dart-review.googlesource.com/54885
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 76ab610097 Remove parser listeners and partial elements
Change-Id: Ifb5fffdca3a0e4f2bca7c35ae3c1a99490978ebf
Reviewed-on: https://dart-review.googlesource.com/54882
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00