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>
Some Android ARM emulators claim support for idiv features in /proc/cpuinfo
but trigger a SIGILL when executing these instructions.
See https://github.com/flutter/flutter/issues/37193
Change-Id: Ie2a93df7a286a933190164bb31d6210c1658a260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140248
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Since constant evaluation moved out to the CFE we should no longer hit
thise code path.
Change-Id: Ifeec982f7c09b089e7bfd442f84ee32667b31ab6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140281
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This reverts commit a4c6356df3.
Reason for revert: external_service_notification_invocation_test failing on at least AOT
Original change's description:
> [ VM / Service ] Migrated Observatory service tests from package:unittest to package:test and package:expect.
>
> Tests which previously used 'expect' in the target process have been
> changed to use 'Expect.*' as 'package:test' throws an exception when
> using 'expect' outside of a 'test(...)' scope.
>
> Change-Id: I4e031cafd19f294bfcb1deb6a253b42b4122e653
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140160
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I242156e0868d6bd0a3b6d7f7db94c22001d5dbc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140221
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Tests which previously used 'expect' in the target process have been
changed to use 'Expect.*' as 'package:test' throws an exception when
using 'expect' outside of a 'test(...)' scope.
Change-Id: I4e031cafd19f294bfcb1deb6a253b42b4122e653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140160
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This constructor will be broken in Dart 3.
Change-Id: I8c11a862ba55bb1310d87c66e6ce5c3d85825b88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140004
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
I missed an edge case in the subtyping rule. If the this function
has a required param, and the other function is entirely missing
that param, then we would mistakenly call that a valid subtype.
language/nnbd/required_named_parameters/required_named_args_strong_test
found the bug. This test is now passing in strong mode.
Bug: https://github.com/dart-lang/sdk/issues/40968
Change-Id: Ica13bcf4d287e13050f81652e07dcc40c155a801
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140143
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
This fixes some mirrors failures in NNBD legacy mode, since the CFE is
inserting more synthetic functions now, to handle interfacing between
libraries with different NNBD status.
Change-Id: Iad5cb2548ef118f842bf2eadf249d4dca9f38fa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139740
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
CFE does not always normalize FutureOr<T> eagerly, e.g. it does not normalize
FutureOr<Null> parsed in the source. However, it normalizes inference or
instantiation results.
For performance reasons, the VM chooses to do it eagerly, i.e. it must also
normalize unnormalized types from a kernel file.
Change-Id: I5798333ba3c58c5b2851045ef32c345d94f58268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139955
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Note that the remaining failure on line 28 of test
language/nnbd/type_equality/futureOr_normalization_legacy_test
is due to the CFE failing to normalize at compile time.
Change-Id: I8e982830f59cfa5cdf45314aa7a34026975ba952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139863
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
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>
Hitting the assertion from the issue (see below) is innocent: It
informs us that we should avoid speculating operands to be Smis if we
actually know for sure the receiver cannot be a Smi (based on interface
target).
This particular case was hit on an instance call `a ^ b` where the interface
type tells us it is `boo.^` - so we shouldn't insert CheckedSmiOp.
There might be more cases where we insert CheckedSmiOp/CheckedSmiComparison
instructions where we shouldn't (because interface target tells us
receiver cannot be a Smi).
-> In debug mode we'll hit this assertion, so if the fuzzer finds more such
cases, we should fix them one-by-one.
Fixes https://github.com/dart-lang/sdk/issues/40937
Change-Id: I55624f77b9edeece4d1334f1629ce5514cf3784a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139812
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
When performing protobuf-aware treeshaking, we may generate a kernel
file which will later be used in conjunction with a non-transformed
platform kernel. In this case signature shaking is unsafe.
The original revision is in patchset 1.
This reverts commit b59dad38df.
Change-Id: I1a85e42f245fcdbd821fa1f07b2e9966b8c2d958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139100
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
TSAN reported this as a data race between the native resolution reading the resolver function when the compactor could move it.
Fix a similar pattern in reload.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: Ia62a8201aacfe105697d4af6dc6724fbc513dbfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139540
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
So far we relied on our normal Dart tests to exercise and test TTS.
This CL adds concrete TTS unit tests, which directly construct the
values the TTS accepts via the calling convention (instance,
dst_type, instantiator tav, function tav), and allows us to test
* whether TTS handled the type test
* whether TTS was falling back to STC which handled the type test
* whether TTS (and STC) preserve the necessary registers
This CL also gets rid of TMP usage in TTS related code.
This CL also adds documentation about TTS to
runtime/docs/compiler/type_testing_stubs.md.
This CL also fixes two issues:
* handle all-dynamic null vector `as Foo<..., T, ...>`
* compare the actual type parameter value in `as Foo<..., T, ...>`
(instead of using type_class_id>)
There seem to be no major performance changes, some benchmarks change
positive/negative but many of them seem to be bi-modal.
Issue https://github.com/dart-lang/sdk/issues/40964
Issue https://github.com/dart-lang/sdk/issues/40736
Change-Id: Iad41e405fe693c67be6221a18e3dad03cc0a5f24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139461
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
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>
A thread can exit an isolate while it still has Dart frames. The Dart frames must still be visited by the GC, but the dart::Thread is no longer associated with an dart::OSThread.
Add the PID to stack dumps to make it easier to match core dumps to stacks dumps.
Change-Id: Icb427ad99f4c0072d54b7c9516e922904403d1c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139747
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
The observatory used to crash when viewing a library without a root uri,
because it attempts to view a script that doesn't exist. Now, we show a
message explaining that the library doesn't have a root script instead.
I also noticed that, for sources without file uris (which in my understanding
is legal in Kernel), the ScriptRefElement displays an empty link that
can't be clicked. Now we show some a fallback text.
Change-Id: I5f67d3a308eee44d2d05cc2427c5e75d6af89f18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139287
Auto-Submit: Simon Binder <simolus3@gmail.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Remove phis which have redefinitions of the same value in the arguments:
v1 = ...
v2 = Redefinition(v1)
v3 = phi(v1, v2)
Also eliminate redundant branches after DCE and merge blocks after
branches are eliminated.
Fixes https://github.com/dart-lang/sdk/issues/41004
Change-Id: I9d4e6c8ed356ab185fee85678e45841d82357403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139602
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
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>
Providing `filterKey` will result in all timeline events associated with
the TimelineTask including a `filterKey` entry in their arguments map,
set to the value provided in the constructor. This will allow for a
consistent way for tooling to filter asynchronous timeline events.
Fixes https://github.com/dart-lang/sdk/issues/40861
Change-Id: I06d3f9c73f06c2ff0e495f1b6a57fcf357d625a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139312
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>