InterfaceType's referring to unnamed mixin applications continuously
cause problems for backends since these might not correspond to
types supported at runtime. The LUB specification does not mention
how to handle these so it is valid skip these in the computation of
LUB.
Change-Id: I38f46bf43d5858dec473c26326b741cf36eb57d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145420
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Turns out, even thought Heap constructs an elaborate event
object, and attaches it to the ServiceEvent, the service
does its own event construction (again).
As a result the ServiceEvent has quite a different layout
and no concept of before/after.
This CL changes Dart_GCEvent to more closely follow the
JSON event emitted by Service.
Bug: https://github.com/dart-lang/sdk/issues/43106
Change-Id: I34f33f23065ea7a92142ee7df23ab05ca91f161e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161176
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Also replace any null flag entries left in the parameter names array to
zero Smi values, so that after truncation, no null checks are needed for
retrieved flag entries.
Now that all appropriate places truncate the parameter names array after
setting any required bits, dynamic closure call dispatchers can simply
check for any post-name flag entries to detect missing required named
parameters if no named arguments were passed.
Without the added truncate calls, then
vm/dart/minimal_kernel_bytecode_test fails when dynamic closure call
dispatchers use that shortcut as seen on patchset 1 of CL 160725.
Bug: https://github.com/dart-lang/sdk/issues/40813
Change-Id: I25abd23ad3ce42b03ec5ca29b4e067c162826066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160860
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Code objects might be connected by static calls and these references
were not included into the profile. This lead to some objects being
unreachable from the root.
This CL also adds a test which computes dominators for all nodes
in the snapshot (this in turn verifies that there are no
unreachable nodes).
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I2af4107fdb7f875624192e892ce1cec78cbf0dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161709
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This CL improves recovery in situations like this:
typedef c = foo(int x);
=> recovers like typedef c = foo Function(int x);
typedef d = (int x);
=> recovers like typedef d = Function(int x);
typedef e = foo<F>(int x);
=> recovers like typedef e = foo<F> Function(int x);
typedef f = <F>(int x);
=> recovers like Function<F>(int x);
typedef g = foo<F, G, H, I, J>(int x);
=> recovers like typedef g = foo<F, G, H, I, J> Function(int x);
typedef h = <F, G, H, I, J>(int x);
=> recovers like typedef h = Function<F, G, H, I, J>(int x);
typedef i = <F, G, H, I, J>;
=> recovers like typedef i = Function<F, G, H, I, J>();
And appropriate error messages are given:
"Expected 'Function' before this." and (when inserting parenthesis)
"A typedef needs an explicit list of parameters.".
Fixes#26073.
Change-Id: I368f36f2993033d62b36315198bc993eed74bc92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161485
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The bodies provided to COMPILER_PASS macro uses are put into
a DoBody method of a generated class that has the following signature:
virtual bool DoBody(CompilerPassState* state);
CompilerState::Run uses this return value to decide whether to repeat a
given pass.
Previously, if no precompiler was provided in the compiler state, the
SerializeGraph compiler pass returned the compiler state. Since the
compiler state itself was not nullptr, it would implicitly convert to
true, meaning that CompilerState::Run would always run SerializeGraph
twice in this case. Since SerializeGraph was marked as an AOT pass,
though, this case never happened as the precompiler is always provided
for AOT passes.
In the meantime, others have used it as a basis for new compiler passes
with early returns that _could_ happen and then were confused by seeing
the pass happen twice in those cases. Fix the return value so it avoids
such confusion in the future.
Change-Id: I3a91e84abe2fbcc8437c64ce1b5b91f3d4808c65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161784
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Arguments descriptors for invocation dispatchers are loaded as
constants. However, we only optimize type argument length field loads
from constant argument descriptors, so the prologue code is less
efficient than it could be in these cases.
Add the appropriate cases for pulling out the count, positional count,
and size as constants from constant argument descriptors in
LoadFieldInstr::TryEvaluateLoad, which is enough to let the optimizing
compiler tune this code appropriately.
Also remove the code for handling dynamic closure call dispatchers
specially within the prologue builder and instead explicitly generate
any checks that use the runtime closure value in the dynamic closure
call fragment builders after the prologue.
Bug: https://github.com/dart-lang/sdk/issues/40813
Change-Id: Ie9bd4c01c3b604f282e9b2a72327b7fc81dc4eaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159905
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This partially reverts https://dart-review.googlesource.com/c/sdk/+/154180.
The main mechanism for setting domain policy is still useful as we will
use this to avoid insecure connections for higher level protocols (such
as HTTP and gRPC).
We already knew Android does not enforce network policy at socket level
but it turns out iOS does not as well:
> ATS doesn’t apply to calls your app makes to lower-level networking
> interfaces like the Network framework or CFNetwork. In these cases,
> you take responsibility for ensuring the security of the connection.
This also resolves the need to fix
https://github.com/dart-lang/sdk/issues/43223 as we are no longer
enforcing the policy at socket level.
Change-Id: I3913da8ea39dac2c5a70fdabe442775b18cfd0c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Mehmet Fidanboylu <mehmetf@google.com>