Martin Kustermann
dd2d1fea70
Revert "[vm] Add linker script to hide symbols from standalone embedder executables"
...
This reverts commit 78435da54b .
Reason for revert: The mac builds failed due to clang not understanding the linker option on Mac. Will also investigate Ryan's question around interaction with profiler.
Original change's description:
> [vm] Add linker script to hide symbols from standalone embedder executables
>
> This is a safeguard to prevent users from depending on standalone
> executable internal symbols.
>
> This was already done in g3 in cl/304142297 for b/151696305.
>
> Change-Id: Ie01fc662eba7f8873530721394821b6c6c85e510
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142023
> Commit-Queue: Martin Kustermann <kustermann@google.com >
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
TBR=vegorov@google.com ,kustermann@google.com
Change-Id: I824fa99658612856df6cecc1533a1ea7ee87c54e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142024
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2020-04-01 18:27:42 +00:00
Martin Kustermann
78435da54b
[vm] Add linker script to hide symbols from standalone embedder executables
...
This is a safeguard to prevent users from depending on standalone
executable internal symbols.
This was already done in g3 in cl/304142297 for b/151696305.
Change-Id: Ie01fc662eba7f8873530721394821b6c6c85e510
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142023
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2020-04-01 16:11:55 +00:00
Ben Konyi
99a5117411
[ VM / DartDev ] Fixed issue where trying to find the directory of the Dart executable would fail if we encountered a relative symlink while trying to determine the absolute path.
...
Change-Id: I6ee87ad623ca1e8335a96a8480e9243da9720ced
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140960
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-03-31 22:39:00 +00:00
Jason Simmons
e21c435300
[dart:io] Fuchsia version of SocketBase::AvailableDatagram
...
Fixes https://github.com/flutter/flutter/issues/53590
Change-Id: I6c97dcdc8d9d4ea1679467eb973cc6486bd00184
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141662
Reviewed-by: Zichang Guo <zichangguo@google.com >
Commit-Queue: Jason Simmons <jsimmons@google.com >
2020-03-30 19:14:38 +00:00
Zichang Guo
fdf4762c99
Reland "[dart:io] Fix hanging on zero-length datagram"
...
This is a reland of c326c587c5
The fix is to remove "_availableDatagram" check at the start of receive(). Since receive() can be called without receiver being listening, this check will block the receive().
Original change's description:
> [dart:io] Fix hanging on zero-length datagram
>
> This is observed on Win and Linux.
> Here is a doc to explain the problem: https://docs.google.com/document/d/1ZzyBUMrDHLU6vNryjgSMJfUruOdpmTImtE_s2E0J8IQ/edit?usp=sharing .
>
> Bug: https://github.com/dart-lang/sdk/issues/39910
> Change-Id: Ia961239f45615f14108bcd66043ac33d9a0a4abe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137425
> Commit-Queue: Zichang Guo <zichangguo@google.com >
> Reviewed-by: Siva Annamalai <asiva@google.com >
Bug: https://github.com/dart-lang/sdk/issues/39910
Change-Id: Iefc0af96ed4e1b433396bb5fe11276e8a04c00d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140164
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Zichang Guo <zichangguo@google.com >
2020-03-27 15:28:23 +00:00
Ben Konyi
a71449925a
[ VM / DartDev ] Disable DartDev for the 2.8 release
...
Change-Id: I0b2d588599bee57b546c304b61c3edf1bc92f64c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141020
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-03-26 16:50:23 +00:00
Zichang Guo
cd162ea78e
fix Unix domain socket test failure
...
unix_domain_sockets_ is not initialized.
Fuzzing test fail the assertion when passing a null.
Bug: https://github.com/dart-lang/sdk/issues/41141
Change-Id: Ib50d31f4b63fbc253ba3c720d4c8d54483a24f88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140644
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Zichang Guo <zichangguo@google.com >
2020-03-25 05:01:10 +00:00
Jason Simmons
c58ad1fadf
[dart:io] Fix Unix domain socket headers for Fuchsia
...
Change-Id: I053b41e29184f5edb3d4f19573ead5124528f12c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140624
Reviewed-by: Zichang Guo <zichangguo@google.com >
Commit-Queue: Jason Simmons <jsimmons@google.com >
2020-03-23 20:35:47 +00:00
Zichang Guo
ed83a28d3e
[dart:io] support Unix domain communications
...
Support Unix domain sockets communication on Linux, MacOS and Android.
Changes:
1. Add a field for InternetAddressType named unix.
2. Constructor of InternetAddress gains one more optional field: type. InternetAddress(String address, {InternetAddressType type});
3. Add another constructor to InternetAddress which taks raw address/path for ip/unix addresses as an argument. InternetAddress.fromRawAddress(Uint8List rawAddress, {InternetAddressType type});
The operation for unix domain sockets communication is basically the same as normal sockets except an InternetAddress with type unix should be passed.
Change-Id: I6a1135bbdd7f4e4fc745ccf8f95dec5272b6839b
Bug: https://github.com/dart-lang/sdk/issues/21403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125932
Commit-Queue: Zichang Guo <zichangguo@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2020-03-23 03:51:40 +00:00
asiva
1bab476834
[VM/NNBD] - Make the null safety flag be isolate specific.
...
Change-Id: I73a1e8a22db770ca14af6d53707a335bbbcdabcb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139029
Commit-Queue: Siva Annamalai <asiva@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
2020-03-20 02:09:29 +00:00
Zichang Guo
e91e09d1e4
Revert "[dart:io] Fix hanging on zero-length datagram"
...
This reverts commit c326c587c5 .
Reason for revert: Analyzer and Co19 test is broken.
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8885365974080167440/+/steps/test_results/0/logs/new_test_failures__logs_/0
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8885364415750725248/+/steps/test_results/0/logs/new_test_failures__logs_/0
Original change's description:
> [dart:io] Fix hanging on zero-length datagram
>
> This is observed on Win and Linux.
> Here is a doc to explain the problem: https://docs.google.com/document/d/1ZzyBUMrDHLU6vNryjgSMJfUruOdpmTImtE_s2E0J8IQ/edit?usp=sharing .
>
> Bug: https://github.com/dart-lang/sdk/issues/39910
> Change-Id: Ia961239f45615f14108bcd66043ac33d9a0a4abe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137425
> Commit-Queue: Zichang Guo <zichangguo@google.com >
> Reviewed-by: Siva Annamalai <asiva@google.com >
TBR=sortie@google.com ,lrn@google.com ,zra@google.com ,asiva@google.com ,zichangguo@google.com
Change-Id: Id84a7cafbc14d6353fa6af8e294e8b0c751a969f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/39910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140009
Reviewed-by: Zichang Guo <zichangguo@google.com >
Commit-Queue: Zichang Guo <zichangguo@google.com >
2020-03-19 23:05:59 +00:00
Zichang Guo
c326c587c5
[dart:io] Fix hanging on zero-length datagram
...
This is observed on Win and Linux.
Here is a doc to explain the problem: https://docs.google.com/document/d/1ZzyBUMrDHLU6vNryjgSMJfUruOdpmTImtE_s2E0J8IQ/edit?usp=sharing .
Bug: https://github.com/dart-lang/sdk/issues/39910
Change-Id: Ia961239f45615f14108bcd66043ac33d9a0a4abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137425
Commit-Queue: Zichang Guo <zichangguo@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2020-03-19 20:23:08 +00:00
Ben Konyi
31fdba6cec
[ VM ] Fix issue where DartDev snapshot would not be found when Dart is installed with Brew
...
Brew uses symlinks to symlinks, and code to determine the directory of
the current Dart executable was assuming that only one level of
symlinking could occur. This change results in symlink evaluation being
performed until we find the absolute path of the executable.
Fixes: https://github.com/dart-lang/sdk/issues/41057
Change-Id: Id7326f09e01383150a41754e71174400cc6ec6b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139781
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-03-17 20:16:25 +00:00
Martin Kustermann
1569b25fde
[vm] Follow-up changes to process_fuchsia.cc
...
This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/139640
Due to the lack of fuchsia builders on Dart CI this was only uncovered
by the roller.
Issue https://github.com/dart-lang/sdk/issues/41076
Change-Id: Ib2bb69aa3b6d1a12f79e544323a8bd3cefe496e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139810
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2020-03-17 18:26:50 +00:00
Martin Kustermann
0ae869771a
[vm] Avoid allocating Monitor/Mutex/... with global initializer, use Init()/Cleanup() functions instead
...
This CL adds a `dart::embedder::Cleanup()` (we already have `dart::embedder::InitOnce()`).
This allows us to allocate the global state and also tear it down.
As a side-effect this will also not allocate those variables if not
needed, which should fix b/151210948
Change-Id: I3c5c619586380bf27ee863ba026bbc631f243d85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139640
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2020-03-17 08:49:52 +00:00
Jason Simmons
704e8eae49
[build] Add the depfile as an output for gen_kernel_bytecode_dill
...
This will ensure that the depfile's directory is created before running
gen_kernel.
Change-Id: I82452b0161e533f31e1749f8e5894be7e58a6b4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139146
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Jason Simmons <jsimmons@google.com >
2020-03-16 18:23:58 +00:00
asiva
e33d023fa0
[BUILD] - Format gn files, this is being done to ensure the unfork CL
...
doesn't show these formatting changes as diffs.
Change-Id: I69ccbf4adabc66d88371cece785a2c1bce60f133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138962
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2020-03-10 21:56:11 +00:00
Samir Jindel
0f284647b1
[vm] Improve docs for Dart_LoadELF.
...
Change-Id: Ied56910220fb6599b374f8adc3091fb696a49b5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138088
Reviewed-by: Samir Jindel <sjindel@google.com >
Commit-Queue: Samir Jindel <sjindel@google.com >
2020-03-09 14:16:47 +00:00
Ryan Macnak
df5036eb6e
[vm] Require only an isolate group, not an isolate, in Dart_Delete[Weak]PersistentHandle.
...
Remove the now-misleading isolate parameter of Dart_DeleteWeakPersistentHandle.
Bug: https://github.com/dart-lang/sdk/issues/40836
Change-Id: I784f1ecf564484b59f60ebef53ddb975aff1bd23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138015
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-03-04 18:56:16 +00:00
Régis Crelier
5701c4fd3b
[VM/nnbd] Remove propagation of library mode to runtime after spec change.
...
On 1/27/20, the nnbd specification changed weak and strong mode instance checks
to make them behave uniformly across legacy and opted-in libraries.
Therefore, it is not necessary anymore to propagate the library mode in
generated code to the runtime.
Change-Id: I42d3ddc6e9a921899aeac21be6374c7893a6d27c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138111
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Régis Crelier <regis@google.com >
2020-03-03 20:30:32 +00:00
Stephen Adams
06155d4996
[vm] Fix command line inspection to allow package: scripts
...
TBR: asiva@google.com
Change-Id: I2d76081a743ec9b1178505ab766d5d40f2d09031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138017
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2020-03-03 01:40:37 +00:00
Ben Konyi
a212b75ba7
Reland "[ VM / DartDev ] Load and run dartdev snapshot if first argument to dart is not a valid file path"
...
Should fix issues with Windows path resolution and a potential invalid free.
This reverts commit 6053084920 .
Change-Id: I683abdbf2c10644e6cadd9643ea880cee9338f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138014
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-03-02 22:55:46 +00:00
Zichang Guo
7a96735eb0
fix failing vm-kernel-win-product
...
Fix for previous cl: https://dart-review.googlesource.com/c/sdk/+/137140
Change-Id: I813399eeb8c074f48e52e8099d57cc78417745e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138006
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Zichang Guo <zichangguo@google.com >
2020-03-02 20:30:57 +00:00
Zichang Guo
0b819161d7
[dart:io] update return type of native calls
...
Some cleans up coming from https://dart-review.googlesource.com/c/sdk/+/136322 .
Update some inaccurate return types of native calls.
Also update null checks for resourceInfo with nnbd flavor.
Change-Id: I937f204e5cd8331df454c81d58e5893be616862e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137140
Commit-Queue: Zichang Guo <zichangguo@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2020-03-02 18:06:32 +00:00
Ben Konyi
6053084920
Revert "[ VM / DartDev ] Load and run dartdev snapshot if first argument to dart is not a valid file path"
...
This reverts commit 9ca77d42be .
Reason for revert: Windows bots going red.
Original change's description:
> [ VM / DartDev ] Load and run dartdev snapshot if first argument to dart is not a valid file path
>
> Change-Id: I754ff3cd44af95364ce8095255a67621f256dbd3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137249
> Reviewed-by: Jaime Wren <jwren@google.com >
> Commit-Queue: Ben Konyi <bkonyi@google.com >
TBR=jwren@google.com ,bkonyi@google.com ,asiva@google.com
Change-Id: Iff3a9e5457b95bfafea16915ae1311e978f5fc1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137824
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-02-28 22:00:45 +00:00
Ben Konyi
9ca77d42be
[ VM / DartDev ] Load and run dartdev snapshot if first argument to dart is not a valid file path
...
Change-Id: I754ff3cd44af95364ce8095255a67621f256dbd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137249
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-02-28 20:40:10 +00:00
Daco Harkes
f7192b63cb
[vm/ffi] Expose dart_native_api.h symbols via dart:ffi
...
This enables dynamic linking of the symbols in dart_native_api.h to work around the Windows linking issue and Dart embedders not exposing symbols.
Issue: https://github.com/dart-lang/sdk/issues/40607
Closes: https://github.com/dart-lang/sdk/issues/40564
Change-Id: I6f797cc915b53ec63fa5953529f17c40e52a2aed
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136962
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-02-28 18:44:45 +00:00
Ryan Macnak
45dda723fb
[standalone] Fix memory leak in DFE::TryReadFile.
...
An empty file is not a failed read. Fixes leak when running tests/standalone_2/io/named_pipe_script_test.dart.
Change-Id: I499c8b1e27038b6da011c74732ce234f43387f80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137652
Reviewed-by: Ben Konyi <bkonyi@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2020-02-28 00:59:53 +00:00
Ryan Macnak
77ddd77c0a
[standalone] Fix memory leak when failing to load a native extension.
...
Change-Id: Ib7996abc122077f8c7191e741f06fc6ff53a0038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137650
Reviewed-by: Ben Konyi <bkonyi@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2020-02-28 00:57:16 +00:00
Ryan Macnak
95f87f321a
[vm, io] Fix some MemorySanitizer issues.
...
Change-Id: Id6e085563b05861351c431a9c067387b4b01270b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137380
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2020-02-27 17:50:43 +00:00
Martin Kustermann
dae308461c
[vm/concurrency] Share [Heap] and [SharedClassTable] between all isolates within one isolate group
...
This CL:
* Moves [Heap]/[SharedClassTable] from [Isolate] to [IsolateGroup], which
will make all isolates in the group use the same heap. The GC will use
the shared class table for object size information.
* Adds support for entering/leaving an isolate group as a helper thread
(e.g. via [Thread::EnterIsolateGroupAsHelper]). The current active
isolate group can be accessed via TLS `IsolateGroup::Current()` or
`Thread::isolate_group_`. When entering as a helper thread there will be
no current isolate.
* Changes the GC to use the above mechanism and ensures GC works without
a currently active isolate. The GC will use information purely available via
[IsolateGroup]. The GC will iterate all isolates within an isolate
group e.g. for scanning roots.
* Makes spawning of new isolates start in their own isolate group.
Once the isolate is fully functional it's heap will be merged into
the original isolate group
* Moves ApiState, containing persistent and weak persistent handles,
from [Isolate] to [IsolateGroup], plus adds appropriate locking.
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: Ia8e1d8aa78750e8400864200f4825395a182c004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126646
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2020-02-20 21:08:35 +00:00
David Morgan
40ba886fa7
Revert "Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API""
...
This reverts commit 082aece5f4 .
Reason for revert: tonic fix not yet landed in google3.
Original change's description:
> Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
>
> This reverts commit 34447c8dbb .
>
> Reason for revert: Last Dart_AllocateWithNativeFields usage removed in Tonic
>
> Original change's description:
> > Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
> >
> > This reverts commit 3d1b8b26c2 .
> >
> > Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.
> >
> > Original change's description:
> > > [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
> > >
> > > These methods are no longer necessary and all objects should be created
> > > using Dart_New instead.
> > >
> > > Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> > > Reviewed-by: Ryan Macnak <rmacnak@google.com >
> >
> > TBR=bkonyi@google.com ,rmacnak@google.com ,asiva@google.com
> >
> > Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
> > Reviewed-by: Clement Skau <cskau@google.com >
> > Commit-Queue: Clement Skau <cskau@google.com >
>
> TBR=bkonyi@google.com ,rmacnak@google.com ,asiva@google.com ,cskau@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Change-Id: I2ac83e1bfccccd9b626acfa4a6ac517b4f3968fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136020
> Auto-Submit: Ben Konyi <bkonyi@google.com >
> Reviewed-by: Ben Konyi <bkonyi@google.com >
> Commit-Queue: Ben Konyi <bkonyi@google.com >
TBR=bkonyi@google.com ,rmacnak@google.com ,asiva@google.com ,cskau@google.com
Change-Id: I74b6fafc86a3adcb52ca9f924fceda7831be8fc0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136222
Reviewed-by: David Morgan <davidmorgan@google.com >
Commit-Queue: David Morgan <davidmorgan@google.com >
2020-02-19 09:28:29 +00:00
Ben Konyi
082aece5f4
Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
...
This reverts commit 34447c8dbb .
Reason for revert: Last Dart_AllocateWithNativeFields usage removed in Tonic
Original change's description:
> Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
>
> This reverts commit 3d1b8b26c2 .
>
> Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.
>
> Original change's description:
> > [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
> >
> > These methods are no longer necessary and all objects should be created
> > using Dart_New instead.
> >
> > Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> > Reviewed-by: Ryan Macnak <rmacnak@google.com >
>
> TBR=bkonyi@google.com ,rmacnak@google.com ,asiva@google.com
>
> Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
> Reviewed-by: Clement Skau <cskau@google.com >
> Commit-Queue: Clement Skau <cskau@google.com >
TBR=bkonyi@google.com ,rmacnak@google.com ,asiva@google.com ,cskau@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I2ac83e1bfccccd9b626acfa4a6ac517b4f3968fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136020
Auto-Submit: Ben Konyi <bkonyi@google.com >
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-02-18 17:34:44 +00:00
Daco Harkes
cb60e4b78e
[samples/ffi] Sample for asynchronous native port calls
...
Issue: https://github.com/dart-lang/sdk/issues/37022#issuecomment-567122704
Change-Id: I774befa1d9843c043883038e59c0f8b629bf3c77
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134822
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-02-18 08:42:16 +00:00
Daco Harkes
76ef075b71
[samples/ffi] Sample for asynchronous callbacks
...
Issue: https://github.com/dart-lang/sdk/issues/37022#issuecomment-567122704
Change-Id: If30d168e6666131b6d96d5885a0dbe32291b1ef9
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134704
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-02-18 08:42:16 +00:00
Samir Jindel
1fbc71da0f
Re-land "[vm] AOT blobs snapshots are obsolete. Remove dead code."
...
Original change is in Patchset 1. I erroneously assumed DART_PRECOMPILER
was only used AOT compilation (it is also used for JIT snapshots).
Change-Id: I77f6c463db7f2b482c9b098f353dc28f0676ea0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135900
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Samir Jindel <sjindel@google.com >
2020-02-17 11:12:15 +00:00
Zichang Guo
da9dd59eb0
Reland "Reland "fix hanging of write on Windows""
...
This is a reland of af4a3112c4
Original change's description:
> Reland "fix hanging of write on Windows"
>
> This is a reland of eb075dcc21
>
> Original change's description:
> > fix hanging of write on Windows
> >
> > When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/40339
> > Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> > Reviewed-by: Zach Anderson <zra@google.com >
> > Commit-Queue: Zichang Guo <zichangguo@google.com >
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I5a07c58709c62b996a55a76272636602dc80e20d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134783
> Commit-Queue: Zichang Guo <zichangguo@google.com >
> Reviewed-by: Siva Annamalai <asiva@google.com >
Bug: https://github.com/dart-lang/sdk/issues/40339
Change-Id: I78e4bd993271cdeac9db5a1d005ae5be0f2891c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135340
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Zichang Guo <zichangguo@google.com >
2020-02-14 17:49:42 +00:00
Siva Annamalai
edd64e6d5c
Revert "[vm] AOT blobs snapshots are obsolete. Remove dead code."
...
This reverts commit bcc0900e6a .
Reason for revert: This CL is breaking the Fuchsia Flutter build see https://github.com/flutter/engine/pull/16604/checks?check_run_id=445155807
Original change's description:
> [vm] AOT blobs snapshots are obsolete. Remove dead code.
>
> Change-Id: I35cf4befbe66b92197dcd659172f90be3de30f8e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134840
> Commit-Queue: Samir Jindel <sjindel@google.com >
> Reviewed-by: Ryan Macnak <rmacnak@google.com >
TBR=rmacnak@google.com ,sjindel@google.com
Change-Id: I9dd32a71bf43907f59ed766b98bf453bab99ea3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135881
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2020-02-14 06:40:31 +00:00
Samir Jindel
bcc0900e6a
[vm] AOT blobs snapshots are obsolete. Remove dead code.
...
Change-Id: I35cf4befbe66b92197dcd659172f90be3de30f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134840
Commit-Queue: Samir Jindel <sjindel@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2020-02-13 14:16:49 +00:00
Clement Skau
34447c8dbb
Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
...
This reverts commit 3d1b8b26c2 .
Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.
Original change's description:
> [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
>
> These methods are no longer necessary and all objects should be created
> using Dart_New instead.
>
> Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> Reviewed-by: Ryan Macnak <rmacnak@google.com >
TBR=bkonyi@google.com ,rmacnak@google.com ,asiva@google.com
Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
Reviewed-by: Clement Skau <cskau@google.com >
Commit-Queue: Clement Skau <cskau@google.com >
2020-02-13 08:27:07 +00:00
Ben Konyi
3d1b8b26c2
[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
...
These methods are no longer necessary and all objects should be created
using Dart_New instead.
Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2020-02-12 22:48:08 +00:00
Alexander Aprelev
f352f9e5e2
Revert "Reland "fix hanging of write on Windows""
...
This reverts commit af4a3112c4 as it broke asan linux bot.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Reland "fix hanging of write on Windows"
>
> This is a reland of eb075dcc21
>
> Original change's description:
> > fix hanging of write on Windows
> >
> > When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/40339
> > Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> > Reviewed-by: Zach Anderson <zra@google.com >
> > Commit-Queue: Zichang Guo <zichangguo@google.com >
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I5a07c58709c62b996a55a76272636602dc80e20d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134783
> Commit-Queue: Zichang Guo <zichangguo@google.com >
> Reviewed-by: Siva Annamalai <asiva@google.com >
TBR=zra@google.com ,asiva@google.com ,zichangguo@google.com
Change-Id: I5f53e42c56859a46e9fe40e1a1e7fba541e5378e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/40339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135260
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Alexander Aprelev <aam@google.com >
2020-02-11 02:58:10 +00:00
Stuart Morgan
1256b50a15
Fix issues found compiling with clang on Windows
...
Fixes various minor issues that are warnings or errors when building
with clang.
Bug: https://github.com/dart-lang/sdk/issues/40448
Change-Id: I5166940f9f41fcd89148b88f58513d199a4171d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134502
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Zach Anderson <zra@google.com >
2020-02-10 22:39:05 +00:00
Zichang Guo
af4a3112c4
Reland "fix hanging of write on Windows"
...
This is a reland of eb075dcc21
Original change's description:
> fix hanging of write on Windows
>
> When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> Reviewed-by: Zach Anderson <zra@google.com >
> Commit-Queue: Zichang Guo <zichangguo@google.com >
Bug: https://github.com/dart-lang/sdk/issues/40339
Change-Id: I5a07c58709c62b996a55a76272636602dc80e20d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134783
Commit-Queue: Zichang Guo <zichangguo@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2020-02-10 22:16:55 +00:00
Daco Harkes
160614929a
[vm/ffi] Fix sign extension for small int arguments on x64 Linux/MacOS
...
Sign extension of small integers is not symmetric between register arguments and register return values.
On Linux/MacOS x64, the caller is responsible for both the arguments and return value.
Previous tests only tested equality, which tests the equality of the lowest byte. However, when printing or using the small ints arithmetic all 4 bytes are used. The new tests pass back the number in a different format.
The callback tests test the number in Dart, so they did not suffer from implicit conversions. (TestTakeMaxUint8x10 in runtime/bin/ffi_test/ffi_test_functions.cc and tests/ffi_2/function_callbacks_test.dart.)
Fixes: https://github.com/dart-lang/sdk/issues/40537
Change-Id: I6a57cb7cb43206926eb101a66e3b2abfacec72a0
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134825
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-02-10 17:05:14 +00:00
Zichang Guo
748bbb720a
Revert "fix hanging of write on Windows"
...
This reverts commit eb075dcc21 .
Reason for revert: Out of memory on IA32 and On MacOS, invalid path argument on MacOS.
Original change's description:
> fix hanging of write on Windows
>
> When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
>
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> Reviewed-by: Zach Anderson <zra@google.com >
> Commit-Queue: Zichang Guo <zichangguo@google.com >
TBR=zra@google.com ,asiva@google.com ,zichangguo@google.com
Change-Id: I9d515912ad99f523c6d19fac0c8fbbb23a897986
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/40339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134768
Reviewed-by: Zichang Guo <zichangguo@google.com >
Commit-Queue: Zichang Guo <zichangguo@google.com >
2020-02-06 20:34:32 +00:00
Zichang Guo
eb075dcc21
fix hanging of write on Windows
...
When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
Bug: https://github.com/dart-lang/sdk/issues/40339
Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Zichang Guo <zichangguo@google.com >
2020-02-06 19:58:52 +00:00
Jason Simmons
04339705d0
[vm] Bring back the Fuchsia implementation of File::OpenStdio
...
Change-Id: Ic143fabd106c693779799916da9d0e81809d580f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134762
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Jason Simmons <jsimmons@google.com >
2020-02-06 19:44:07 +00:00
Jonas Termansen
f688645909
[dart:io] [vm] Fix poll(2) loop while waiting for a process to exit.
...
The loop didn't correctly handle if the fd closed wasn't the last in the
list, instead it would skip an entry and would accidentally consider the
closed entry twice.
The error handling was also wrong, where a file descriptor could be
closed multiple times if an error occured after one of the file
descriptors had already been closed. Additionally the POLLERR and
POLLNVAL conditions were not handled.
Fixes https://github.com/dart-lang/sdk/issues/40441 .
Change-Id: I4b4da067bbaf40af329e37ccf45d85f8bbf6c914
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134723
Commit-Queue: Jonas Termansen <sortie@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-02-06 16:40:32 +00:00
Ben Konyi
6548694a82
Reland "[ VM / DartDev ] Added support for format and pub commands via standalone VM"
...
Fixes a malloc/delete[] mismatch.
This reverts commit b3396cbdca .
Change-Id: I18fe142bc60bedd8af4c588ba4039742e1d34606
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134570
Reviewed-by: Liam Appelbe <liama@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-02-06 00:04:09 +00:00