Change-Id: If568c551e8183d81ab02a1822deb3979165561f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199861
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
In a given library, every import directive has a set of "used
elements," the subset of elements provided by the import which are
used in the library. In a given library, an import directive is
"unnecessary" if there exists at least one other import directive
with the same prefix as the aforementioned import directive, and a
"used elements" set which is a proper superset of the
aforementioned import directive's "used elements" set.
https://github.com/dart-lang/sdk/issues/44569
Change-Id: I4da43be36837cdafb07a0ab67a94e644f351e593
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177221
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Ran into this error when trying to set up a finalizer with an Object
owner. The super class is null in this case.
Change-Id: I27f67a738c72c0b433e367257c638a6d3d2e495f
TEST=ci and manual testing
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199602
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
In each library where an import is removed, the library uses some elements
provided by the import, BUT there is another import which provides all of the
same elements, and at least one more which the library uses.
In this change, we remove the imports which can be simply removed in favor of
the other already present imports.
See https://github.com/dart-lang/sdk/issues/44569 for more information.
Change-Id: I3d4fea152048232b44db2f931a5be2c17b5c0f18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199463
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This should improve performance of lightweight isolates configuration
TEST=ci, perf benchmarks
Change-Id: I98ac9a7e02318d58db3431a6d33f08ab95e607fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199700
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
In these tests I've tried to test a lot of the corner cases
surrounding the addition of a `<type arguments>` selector to the
grammar (which we intend to do as part of constructor tearoffs), to
make sure that when we do so, we don't break any existing
functionality.
Change-Id: I765195cdd3745904f4aeb36663f59afe03381ab8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200001
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Change-Id: I0cfd2ad9e59c985f632d7038a64d903f6b472dd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199480
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Annotations are evaluated in the CFE and the VM does therefore
not encounter any AST nodes anymore.
TEST=Existing test suite.
Change-Id: Id0ac60cf0d1a8d1667c79541c1de66765778ce90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200183
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
If the type arguments vector gets introduced in subclasses where the
base classes have already many fields we may not be able to load the TAV
in one instruction on ARM64.
Issue https://github.com/flutter/flutter/issues/82278
TEST=vm/dart{,_2}/flutter_regress_82278_test
Change-Id: I164ef42af3afe8267fe23a8a11af9401776eccdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199481
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Fixed by migrating to dict.items() which is available in both python2
and python3.
TEST=Manual testing in python2 and python3.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-win-release-x64-try
Bug: https://github.com/dart-lang/sdk/issues/46029
Change-Id: I1c8363dfc44dc39f2430f84c4f22631a2e7203cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200184
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This reverts commit a527411e51.
Reason for revert: depends on package 'devtools_shared' that is not yet migrated.
Original change's description:
> [ package:dds ] Add null safety support
>
> Fixes https://github.com/dart-lang/sdk/issues/45756
>
> TEST=service + DDS tests
>
> Change-Id: I6dd14d7f9fdee479a830c3b053dc3b00aa635202
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199800
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Icdaef3ac55d7ef302acd3f9c2538a41e52e4253a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200180
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
This doesn't change the way any of the fixes can be applied, nor the set
of fixes associated with any code. It merely finishes a re-organization
task that was started earlier.
Change-Id: I911961fe5ec2aea211a6f0a51db24a4c4b32be26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200061
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
New FunctionInvocation nodes have explicit static type information such
as function access kind and function type. However, an attempt to use
this information revealed that it is less accurate compared to the old
call site attributes metadata
(see https://github.com/dart-lang/sdk/issues/46003 for details).
This change reverts back to using call site metadata when building
flow graph for FunctionInvocation nodes. It fixes regression of
ListCopy benchmark with new invocation nodes.
TEST=benchmarks/ListCopy/dart/ListCopy.dart with new invocation nodes
Issue: https://github.com/dart-lang/sdk/issues/45340
Issue: https://github.com/dart-lang/sdk/issues/46003
Change-Id: I73e5fae49b8056365211989e6e656544c79bcc50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199563
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
In each library where an import is removed, the library uses some elements
provided by the import, BUT there is another import which provides all of the
same elements, and at least one more which the library uses.
In this change, we remove the imports which can be simply removed in favor of
the other already present imports.
See https://github.com/dart-lang/sdk/issues/44569 for more information.
Change-Id: Ifebf11894fd62280b20230aa6d66de41cf6baae8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199462
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
VM can use pragmas on local functions, which are actually put on
VariableDeclaration nodes. This change teaches TFA tree shaker to
keep such pragmas.
TEST=pkg/vm/testcases/transformations/type_flow/transformer/pragmas.dart
Issue: https://github.com/dart-lang/sdk/issues/45987
Change-Id: Ic2db375a93b539a131eca2431bef0e317a4d1b2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199520
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
We no longer use constructors as tokens for a type, and no longer use
constructors or '$is' markers for function typedefs.
- globalPropertyNameForType can be removed,
- runtimeTypeName is removed as it is redundant with className
- `className` is the remaining Namer method returning the globally unique name for a class or interface type.
Removed Namer.fieldPropertyName, as all fields with property names
are handled by instanceFieldPropertyName.
Change-Id: Ie8bc7498bec75a0416ba30e1cd861636fdfae464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199860
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This makes SDK summary about 15% smaller.
Change-Id: Ie29ac08c94b3e5712b576efec5875e799811dd2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
There is a lot of violations in the generated code.
Will fix it separately.
Also, there are more deprecated package:analyzer API usage.
Will fix it separately.
Change-Id: Ib2ead22925df9a5012cd331c0fb5cf62946561bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>