This method relied on querying the underlying constraint variable, so
it needed to go in order to migrate away from the contraint variable
implementation.
Change-Id: I0c5004f98fcbb1891ade67266350569a196cf756
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is a necessary part of reworking nullability migration to stop
using constraint variables entirely.
Change-Id: If6c347c16882edfc2e8bdbeac761e09d8256c9bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This speculative feature turned out to be infeasible, since the files
that are input to migration have NNBD disabled, so `?` is not
permitted.
Change-Id: Ice3fabe436c25718cbe4099a4d9ef86c8aa19896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This helps reduce the use of constraint variables in nullability
migration tests.
Change-Id: I48fb540489b1124f278b542a7f847c4dd3270185
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101465
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This required tracking the map from a node to the nodes that are
upstream from it.
Change-Id: I079fac2196f3928b521b0866fd6f1790e6f24573
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101489
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit 40a06c3a77.
Reason for revert: Introduced a bug that is blocking a roll.
Original change's description:
> Implement the type Never
>
> Change-Id: Icbf407bc19f602c8382946b1e735905cc165c59c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100993
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>
TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com,mfairhurst@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Iebb5b8327b0be7129298f39b343555b812314abf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
We don't report UNUSED_IMPORT when the library file does not exist,
so that libraryElement.isSynthetic, and an empty but existing file
is not the same as not existing at all.
R=brianwilkerson@google.com
Change-Id: I33d911b01f2ca7e1f5c4fdda7083507f469ec6c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The reason when there is a difference in summary1 and summary2 behavior
is that in summary2 we link cycle by cycle, and in summary1 we link
all requested libraries together.
R=brianwilkerson@google.com
Change-Id: I173d37d7a6b6c766c641715c6dbce7c1701139f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101492
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This should make the build cycle green again.
Change-Id: I7a355020247d9edb18ad93cb6d890baef312a206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101295
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This also bumps the protobuf version.
Change-Id: I3e2d4f8fddcac5f7ac213fbad5a36804d917e34c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101296
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
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>
When we are checking `A`, we will catch self-reference and stop.
But when we are checking `B`, we still need to stop.
typedef A A();
typedef B(A a);
R=brianwilkerson@google.com
Change-Id: I8ad57a94301ec3379c2480c782637c502aa02675
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The previous design (which stored the graph impicitly in the nodes
themselves) had a memory leak because some nullability nodes are
static, meaning that once a node became connected to one of the static
nodes, it would never be garbage collected.
Change-Id: I9821660198e29ff974ee0afa678851e0418e0527
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101487
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Message is a C++ type with a simple ownership model appropriate for
std::unique_ptr. This CL applies the following changes:
1. All uses of "new Message(...)" are replaced with
"Message::New(...)", which is effectively
"std::make_unique<Message>(...)". (The latter was only added in C++14,
but Dart still compiles in C++11 mode.)
2. All owning Message* are replaced with std::unique_ptr<Message>. The
notable exception is MessageQueue, which still uses raw Message*
internally to simplify the linked list handling.
3. All "delete message;" statements are removed.
4. Uses of "NULL" replaced with "nullptr" as necessary.
Change-Id: I05b5804289f2a225bfa05d3c1631129358fed373
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101222
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Matthew Dempsky <mdempsky@google.com>
So, wee set one when resolving constructor initializers, even if it
is empty.
R=brianwilkerson@google.com
Change-Id: Ia63e60ed40bbf7e9c7f681acbce9548cc03bca65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Had to do a few changes to make this happen:
1. Restored some of the code removed in the transformer, making class
hierarchy optional.
2. Split the "compile" method in bazel_worker.dart into two, since we
need the intermediate Component object in one of the case.
Change-Id: I0ee004467e76dff0025f7979834c62b9db328ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100480
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Forward jumps in bytecode usually go to the 'else' part (skipping 'then')
or exit loops. In order to generate Branch instructions in flow graph
which would represent ifs and loop conditions more naturally the first ('true')
successor of a BranchInstr should correspond to fallthrough in bytecode, and not the
target of a Jump bytecode instructions.
This results in a slightly better register allocation.
Golem shows overall improvement +0.4620% on x64 and +0.8395% on arm64.
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I1ea581ef9f5998eb960914680d0e867c57639f1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101361
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
'is' checks which are represented as _simpleInstanceOf() calls
are sometimes recognized by Token::kIS and not by a target of a call.
Before: TypeChecks.IsCheck(RunTime): 279.63057234726693 us.
After: TypeChecks.IsCheck(RunTime): 200.77956524794217 us.
(best of 5 runs)
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I5a22222c59c33d2fa8262383a597c2c013ab61b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101322
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>