Commit Graph

3153 Commits

Author SHA1 Message Date
Alexander Markov e3edfd36b2 [vm/snapshots] Finalize and sort all classes in snapshots with compilation trace
This ensures that core-jit snapshots used in Fuchsia (built according
to the compilation trace) would have properly sorted cids without any
gaps with non-finalized classes. This enables merging of cid ranges in
more cases and more efficient cid checks.

Issue: https://github.com/dart-lang/sdk/issues/36428
Change-Id: I7b696ccb7d5ffa80f190bcfc9e1b7229937f16b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103403
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-05-22 16:01:07 +00:00
Ryan Macnak 21f32e7383 Fix sources to source_set
Recent changes to GN require only buildable files to be included in
sources. See crbug.com/gn/77 for additional details.

Change-Id: Ic8fd059e85ba86a63c5d6483e8ec64ddbd1612ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103022
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-21 17:01:48 +00:00
Samir Jindel ed169c4bb0 Revert "[vm/ffi] FFI callbacks on X64."
This reverts commit be209f7846.

Reason for revert: failures on dartkb and windows bots

Original change's description:
> [vm/ffi] FFI callbacks on X64.
> 
> For context on the design, see go/dart-ffi-callbacks
> 
> Change-Id: I2482e3c932e73f9a4c00fa7e218ff85f9328fc51
> Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-mac-release-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-reload-mac-release-simdbc64-try, vm-kernel-linux-debug-ia32-try, vm-dartkb-linux-debug-simarm64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100240
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Daco Harkes <dacoharkes@google.com>

TBR=sjindel@google.com,ajcbik@google.com,dacoharkes@google.com

Change-Id: I4cb3d93675d68a51ac9e125ad1d572c47e8b5903
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-mac-release-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-reload-mac-release-simdbc64-try, vm-kernel-linux-debug-ia32-try, vm-dartkb-linux-debug-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102983
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-05-18 15:29:19 +00:00
Samir Jindel be209f7846 [vm/ffi] FFI callbacks on X64.
For context on the design, see go/dart-ffi-callbacks

Change-Id: I2482e3c932e73f9a4c00fa7e218ff85f9328fc51
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-mac-release-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-reload-mac-release-simdbc64-try, vm-kernel-linux-debug-ia32-try, vm-dartkb-linux-debug-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100240
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-05-18 06:15:46 +00:00
Ryan Macnak cc2d5adec9 [dart:io] Don't leak /dev/urandom fd on fork.
Change-Id: I90ff8585408078e12bf732f6669cf3f9d149495a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102205
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-15 21:27:19 +00:00
Dan Field 034fce1e39 [dart:io] unbreak build
Change-Id: Ia8965e62f4b89a80aeb6db1489ca45c6db321adc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102640
Reviewed-by: Régis Crelier <regis@google.com>
Auto-Submit: Dan Field <dnfield@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-05-15 19:13:29 +00:00
Dan Field 7f323feefe [dart:io] Fix iOS https leaks
Add move constructor and equality operators to
ScopedCFType, add specialized destructor for arrays.

Add release to ScopedCFType.

Use ScopedCFType for SecCertificateRef.

Bug: https://github.com/dart-lang/sdk/issues/36935
Change-Id: I7b40f23fb8f0d7ab0835587e040362f883f86bd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102560
Reviewed-by: Zach Anderson <zra@google.com>
Auto-Submit: Dan Field <dnfield@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2019-05-15 17:53:49 +00:00
Matthew Dempsky 6d5f763952 [vm] Eliminate Mutex/Monitor indirection where possible
In many cases, the Mutexes and Monitors have to be marked "mutable"
because they're used to synchronize const accessor methods.

Small text segment improvement for Product builds:

$ size dart.{arm,x64}.{before,after}
   text	   data	    bss	    dec	    hex	filename
19726069	 409960	 392332	20528361	1393ce9	dart.arm.before
19725525	 409960	 392332	20527817	1393ac9	dart.arm.after
22576021	 600376	1782824	24959221	17cd8f5	dart.x64.before
22574821	 600376	1782824	24958021	17cd445	dart.x64.after

Change-Id: I68f5cd5ad452044df8bfebd160910496036a3e6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101745
Commit-Queue: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-05-13 21:17:51 +00:00
Adam Barth 8a3a9dc588 [fuchsia] Migrate to zx_clock_get_new
Change-Id: Ibf9210e3965e77ff56d244cfd67dbccfb1eef3f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102104
Auto-Submit: Adam Barth <abarth@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2019-05-10 18:22:28 +00:00
Ryan Macnak 3ad32e4287 [vm] Revert 1db1ac4863.
This feature was for Goma work that has been marked obsolete.

Bug: FL-48
Change-Id: I9997f8aefbe1d55f86cff2ab377166a0bce1ed53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101925
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-08 23:52:29 +00:00
Chinmay Garde aa64d1d2e6 Allow building Dart with Fuchsia SDK enabled buildroots.
The Fuchsia SDK can now be consumed by non-Fuchsia buildroots to produce
Fuchsia artifacts.

The Fuchsia SDK comes with a JSON manifest that describes the various SDK
"parts". GN targets are stamped for each of these parts. The location of these
GN targets can be configured. That location is set to |fuchsia_sdk_root| in
each buildroot. This variable is defined in //build/fuchsia/sdk.gni in each
buildroot. For buildroots that don't care or know about the Fuchsia SDK, that
file may not exist. This is why, the import of that file is guarded behind
the is_fuchsia flag. When the Fuchsia SDK is enabled, that file will define
values for two required variable |using_fuchsia_sdk| and |fuchsia_sdk_root|.

The first flag defines if the SDK is being used. If unset (but defined), the
builds are in-tree. Eventually we want only SDK builds. |fuchsia_sdk_root|
is set to the spot in the buildroot where the GN targets for the SDK parts
are stamped.

Change-Id: I604612c8d6a21efb07b323610e80b596abc1a6dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101540
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Chinmay Garde <chinmaygarde@google.com>
2019-05-07 00:43:33 +00:00
Aart Bik 8bc1b2b41c [dart/fuzzer] Restrict libFuzzer to linux
Rationale:
Mac and possibly Windows build don't love fuzzing yet.
Change-Id: Ided9734285197e51145102532e1f59550e261bcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101342
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-05-03 20:37:48 +00:00
Ben Konyi ded5c3efd5 [ VM / Service ] Fixed HTTP requests with params not working correctly when auth codes are enabled
Change-Id: Ia6dbab2c8e46cdd1fce659f55ee16f3ad98e5d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-05-02 17:38:49 +00:00
Ryan Macnak 611dbeb387 [vm, fuchsia] Fix deps and stop suppressing -fvisibility=hidden.
Linking on Fuchsia is more constrained because libdart is a shared library on Fuchsia and a static library everywhere else.

Change-Id: If97385ee0b23b6ed75abd28b14dae5de123915f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100625
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-29 23:31:27 +00:00
Ryan Macnak 7d462b12b9 [vm, fuchsia] Add back -fvisibility=hidden suppressions.
Some targets still rely on implicit symbol exports.

This partially reverts commit e7175ac2ed.

Change-Id: I6dc585e6f15012882348dca11571d964c2b6f7c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100723
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-29 18:46:49 +00:00
Ben Konyi 24396182e1 [ VM / Service ] Handle case where user navigates to Observatory without a slash trailing the authentication code.
Previously, navigating to an observatory URI similar to http://127.0.0.1:8181/KUhS6KoCm24=
would result in a missing auth code error. This change explicitly checks
for this case and issues a redirect response to
http://127.0.0.1:8181/KUhS6KoCm24=/ so index.html can be sent properly
in the follow up request.

Fixes #36763

Change-Id: I8a73f2ef08f6bf1ca5aed4ddaaf97ae3489f7e23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100631
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-29 17:03:49 +00:00
Aart Bik ec15148db2 [dart/fuzzer] no target on unsupported build targets
Rationale:
This if "hides" the dart_libfuzzer target for
build targets that do not support the fuzzer tool
(e.g. no asan, ia32, etc.). This makes "build all"
possible again, and yields "unknown target 'dart_libfuzzer'"
for unsupported case. Also updates README accordingly
and fixes some formatting.

https://github.com/dart-lang/sdk/issues/36774

Change-Id: I61d85ae00d13a0eda3818d40b992cd81f5ee0357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100630
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-04-26 20:51:15 +00:00
Martin Kustermann 832668ff6c Reland "[Infra] Let run_vm_tests --list output a test expectation marker"
Due to not having support for __VA_OPT__ yet the CL introduces a new
wet of macros ..._WITH_EXPECTATIONS() which can be given an expectation
marker.

Change-Id: I33812937f1b226fa89b3ab17a8a3483914abf2e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100643
Reviewed-by: Stevie Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-04-26 12:15:19 +00:00
Zichang Guo 33273b5b25 [vm] OperatingSystemVersion return Android OS version
OperatingSystemVersion on Android does not return OS version of Android.

Bug: https://github.com/dart-lang/sdk/issues/36625
Change-Id: Ia26bd5443b7eaf541f2c27c4e93d3c07a8613747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100567
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-04-25 23:08:43 +00:00
Aart Bik c5cdc4ed89 [dart/fuzzer] Add build rule to link Dart with libFuzzer
Rationale:
First step towards integrating libFuzzer with Dart.
The initial target function is proof-of-concept.


Change-Id: I21f6ebf70fec05719423fef61fa5a9609500dc95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96987
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-04-25 21:29:42 +00:00
Martin Kustermann 76c6b86915 Revert "[Infra] Let run_vm_tests --list output a test expectation marker"
This reverts commit 7cb73d97d2.

Reason for revert: It caused windows build to fail (reason unknown):

c:\b\s\w\ir\cache\builder\sdk\runtime\vm\compiler\assembler\assembler_x64_test.cc(1097): error C3861: 'AssemblerTestGenerate_BitScanReverse': identifier not found
c:\b\s\w\ir\cache\builder\sdk\runtime\vm\compiler\assembler\assembler_x64_test.cc(5499): error C3861: 'AssemblerTestGenerate_bittest': identifier not found

Original change's description:
> [Infra] Let run_vm_tests --list output a test expectation marker
> 
> Due to not having support for __VA_OPT__ yet the CL introduces a new
> wet of macros ..._WITH_EXPECTATIONS() which can be given an expectation
> marker.
> 
> Change-Id: Icaac4672f04340fe4644d13a14c32704ba36daec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96940
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Jonas Termansen <sortie@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

TBR=sortie@google.com,kustermann@google.com,regis@google.com

Change-Id: Ica07ef5e7302e3d8e4b131427ff5ab20be8c6a63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-04-25 14:35:45 +00:00
Martin Kustermann 7cb73d97d2 [Infra] Let run_vm_tests --list output a test expectation marker
Due to not having support for __VA_OPT__ yet the CL introduces a new
wet of macros ..._WITH_EXPECTATIONS() which can be given an expectation
marker.

Change-Id: Icaac4672f04340fe4644d13a14c32704ba36daec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96940
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-04-25 12:07:01 +00:00
Ryan Macnak 3fd6fa4ff7 [vm] Fix errors compiling with GCC.
Change-Id: Ia3127ba9ef4ee1faf1f85a6eaa0dafd0cf187b2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99376
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-24 23:12:45 +00:00
Ryan Macnak e7175ac2ed [vm, fuchsia] Consume specialized symbols for the Dart VM's profiler.
Bug: FL-238
Change-Id: Ie5e2786aeb47063ea1c534b2169b2547d6693a96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100200
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-24 19:53:35 +00:00
Ben Konyi 04e1b0d976 [ VM ] Updated standalone VM to display message about --disable-service-auth-codes when --help --verbose is provided.
Change-Id: I88d3215ccf567a8c965298b5c9c3f7604149e9f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100264
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-23 18:17:05 +00:00
Ryan Macnak 630058286f [build] Fix deps for dart_io.
Change-Id: If7d173e9f6d332273bb85e73f90673613d34a1d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99979
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-23 00:24:24 +00:00
Ryan Macnak 971f4845d7 [build] Remove last platform -> vm and bin -> vm dependencies. Fix some ODR violations.
Change some static_libraries to source_sets to make ODR violations link-time errors.

This is needed to enable (stop suppressing) -fvisibility=hidden in Fuchsia product builds.

Change-Id: I699cec8d4b516beab9cebf9db0a522a7ff99e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99822
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-22 20:15:43 +00:00
Zichang Guo 78340fdf82 [vm] Support ListInterfaces for android
Support ListInterfaces() for android. If android api level during build time
is greater than or equal to 24, it will use getifaddrs() from android ndk.
Since it didn't support until 24. Otherwise, use system call to query the
network interfaces.

Bug: https://github.com/dart-lang/sdk/issues/36449
Change-Id: I615b31b804b751382b775ad9c6af4411b123d5ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98949
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-04-19 16:38:44 +00:00
Ben Konyi cf4444b803 Revert "[ VM / Service ] Temporarily disable VM service auth codes by default"
This reverts commit 98fc8ac7ff.

Change-Id: I4f9c1da8f216039017d954931d141fd267d71508
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99761
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-18 21:21:18 +00:00
Ryan Macnak 9d376de55a [vm] Remove code collection.
Code collection interacts badly with
 - warming up compiled code
 - retaining pre-compiled code
 - code coverage
 - hot reload (deopting to an old version of a function)

Change-Id: Id269a6c3281e577d4f600f0c158af9e62f6b49ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99722
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-18 20:12:09 +00:00
Drew Fisher 92c14cb7ef [fuchsia] Mark subprocess images as executable
Currently, the VMO returned by `fdio_get_vmo_clone` is executable,
despite being documented as being read-only.  We wish to correct
the implementation, but doing so would break anything that relies
on the implicit executability of that VMO.

To enable Fuchsia to make this transition, we should explicitly call
zx_vmo_replace_as_executable on the VMO holding the binary image we
wish to launch as a subprocess.

Change-Id: I040ed2409120a58a30e88ef34a01fe73434a7ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99369
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Auto-Submit: Drew Fisher <zarvox@google.com>
2019-04-15 22:32:46 +00:00
Ben Konyi 98fc8ac7ff [ VM / Service ] Temporarily disable VM service auth codes by default
Change-Id: Ia14e7d4eeb680a02482f700ce06f76bc0edab594
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99187
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-11 21:27:12 +00:00
Samir Jindel a7a87df513 [vm/ffi] Replicate transition to/from native code around FFI calls.
Change-Id: I49be874b47b63a0863ed58d26f417cb957b89380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98463
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-04-11 11:59:54 +00:00
Ben Konyi 92c9f124c3 [ VM / Service ] Fixed HTTP requests to the VM service not working correctly with authentication codes
Change-Id: Ibbf9edb58b9e1f83b31ff876d2da4ef327ea1dab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99081
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-10 19:41:59 +00:00
Ben Konyi 15b11b0183 [ VM / Service / Observatory ] The VM service now requires an authentication code by default.
Previously, a valid web socket connection would use the following URI:

`ws://127.0.0.1/ws`

Now, by default, the VM service requires a connection to be made with a
URI similar to the following:

`ws://127.0.0.1:8181/Ug_U0QVsqFs=/ws`

where `Ug_U0QVsqFs` is an authentication code generated and shared by the
service.

This behavior can be disabled with the `--disable-service-auth-codes`
flag.

Change-Id: I288aac58e3ba9d35dca8071f3f7e7a073896c271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98433
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-09 22:57:29 +00:00
Clement Skau 907c514c89 [SDK] Adds build targets, wrappers and SDK builds for Dart AOT.
Adds:
- dart2aot, a script similar to dart2js which compiles my.dart to my.dart.aot.
- dartaotruntime, a minimal Dart runtime that only runs AOT blobs.
- some extra tooling like gen_kernel and gen_snapshot used by the above.
- build rules for all of the above, including adding it to the full SDK builds.

Bug:https://github.com/dart-lang/sdk/issues/27596
Change-Id: Ic35f832b2b86be959212b8d21cfc5a082da5ced4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97627
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-04-05 13:23:44 +00:00
Zichang Guo b45c67a933 [vm] improve vm help messages
Bug: https://github.com/dart-lang/sdk/issues/36312
Change-Id: Ibbfdf1467d94bba5784889c4539f6d660f9bcc7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98687
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-04-04 22:46:33 +00:00
Liam Appelbe 5a5b58db7e Reland "[vm] Allow running with the latest ABI dill files."
This reverts commit 69ff056b51.

Reason for revert: Relanding with fix.

Original change's description:
> Revert "[vm] Allow running with the latest ABI dill files."
>
> This reverts commit 35c4af445b.
>
> Reason for revert: Broke a bunch of tests, eg:
> https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917088905682853152/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0
>
> Original change's description:
> > [vm] Allow running with the latest ABI dill files.
> >
> > To support this, we need to download the current version during gclient
> > sync, and change the way the --use-abi-version flag is processed so that
> > there's a distinction between the current version and the flag being
> > unset (-1). Also bump the oldest supported ABI version.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/36047
> > Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
> > Commit-Queue: Liam Appelbe <liama@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
>
> TBR=asiva@google.com,liama@google.com
>
> Change-Id: I40f83fcc7f9d785353fb05d4296376ec04af8309
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98700
> Reviewed-by: Liam Appelbe <liama@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=asiva@google.com,liama@google.com

Change-Id: I909fd649eb41911a7b15e682b669708ebe083c8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98690
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2019-04-04 22:45:25 +00:00
Liam Appelbe fd9e32df56 Reland "Spawn isolates using platform kernel when using old ABIs"
This reverts commit 2a8117c341.

Reason for revert: I think it was actually https://dart-review.googlesource.com/c/sdk/+/98609 that caused the breakage

Original change's description:
> Revert "Spawn isolates using platform kernel when using old ABIs"
> 
> This reverts commit c3113b0818.
> 
> Reason for revert: Broke some tests, eg https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917089062837512336/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0
> 
> Original change's description:
> > Spawn isolates using platform kernel when using old ABIs
> > 
> > Bug: https://github.com/dart-lang/sdk/issues/36047
> > Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Commit-Queue: Liam Appelbe <liama@google.com>
> 
> TBR=asiva@google.com,liama@google.com
> 
> Change-Id: I33a714add2858752015dec38b8d973347a3ba79a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98684
> Reviewed-by: Liam Appelbe <liama@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=asiva@google.com,liama@google.com

Change-Id: I8ce6b050f0c3aeb7ac4f15b83bbec0b3b0e909bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98688
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 19:15:35 +00:00
Liam Appelbe 69ff056b51 Revert "[vm] Allow running with the latest ABI dill files."
This reverts commit 35c4af445b.

Reason for revert: Broke a bunch of tests, eg:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917088905682853152/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0

Original change's description:
> [vm] Allow running with the latest ABI dill files.
> 
> To support this, we need to download the current version during gclient
> sync, and change the way the --use-abi-version flag is processed so that
> there's a distinction between the current version and the flag being
> unset (-1). Also bump the oldest supported ABI version.
> 
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com,liama@google.com

Change-Id: I40f83fcc7f9d785353fb05d4296376ec04af8309
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98700
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 18:12:18 +00:00
Liam Appelbe 2a8117c341 Revert "Spawn isolates using platform kernel when using old ABIs"
This reverts commit c3113b0818.

Reason for revert: Broke some tests, eg https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917089062837512336/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0

Original change's description:
> Spawn isolates using platform kernel when using old ABIs
> 
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=asiva@google.com,liama@google.com

Change-Id: I33a714add2858752015dec38b8d973347a3ba79a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98684
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 17:47:26 +00:00
Liam Appelbe c3113b0818 Spawn isolates using platform kernel when using old ABIs
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 16:56:23 +00:00
Liam Appelbe 35c4af445b [vm] Allow running with the latest ABI dill files.
To support this, we need to download the current version during gclient
sync, and change the way the --use-abi-version flag is processed so that
there's a distinction between the current version and the flag being
unset (-1). Also bump the oldest supported ABI version.

Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-04 16:55:03 +00:00
Martin Kustermann 31d558c81c [vm/compiler] Add il_test_helper.h with support for running compilation pipelines for testing
The two existing places where IR is built are changed to use this new
helper. It supports running normal JIT/AOT passes as well as a
user-specified set of passes.

In order to allow vm/cc tests to make assertions about AOT pipeline this CL
enables the DART_PRECOMPILER define in run_vm_tests binary (similar to
gen_snapshot, run_vm_tests has now JIT and AOT support)

Change-Id: Ib51a024a81e0291e89d20860b8b9a2762611426c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98482
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-04-04 05:58:29 +00:00
Ryan Macnak 3379eefd5f [vm] Remove DART_CHECK_VALID; add check for a current isolate to Dart_PropagateError.
Use DART_CHECK_VALID has been incorrect since the introduction of Isolate.kill and Dart_Cleanup because it crashes when given an unwind error.

Remove long-broken FullSnapshot1 test.

Change-Id: I1427249349e8138427bc7833980b5eff6ac466db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98263
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-02 20:06:19 +00:00
Michael Powell dfcc52f909 [vm/dart:io/fuchsia] Improve fdio_pipe_half signature, step 2.
The return value on fdio_pipe_half conflated two things: the error code
on failure (as a zx_status_t) or a file descriptor on success. This
technically worked, because they're both ints, the error code was always
negative, and the file descriptor always positive. However, the stated
return type of zx_status_t was misleading. This changes the signature
such that it always returns an actual zx_status_t, and the file
descriptor is returned through a pointer argument.

Also remove the last argument, since it was always given the same value.

This needs to be done as a soft transition because it's called from the
Dart runtime. The steps are as follows:
1. Add fdio_pipe_half2 with the new signature.
2. Update the Dart runtime to call fdio_pipe_half2.
3. Change fdio_pipe_half to be identical to fdio_pipe_half2.
4. Update the Dart runtime to call the updated fdio_pipe_half.
5. Delete fdio_pipe_half2.

This is step 2.

Change-Id: Ieac841c5f8055f34000851cef364a12b6c0aca2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96664
Commit-Queue: Zach Anderson <zra@google.com>
Auto-Submit: Michael Powell <mikepowell@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-03-28 17:45:55 +00:00
Ben Konyi ac2c934563 Reland "[ VM / dart:isolate ] Added ability to set names for spawned isolates."
This reverts commit 638f13ff3d.

Change-Id: Ib5015539b1c93791c2469be6995789f8f0362806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97845
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-28 16:39:50 +00:00
Ross Wang 0e485045d4 Deflake socket reads on Fuchsia
Handles a case where a socket may be signalled with 0 available bytes to read,
where we would never resubscribe to the socket for reading.

Change-Id: If9662873ac862bee749ccc7f0ce4b4370b639680
Bug: https://fuchsia.atlassian.net/browse/DX-710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97783
Commit-Queue: Zach Anderson <zra@google.com>
Auto-Submit: Ross Wang <rosswang@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-03-26 22:28:50 +00:00
Matthew Dempsky a0e0a7a150 [vm] Delete disallowed constructors/operators
This allows the compiler to emit better errors. It also allows the
compiler to detect when a class accidentally references its own
supposedly disallowed constructors/operators (e.g., see dartutils.cc).

Notably, this exposes a number of private member variables that are
unused, but some that are used only in certain build configurations.
It would arguably be better to only define the variables when they're
needed, but that's deferred to a subsequent CL.

Change-Id: I5d0e6697eebebc9321fae1ff49cc68caf557b903
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97175
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-23 00:52:41 +00:00
asiva 1bab46b06f [vm] Remove support for '-c', '--checked' flags and '--enable-checked-mode'
1. Remove support for the following flags '-c', '--checked' and '--enable-checked-mode'
2. Cleanup some of the tests and test scripts where these options were being passed.

https://github.com/dart-lang/sdk/issues/34660

Change-Id: I4d8aa0d14bd054cfba08d78a411a0df4fc829df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97550
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-22 17:08:56 +00:00