Commit Graph

6631 Commits

Author SHA1 Message Date
Erik Ernst a58052974e Adjusted Dart.g to contain the grammar updates of language repo PR 293
This CL makes several adjustments to the spec_parser grammar Dart.g,
such that the spec_parser can parse the proposed NNBD constructs,
cf. language PR #293.

Change-Id: Ieec00259d73b6037d6a87d5c97cfac40186baef0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101500
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2019-08-14 08:17:54 +00:00
Sam Rawlins 748d927c60 Fix example statusText
Fixes #16786

Change-Id: Ibd22a662ca6dd5501b2eb361f4fe4021c2c33c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112362
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-08-13 19:58:12 +00:00
Jonas Termansen 2f02836576 [benchmark] The large tensorflow models are not needed for benchmarking.
Change-Id: I1d1fdcdf5bddc0c263ae41086c9d9e682d9e6d49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112901
Reviewed-by: William Hesse <whesse@google.com>
2019-08-13 16:06:34 +00:00
Daco Harkes 51f4574e50 Reland "[vm/ffi] Support structs on 32bit architectures"
Fixes alignment checks on GCC <= 7 and Clang <= 7.

Fixes: https://github.com/dart-lang/sdk/issues/37559
Fixes: https://github.com/dart-lang/sdk/issues/36334

Original CL is in patchset 1.

Tested GCC 7 and Clang 7 behavior of alignof and offsetof manually (our CQ uses newer tooling).

Change-Id: I828b00ad3d36be68a0d28b0a710fea938ca17784
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-ffi-android-product-arm-try,vm-dartkb-linux-release-x64-abi-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112254
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-08-09 14:14:32 +00:00
Sam Rawlins bb293ef8cf Fix docs for Window.close() and Window.location=
* `closed` is not a method.
* `location` is not a method.
* `location=` does _not_ take a String; only a Location object.

Fixes #16893

Change-Id: Ia5389ae80c39c5c7d9eebdd0cd04cb994a27fd7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111965
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-08-08 15:20:41 +00:00
Nicholas Shahan 8788d1df9c Add a builder for DDK firefox
We would like to run our main test suites with DDK on firefox.
* co19_2
* language_2
* corelib_2
* lib_2
* dartdevc_native
* ddc kernel modular tests

Change-Id: I05919b3fe4f3f34a38542f0edb064d2d6fbe0e10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107340
Reviewed-by: Alexander Thomas <athom@google.com>
2019-08-07 17:16:23 +00:00
Liam Appelbe d1d8f7f60b Change abi bot's results.json configuration field.
vm-dartkb-linux-release-x64-abi is not a real configuration, it's just
the name of the bot. So if the configuration field needs to be a real
configuration name this won't work.

Change-Id: I703b13f15324eda4540d78707168a91ca00a6222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111861
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2019-08-07 17:02:41 +00:00
Alexander Thomas e470d0f7db [infra] Upgrade firefox and chrome
Change-Id: I59d15a64dbab2892448046e920a169f4d1360860
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112091
Reviewed-by: William Hesse <whesse@google.com>
2019-08-07 08:03:05 +00:00
Nate Bosch 55f81f2210 Mass format python with yapf
- Add `.style.yapf` with configuration to use Google style.
- Run `yapf` on all `.py` files in this repo.
- Manually fix one trailing space in a doc string.
- Run `git cl format runtime` to satisfy presubmit.

Change-Id: I7e6bd11e91f07926b9188362599af398551eed79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111600
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-08-05 20:34:31 +00:00
Alexander Markov ac45ee7e63 [vm/bytecode] Support exactness tracking in bytecode
MicroClosureCreateTearoffClassSecondTime(RunTime) 3922 us -> 2030 us.

Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I3a6f93950a469969d82243fd1744d5a4f7fb1e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111868
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-03 17:36:31 +00:00
Nicholas Shahan 6578435eff [infra] Fix broken code when raising errors in copy_tree.py
`Error` isn't a recognized name in this script. Updated to `RuntimeError`
instead so we can see the errors when they are raised.

Change-Id: I55c548c7cd07dc1980a31dc96d22acec326602a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111483
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-08-02 18:05:08 +00:00
Ryan Macnak 330a401233 Increment ABI version.
The named of the recognized method `_GrowableList.withData` was changed to `_GrowableList._withData`.

Change-Id: I94b08fdbb39579c4713935b61a148db4baa751d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111780
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-08-02 05:13:58 +00:00
William Hesse d89fd68871 [infra] Update pub/sub script to send <10MB when message is base64 encoded.
Change-Id: Ie1f8fe67d06cbdcdc6d13d48dd3f177a48cbc5b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111431
Reviewed-by: Alexander Thomas <athom@google.com>
2019-08-01 08:30:18 +00:00
William Hesse b7eeacfc24 [infra] Add script to publish results.json to Cloud Pub/Sub
Change-Id: I0f04c749710e4882330d3e2fb09a4123264f3009
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111321
Reviewed-by: Alexander Thomas <athom@google.com>
2019-07-31 09:21:27 +00:00
Liam Appelbe f56a6a4246 test_matrix.json changes for simarm_x64
Bug: https://github.com/dart-lang/sdk/issues/36839
Change-Id: I86c4c27e8e2a39c3345b49fd1fa778e3daf651ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107644
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-07-30 20:06:22 +00:00
Liam Appelbe d1daa375d1 Support the output-directory flag in run_abi_tests.py
Bug: https://github.com/dart-lang/sdk/issues/37630
Change-Id: I99428a01d3ebf17a3feefcd1abcbc00a8a49b108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111220
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-07-30 18:28:11 +00:00
Alexander Aprelev 00ec685089 [gardening] Fix flutter hhh apply.sh so it clones dependencies added in patch files
Change-Id: Ib63d2cbaececda336c805651a38b88bc086117b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111343
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-07-30 17:43:35 +00:00
Alexander Aprelev 6e48c00c46 [gardening] Fix hhh patch apply.sh so it skips newly added, non-existent dependency folders
Change-Id: Ia2e4639294b5cfb0a33c672c4eb8beea16ce677f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111121
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-07-30 17:12:49 +00:00
Alexander Aprelev 0b9668d3c5 [gardening] Follow-up to 038250d99e - fix patch file
Change-Id: Idd6736f578034d4ed60e673aba8b9f75c73f7e56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111306
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-07-30 16:47:58 +00:00
Alexander Markov 713c2227b2 [bots] Enable co19 tests on dartkb bots
Issue: https://github.com/dart-lang/sdk/issues/36425
Change-Id: I1de33cdb846a301ff6f621d2546a0507fa7bb345
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110553
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-07-30 16:32:30 +00:00
Alexander Aprelev 038250d99e [gardening] Fix flutter hhh with patch for https://github.com/dart-lang/sdk/commit/5d5a0c0164fa013ebcfa7a14bdfce59d8e11f043
Change-Id: I332c00726ea58b045b2ded59a0c500b11e41c8f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111304
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-07-30 16:11:55 +00:00
William Hesse 5e6b200d2a [infra] Add previous commit info to results records for new tests
Change-Id: I4f4b5a133668a3a5926f6d59abc3054b8c47e00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110223
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2019-07-30 11:42:26 +00:00
Alexander Thomas 58470142b7 [infra] Fix return type of async function in approve_results.dart
TBR=whesse@google.com

Change-Id: Iceea303edb157d8653021ea55d746ba8a93124e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110908
Reviewed-by: Alexander Thomas <athom@google.com>
2019-07-29 12:32:40 +00:00
Alexander Thomas fa22f034d7 [infra] Handle more than 100 tryjobs in approve_results
Previously, approve_results would only fetch the first page of tryjobs
from the buildbucket search. This adds paging support so that it will
also work on CLs with many tryjobs.

Change-Id: Ia0b2bccd46316d280cb8aab67842e10786ac7f89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110905
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2019-07-29 11:54:20 +00:00
Liam Appelbe ac45f46ce0 Bump the ABI version and oldest supported version to the same value
ABI compatibility was broken by this change:
https://dart-review.googlesource.com/c/sdk/+/108723

The change is backwards incompatible, so we can't support any versions
older than this. We should have bumped the version when the CL was
submitted, but the bot failure was misidentified as a timeout.

Bug: https://github.com/dart-lang/sdk/issues/37630
Change-Id: I3b5563ab27f40b0876b5b7682e15e2b7d7408c2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110541
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-07-25 21:07:32 +00:00
Siva Annamalai d9287f4fe6 Reland "[dart] Enable constant-update-2018"
This reverts commit 83d2aaa072.

Reason for revert: Want to reenable const-update-2018 by default.

Original change's description:
> Revert "[dart] Enable constant-update-2018"
> 
> This reverts commit 9bbd3192f4.
> 
> Reason for revert: Reverting enabling of constant-update-2018 by default as some blocking issues were found that are breaking Flutter and preventing rolls of Dart into Flutter. Once the blocking issues are addressed and fixed this CL will be relanded.
> 
> Original change's description:
> > [dart] Enable constant-update-2018
> > 
> > Change-Id: Ib3942b4f6e336a02826305d9f81839333a5464a0
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106943
> > Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> > Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> 
> TBR=paulberry@google.com,vegorov@google.com,athom@google.com,vsm@google.com,aadilmaan@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: I5796881412cec464f450ff3894ca253c58edc4a2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109308
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Vijay Menon <vsm@google.com>

TBR=paulberry@google.com,vegorov@google.com,athom@google.com,vsm@google.com,asiva@google.com,aadilmaan@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I06fbeef318706074c0efcfd42b459bf37c3c92e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109661
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-07-25 16:58:49 +00:00
Alexander Aprelev dd59b193c7 Revert 52cace8160 as it breaks flutter tests on android nexus 5x.
This reverts 'Reland "[vm/ffi] Support structs on 32bit architectures"' 52cace8160 reviewed on https://dart-review.googlesource.com/c/sdk/+/108818, reverts FfiStruct part of https://dart-review.googlesource.com/c/sdk/+/108724.

```
runtime/vm/compiler/ffi.cc:63:1: error: static_assert failed "FFI transformation alignment"
static_assert(alignof(double) == 4, "FFI transformation alignment");
^             ~~~~~~~~~~~~~~~~~~~~
runtime/vm/compiler/ffi.cc:64:1: error: static_assert failed "FFI transformation alignment"
static_assert(alignof(uint64_t) == 4, "FFI transformation alignment");
^             ~~~~~~~~~~~~~~~~~~
````

Change-Id: I0c3bf985f68b2184261e8999320f8ee89fe3f896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110362
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-07-25 04:00:23 +00:00
Alexander Markov fedd74669a [vm/bytecode] Support multiple entry points when compiling from bytecode
DeltaBlueClosures +26.54%

Closes https://github.com/dart-lang/sdk/issues/36889
Issue: https://github.com/dart-lang/sdk/issues/36429

Change-Id: I8920c7985366a2c955a06013aa9f58763fcbced9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109580
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-07-20 00:05:23 +00:00
Daco Harkes fbf13f561f [benchmarks/ffi] Add micro and macro benchmarks for dart:ffi
Adds micro benchmarks to measure low level (1) C memory reads and writes from Dart and (2) calls from Dart into C. This CL also adds a macro benchmark to measure overall performance using BoringSSL to digest data. The shared libraries are precompiled for Linux and live in cipd packages. The benchmarks run on all hardware architectures (with the exception of Linux'es hardfp on Arm32: https://github.com/dart-lang/sdk/issues/36309).

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

Change-Id: I8dfb30cc66a26a2942bb09194c5eb0da0b6ca1b5
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108724
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2019-07-19 14:59:57 +00:00
Terry Lucas 3a7101e16b Support TouchEvents and PointerEvent, also fixed innerText.
Bug: 36092
Change-Id: I74e3fb256e6be4dc8d919ac158327583f4d84a89
R=vsm@google.com
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108521
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2019-07-18 14:24:05 +00:00
Siva Annamalai 83d2aaa072 Revert "[dart] Enable constant-update-2018"
This reverts commit 9bbd3192f4.

Reason for revert: Reverting enabling of constant-update-2018 by default as some blocking issues were found that are breaking Flutter and preventing rolls of Dart into Flutter. Once the blocking issues are addressed and fixed this CL will be relanded.

Original change's description:
> [dart] Enable constant-update-2018
> 
> Change-Id: Ib3942b4f6e336a02826305d9f81839333a5464a0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106943
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>

TBR=paulberry@google.com,vegorov@google.com,athom@google.com,vsm@google.com,aadilmaan@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I5796881412cec464f450ff3894ca253c58edc4a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109308
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-07-16 22:30:36 +00:00
Liam Appelbe d76238dfca [vm] Bump oldest supported ABI version
We don't need to support old versions for more than a couple of weeks,
and the ABI bot is struggling to keep up at the moment. Until we have
a more solid fix for the ABI bot issues, this is an easy mitigation.

Change-Id: I5fc17e3a70ca72c2cf817afb6284e40e7af0d9b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109101
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-07-15 16:37:38 +00:00
Vyacheslav Egorov 9bbd3192f4 [dart] Enable constant-update-2018
Change-Id: Ib3942b4f6e336a02826305d9f81839333a5464a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106943
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-07-12 12:32:34 +00:00
Johnni Winther b64ab73b02 [cfe] Shard front-end tests
The file set could probably be reduced but this works. The running
time for the front-end-linux-release-x64-try is reduced from ~56
mins to ~22 mins.

Change-Id: Ia298a5a89d84b21d3d4c7fd858e712570c692176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108580
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-12 08:04:58 +00:00
Vijay Menon 2e8f642ece [dartdevc] shard ddc/ddk tests
Change-Id: I789f2c8346e81c9e4693b0b83f1f3924a0761198
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108540
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-10 20:04:19 +00:00
Jonas Termansen 24d57fb745 [benchmark] Add top level benchmarks directory.
Benchmarks are checked in as benchmarks/<Benchmark>/dart/<Benchmark>.dart.
This scheme is compatible with our existing benchmarking infrastructure
and will aid migrating the benchmarks with minimal breakage.

This change adds an Example benchmark to show how it is done.

The benchmarks directory is now added to the Dart benchmarking builds.

Change-Id: I25971ba3b219194fa9cfea6b938372d877477e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108414
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-07-10 14:51:14 +00:00
Martin Kustermann e3b3c6fa28 [vm] Rename 3head flutter patch after re-land of concurrency change
Change-Id: Ie36a2a9f33d9f39e8b8ef14197c9f02476f3e031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108402
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-07-09 09:16:39 +00:00
Alexander Aprelev 0425997b31 Second attempt to reland "[vm/concurrency] Introduce concept of Isolate Groups"
This reverts commit 3d14b75f97.

An Isolate Group (IG) is a collection of isolates which were spawned from the
same source. This allows the VM to:

  * have a guarantee that all isolates within one IG can safely exchange
    structured objects (currently we rely on embedder for this
    guarantee)

  * hot-reload all isolates together (currently we only reload one
    isolate, leaving same-source isolates in inconsistent state)

  * make a shared heap for all isolates from the same IG, which paves
    the way for faster communication and sharing of immutable objects.

All isolates within one IG will share the same IsolateGroupSource.

**Embedder changes**

This change makes breaking embedder API changes to support this new
concept of Isolate Groups: The existing isolate lifecycle callbacks
given to Dart_Initialize will become Isolate Group lifecycle callbacks.
A new callback `initialize_isolate` callback will be added which can
initialize a new isolate within an existing IG.

Existing embedders can be updated by performing the following renames

  Dart_CreateIsolate -> Dart_CreateIsolateGroup
  Dart_IsolateCreateCallback -> Dart_IsolateGroupCreateCallback
  Dart_IsolateCleanupCallback -> Dart_IsolateGroupShutdownCallback
  Dart_CreateIsolateFromKernel -> Dart_CreateIsolateGroupFromKernel
  Dart_CurrentIsolateData -> Dart_CurrentIsolateGroupData
  Dart_IsolateData -> Dart_IsolateGroupData
  Dart_GetNativeIsolateData -> Dart_GetNativeIsolateGroupData
  Dart_InitializeParams.create -> Dart_InitializeParams.create_group
  Dart_InitializeParams.cleanup -> Dart_InitializeParams.shutdown_group
  Dart_InitializeParams.shutdown -> Dart_InitializeParams.shutdown_isolate

By default `Isolate.spawn` will cause the creation of a new IG.

Though an embedder can opt-into supporting multiple isolates within one IG by
providing a callback to the newly added `Dart_InitializeParams.initialize_isolate`.
The responsibility of this new callback is to initialize an existing
isolate (which was setup by re-using source code from the spawning
isolate - i.e. the one which used `Isolate.spawn`) by setting native
resolvers, initializing global state, etc.

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

Original review: https://dart-review.googlesource.com/c/sdk/+/105241

Difference to original review:

  * Give each isolate it's own [Loader] (for now)
  * Sort classes during initialization for spawned isolates if app-jit is used (to match main isolate)
  * Fix IsolateData memory leak if isolate startup fails

Difference to first reland(Patchset 2):

  * Fix typo where memory was freed twice.

Change-Id: Ib1c83fe83b629cd50ae6af90ee99fdd44da882d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108367
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-07-08 23:49:05 +00:00
Vyacheslav Egorov 372bcae536 [gardening] Fix 3xHEAD Flutter build after revert
Change-Id: I2ec9d048465d641b33554e15fc9a76fde4abf848
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108141
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-07-03 16:23:09 +00:00
Vyacheslav Egorov 3d14b75f97 Revert "Reland "[vm/concurrency] Introduce concept of Isolate Groups""
This reverts commit 67ab3be10d.

Reason for revert: Causes non-deterministic failures on front-end bots on Windows with "Isolate creation failed" error. See https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8909292129328681248/+/steps/unit_tests/0/stdout

Original change's description:
> Reland "[vm/concurrency] Introduce concept of Isolate Groups"
> 
> An Isolate Group (IG) is a collection of isolates which were spawned from the
> same source. This allows the VM to:
> 
>   * have a guarantee that all isolates within one IG can safely exchange
>     structured objects (currently we rely on embedder for this
>     guarantee)
> 
>   * hot-reload all isolates together (currently we only reload one
>     isolate, leaving same-source isolates in inconsistent state)
> 
>   * make a shared heap for all isolates from the same IG, which paves
>     the way for faster communication and sharing of immutable objects.
> 
> All isolates within one IG will share the same IsolateGroupSource.
> 
> **Embedder changes**
> 
> This change makes breaking embedder API changes to support this new
> concept of Isolate Groups: The existing isolate lifecycle callbacks
> given to Dart_Initialize will become Isolate Group lifecycle callbacks.
> A new callback `initialize_isolate` callback will be added which can
> initialize a new isolate within an existing IG.
> 
> Existing embedders can be updated by performing the following renames
> 
>   Dart_CreateIsolate -> Dart_CreateIsolateGroup
>   Dart_IsolateCreateCallback -> Dart_IsolateGroupCreateCallback
>   Dart_IsolateCleanupCallback -> Dart_IsolateGroupShutdownCallback
>   Dart_CreateIsolateFromKernel -> Dart_CreateIsolateGroupFromKernel
>   Dart_CurrentIsolateData -> Dart_CurrentIsolateGroupData
>   Dart_IsolateData -> Dart_IsolateGroupData
>   Dart_GetNativeIsolateData -> Dart_GetNativeIsolateGroupData
>   Dart_InitializeParams.create -> Dart_InitializeParams.create_group
>   Dart_InitializeParams.cleanup -> Dart_InitializeParams.shutdown_group
>   Dart_InitializeParams.shutdown -> Dart_InitializeParams.shutdown_isolate
> 
> By default `Isolate.spawn` will cause the creation of a new IG.
> 
> Though an embedder can opt-into supporting multiple isolates within one IG by
> providing a callback to the newly added `Dart_InitializeParams.initialize_isolate`.
> The responsibility of this new callback is to initialize an existing
> isolate (which was setup by re-using source code from the spawning
> isolate - i.e. the one which used `Isolate.spawn`) by setting native
> resolvers, initializing global state, etc.
> 
> Issue https://github.com/dart-lang/sdk/issues/36648
> Issue https://github.com/dart-lang/sdk/issues/36097
> 
> Original review: https://dart-review.googlesource.com/c/sdk/+/105241
> 
> Difference to original review:
> 
>   * Give each isolate it's own [Loader] (for now)
>   * Sort classes during initialization for spawned isolates if app-jit is used (to match main isolate)
>   * Fix IsolateData memory leak if isolate startup fails
> 
> Change-Id: I98277d3d10fe275aa9b8a16b6bdd446bbea0b100
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107506
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=kustermann@google.com,aam@google.com,rmacnak@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ia4e0f4f9fc317499d3570a371c5bdf9aed799e77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108101
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-07-03 12:19:15 +00:00
Lorenz Nickel 79e478e50e Fixed some links
**I fixed some links and some other minor flaws.**

I also found the following outdated links, which I didn't fix:

- [This link](https://github.com/dart-lang/pool/tree/zone.strong) in [this file](https://github.com/dart-lang/sdk/blob/master/docs/newsletter/20170728.md) (didn't fix because don't know new location and this is some sort of archive so the link should probably stay the original)
- [This link](https://www.dartlang.org/tools/analyzer) in [this file](https://github.com/dart-lang/sdk/blob/master/pkg/analyzer_cli/lib/src/options.dart) (didn't fix since the link is still working, it just gets redirected and the link is part of the programm, I don't want to break anything by changing it, all other links are in comments)
- [This link](https://github.com/domokit/mojo/issues/728) in [this file](https://github.com/dart-lang/sdk/blob/master/build/config/compiler/BUILD.gn) (didn't fix since probably has no new location and is part of TODO, which I don't want to change)

While doing all this I also noticed that [these tests](https://github.com/dart-lang/sdk/tree/master/tests/compiler/dart2js_extra) contain a lot of other inconsistencies in their comments and the location of the import-statements (I only fixed one which was not link-related), could be target of another PR.

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

GitOrigin-RevId: 71d05d0b52d8ec5b92d077a070e066d1fdd4bbfa
Change-Id: Ide4b2424fccad8ae2e06c788efd4443dc0de997b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102222
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-07-01 16:21:41 +00:00
Martin Kustermann 67ab3be10d Reland "[vm/concurrency] Introduce concept of Isolate Groups"
An Isolate Group (IG) is a collection of isolates which were spawned from the
same source. This allows the VM to:

  * have a guarantee that all isolates within one IG can safely exchange
    structured objects (currently we rely on embedder for this
    guarantee)

  * hot-reload all isolates together (currently we only reload one
    isolate, leaving same-source isolates in inconsistent state)

  * make a shared heap for all isolates from the same IG, which paves
    the way for faster communication and sharing of immutable objects.

All isolates within one IG will share the same IsolateGroupSource.

**Embedder changes**

This change makes breaking embedder API changes to support this new
concept of Isolate Groups: The existing isolate lifecycle callbacks
given to Dart_Initialize will become Isolate Group lifecycle callbacks.
A new callback `initialize_isolate` callback will be added which can
initialize a new isolate within an existing IG.

Existing embedders can be updated by performing the following renames

  Dart_CreateIsolate -> Dart_CreateIsolateGroup
  Dart_IsolateCreateCallback -> Dart_IsolateGroupCreateCallback
  Dart_IsolateCleanupCallback -> Dart_IsolateGroupShutdownCallback
  Dart_CreateIsolateFromKernel -> Dart_CreateIsolateGroupFromKernel
  Dart_CurrentIsolateData -> Dart_CurrentIsolateGroupData
  Dart_IsolateData -> Dart_IsolateGroupData
  Dart_GetNativeIsolateData -> Dart_GetNativeIsolateGroupData
  Dart_InitializeParams.create -> Dart_InitializeParams.create_group
  Dart_InitializeParams.cleanup -> Dart_InitializeParams.shutdown_group
  Dart_InitializeParams.shutdown -> Dart_InitializeParams.shutdown_isolate

By default `Isolate.spawn` will cause the creation of a new IG.

Though an embedder can opt-into supporting multiple isolates within one IG by
providing a callback to the newly added `Dart_InitializeParams.initialize_isolate`.
The responsibility of this new callback is to initialize an existing
isolate (which was setup by re-using source code from the spawning
isolate - i.e. the one which used `Isolate.spawn`) by setting native
resolvers, initializing global state, etc.

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

Original review: https://dart-review.googlesource.com/c/sdk/+/105241

Difference to original review:

  * Give each isolate it's own [Loader] (for now)
  * Sort classes during initialization for spawned isolates if app-jit is used (to match main isolate)
  * Fix IsolateData memory leak if isolate startup fails

Change-Id: I98277d3d10fe275aa9b8a16b6bdd446bbea0b100
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107506
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-06-29 18:45:11 +00:00
William Hesse 83956f4059 Revert "[infra] Add error check when adding builder data to test results."
This reverts commit 9fd914e450.

Reason for revert: There needs to be a check if this is an experimental job, or a tryjob, and accept blank fields in that case.
I meant to put it in if I made the code return 1, but forgot.

Even in this case, the results need to be returned, for tryjobs to work.


Original change's description:
> [infra] Add error check when adding builder data to test results.
> 
> Change-Id: Ia59b8dcb711839e90d222679362d145b332c45b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107510
> Reviewed-by: Jonas Termansen <sortie@google.com>

TBR=whesse@google.com,sortie@google.com

Change-Id: I37a48d78265e9630a7c562a46083e5234abba1aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107512
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2019-06-28 16:49:40 +00:00
William Hesse 9fd914e450 [infra] Add error check when adding builder data to test results.
Change-Id: Ia59b8dcb711839e90d222679362d145b332c45b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107510
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-06-28 13:24:43 +00:00
Liam Appelbe 34925166a8 Don't run ABI test on non-existent ABI versions
Change-Id: I6ef7adf277b2dfe5c3872ad9f27ea325833d5656
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107563
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-06-27 22:09:33 +00:00
Alexander Markov 1eb113ba27 [vm/bytecode] Support native extensions
Change-Id: I224f740db674e20d643191605d0a7463bf85d39f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107451
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-06-27 20:24:25 +00:00
danrubel 8d705089ba remove retired experimental flags from kernel
Change-Id: Id0f5e64ad7431e42a10c09fdaf1fae70b73a6d68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104900
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-27 18:19:55 +00:00
Alexander Thomas ec3c878868 [infra] Add runtime_kernel target to dart-sdk-win builder
runtime_kernel includes building VM tests that aren't built by
create_sdk. dart-sdk-win-try is the only Windows build on the default-CQ
so we were lacking coverage for parts of the VM build. Adding
runtime_kernel to the dart-sdk-win builder solves that without the
overhead a heavy-weight builder like vm-kernel-win-release-x64 would
incur.

Change-Id: Ibd1a92272c63905d8aeb7fc7bc84d112557fff9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107502
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-06-27 12:02:45 +00:00
Alexander Thomas 75b83da010 [infra] Add dart2js-rti builder to the test matrix
Change-Id: I9db6a0583dd9b4f7ade1e6ebef539fbefc0b3adc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107408
Reviewed-by: William Hesse <whesse@google.com>
2019-06-27 10:25:13 +00:00
Todd Volkert ddfde57069 Update File.openRead to return Stream<Uint8List>
Bug: https://github.com/dart-lang/sdk/issues/36900
Change-Id: Ib2e417f4baa0048e2d4c2156c250d0cf454fdf87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104523
Commit-Queue: Todd Volkert <tvolkert@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-06-27 00:22:17 +00:00