Commit graph

78472 commits

Author SHA1 Message Date
Sam Rawlins e1414089cf Analyzer: avoid dynamic calls while examining Yaml
Change-Id: If569c74bad1d3762deb4cc74ea617d291ec33619
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190727
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-12 16:50:37 +00:00
Kallen Tu ef01825d44 [cfe] Const function tests removed SharedOptions.
Change-Id: I51ceedf4b140f6aef2af407058c5e7c23860c850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190801
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-03-12 16:20:17 +00:00
Jens Johansen 31acdc9d92 [parser] Recovery of of new/const/Map/Set/List with said literals
E.g. recover `Map<int, int>{}` by ignoring the map (i.e. it's
just a literal map), recover `new {}` as just `{}` etc.

Fixes #45251.

Change-Id: I44e67ca6d3b9b068014b8e28822a61063c794d57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190022
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-12 10:41:06 +00:00
Konstantin Shcheglov dd706e1c0c Issue 45263. Fix resolveToBound() to resolve the promoted bound as well.
Bug: https://github.com/dart-lang/sdk/issues/45263
Change-Id: I285e675bdec931b1987ac97045e6f97e55ad3fd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190730
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-03-12 07:23:49 +00:00
Mayank Patke 3c5767ccd3 [dart2js] Ensure RTI need/checks account for instantiations.
If a type variable T is used in an `is` or `as` expression (e.g.
`42 is T` or `42 as T`) or is part of a subtype check, then any types
which may be substituted for T via instantiation must also be treated as
participating in a type check.

This CL ensures that the RTI need computation includes type arguments
for those substituted types and that those types are included in the
list of implicit checks.

Additionally, in order for this to work, this CL fixes a bug in which
the impact transformer was failing to register generic instantiations
occurring in (partial) constants.

Fixes: https://github.com/dart-lang/sdk/issues/45046
Change-Id: I98ae0eca0adcbbb26cdd664318da0da578b289b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190460
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-03-12 04:47:59 +00:00
Mayank Patke 97771fb2f2 [dart2js] Add failing tests for issue #45046.
Bug: https://github.com/dart-lang/sdk/issues/45046
Change-Id: I6b0010b78c1781c9c264b9a479dc2136ded3105c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185495
Reviewed-by: Stephen Adams <sra@google.com>
2021-03-12 04:47:59 +00:00
Brian Wilkerson 2f3c274632 Clean up some code in analysis_server
Change-Id: Icaa4cc19d1966e3dbc70f82745e4fd771a18ed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190728
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-12 04:45:39 +00:00
Anna Gringauze f13285482d Fix expression evaluation failure after hot restart
The lifetime of program compilers in JavaScriptBundler is too short,
moving the program compiler cache to FrontendCompiler instead
so the ProgramCompilers created during main compilation could be reused
for expression evaluation until the next compilation.

Closes: https://github.com/dart-lang/sdk/issues/45266
Change-Id: I7d41476c7064f16cab2783f88c49114a08a0c038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190301
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2021-03-11 23:16:41 +00:00
Kallen Tu 494aaaab39 [cfe] Variable assignments (VariableSet) for const functions.
Change-Id: Iab23493fc09b8fdad78968d905ac8f28e1236aa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190620
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-03-11 23:14:41 +00:00
Vyacheslav Egorov 4e027fae97 [vm/compiler] Force unboxing of int phis on 64-bit platforms
More specifically on 64-bit platforms, when other heuristic fail:

- in AOT mode unbox all int typed phis.
- in JIT mode unbox all non-Smi int typed phis i.e. mixed
  Mint/Smi phis.

This brings treatment of int phis closer to how we treat other
boxed phis.

This considerably improves AOT code quality for loops which
our current conservative heuristic does not currently hit,
for example:

  void foo(int start, int end) {
    for (var i = start; i < end; i++) {
    }
  }

Code like this would use a boxed Phi previously which does not make
sense.

In JIT mode to really benefit from aggressive unboxing we
might need to shift from over-reliance on Smi operations, e.g.
when phi is unboxed we want to cascade that through and unbox
operations which are performed on it transitively. This requires
much more sophisticated algorithm and is outside of scope for this
change.

In AOT we in general treat all arithmetic operations as operations
over 64-bit int values so unboxing phis makes more sense.

As a result of this change we see small improvement in code size:

  flutter_gallery_app_so_gzip_size -0.2392%

TEST=ci


Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try
Change-Id: Iae9a16f353e53f649da4e665d2812ad47099a674
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187860
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-03-11 22:20:51 +00:00
Sam Rawlins fa0f4680df analyzer: Remove nullable types from _DisoverAvailableFilesTask:
* remove `isCompleted` field which duplicates `completer.isCompleted`
* make `completer` non-nullable
* make `files` non-nullable
* move `folderIterator` from class as field to `perform()` as local

Change-Id: Ic67dbf8d4e6487152ae1ca6752c45f5c59c70862
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190725
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-11 21:48:31 +00:00
Keerti Parthasarathy 98d6994a35 Remove keertip@ from watchlists for build changes
Change-Id: I07fe96c5b65615b5c193d78df8ac551d547e9bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190780
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2021-03-11 21:45:41 +00:00
Sam Rawlins 5aca96546b vm_service: Remove unnecessary '?' from dynamic types
Also update the generator:

* Remove same unnecessary '?'
* Update MemberType.name, TypeRef.ref to be non-nullable

Bug: https://github.com/dart-lang/sdk/issues/45165
Change-Id: I438e9ce1e02faac9417a7d2d4ace143f2cf6feb3
TEST=Just the regular trybots.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190722
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-03-11 20:14:41 +00:00
Konstantin Shcheglov 54b2948461 Replace TypeAnnotation.type with null check with 'typeOrThrow'.
Change-Id: I16922aef63d294448436c93004386ee8a3439e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-11 19:41:10 +00:00
Ryan Macnak 8db0a975c1 [vm] Allow garbage in the upper-half of compressed Smis.
Allows removing a branch when decompressing pointers and removing fixup sign-extension after Smi ops that use 32-bit ops to detect overflow. Increases the code size of indexed and stores for some widths due to addressing mode limitations.

TEST=ci
Change-Id: Ia48353cccbbc586dd0d2e055a843c65e37c63a30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185660
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2021-03-11 19:39:01 +00:00
Sam Rawlins d44d590ceb analyzer: Remove unused WorkToWaitAfterComputingResult
Change-Id: I7f3925c19e6375e93fdc67ed394ec1ad472ffd98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190680
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-11 19:30:11 +00:00
Brian Wilkerson d043b1428e Resolve type parameters to their bounds when suggesting instance members
Change-Id: I19fe690216ba0c0dd7d0444d7bda4a58aaa3e8a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190723
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-11 19:14:30 +00:00
Brian Wilkerson 917688fe3c Resolve type parameters to their bounds when computing the context type
Change-Id: I34349ccf3728e0cc1f1caab4499896f2f827e85b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190721
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-11 18:59:01 +00:00
Alexander Thomas e7ad5b9b42 [infra] Fix type errors in Firestore client
The http package now requires Uri objects.

Change-Id: I3952e8ac9dce6549a1936c48cd4f060224827fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190527
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-03-11 18:37:51 +00:00
Alexander Markov c73ab38596 [vm] Count heap size for canonical tables
This is a follow-up to https://dart-review.googlesource.com/c/sdk/+/185381.
That change introduced a more compact serialization of canonical sets,
but it didn't include correct counting of heap size of tables
allocated during deserialization of canonical sets.

This change adds counting of heap size of canonical tables.
The heap size benchmark numbers will regress with this change,
but this is only due to a more accurate counting, not due to a real
regression.

TEST=ci

Change-Id: I42ee3bd91f0420bf41c660d2eaa51e9901d9b198
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190580
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-03-11 17:47:41 +00:00
Konstantin Shcheglov 1712737dea Support for single file analysis in 'dart analyze'.
Bug: https://github.com/dart-lang/sdk/issues/43891
Bug: https://github.com/dart-lang/sdk/issues/43271
Change-Id: Ifb3c0c10eabaabb19777838bccf7851199b8c778
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-11 17:21:50 +00:00
Brian Wilkerson 78ca98ac8e Minor cleanup to SuggestionBuilder
Change-Id: I1f3a71b81e7f2bb29808102ea076c7e7e67a6967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190740
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-11 17:18:30 +00:00
Brian Wilkerson 879f46ea4f Make element-specific features be relative to the element kind range
Change-Id: Ia4194ed749bbd78a85c0c189f1dc95f5b555c95b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190581
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-11 15:28:20 +00:00
Tess Strickland 5b8b55dfdd [vm/compiler] Fix size regression with symbolic stack traces enabled.
TEST=Manually checked via Golem.

Change-Id: I4986d99afd9dbcc5f63292baa89ec9053b0f37a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190524
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-03-11 11:16:41 +00:00
Johnni Winther ab694d352d [dart2js] Handle promotion in inference of locals known to be null
In the inferrer code like `local == null` would use the type information
for the operands to determine whether the call was `o == null` or
`null == o`. This had the side effect that if the left operand was a
local variable known to have value `null` the case would be treated as
`null == o` and the local would not be promoted to non-null on the false
branch.

Change-Id: I5fa08f8c891578f4c8e337e6cf5882fc2383063f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189210
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-03-11 10:39:41 +00:00
Konstantin Shcheglov 14998dfa5a Fix unlinked API signature for const/static out-of-order.
Saw a crash in logs, was able to reproduce.

Change-Id: I2632c9ec7c3c34e6498f74e17507505128664418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-11 01:33:21 +00:00
Ben Konyi 8bd3088588 [ CLI ] Update analytics messaging
Fixes https://github.com/dart-lang/sdk/issues/45252

Change-Id: I38d4d0b1abde8c2fa3cd7ed3ed1014453bcc6744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190540
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Franklin Yow <frankyow@google.com>
2021-03-10 19:44:44 +00:00
Stephen Adams 6398fe7b10 [dart2js] Optimizer cleanup: remove unused rtiSubstitution reference
Change-Id: If22af98e68ca0bd79a7cf69423b77c2a6166daaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190420
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-03-10 19:07:33 +00:00
Parker Lougheed 39550008d6 Tag all code blocks which were missing language tags.
A warning to catch these situations was added in https://github.com/dart-lang/dartdoc/pull/2559 so this adds tags to the code blocks in the SDK which were missing them as caught by the new warning.

Change-Id: Iaadbb6e1b811ecac3b95a6c6f64cb689d2eb2d26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190200
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2021-03-10 18:09:53 +00:00
Johnni Winther 1aa6f00107 [kernel] Refactor CanonicalName/Reference integration
The CL is a step towards have a more restricted and wellstructured
handled of references and canonical names.

The CL moves Reference to canonical_name.dart and makes
CanonicalName.reference private, and replaces CanonicalName.getReference
with a 'reference' getter.

It also removes NamedNode.canonicalName, Field.getterCanonicalName and
Field.setterCanonicalName so that these can only be accessed through the
corresponding reference. This is to reduce the reliance on the
canonical names which, ideally, should only be part of serialization and
deserialization.

TEST=existing

Change-Id: I955fb7d52d4e112d8741f7c12dcf38b74ae0c91a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190442
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-03-10 15:39:28 +00:00
Paul Berry 0fa2fde5aa Add PlainAndColorizedString.toString.
This prevents unsupported error text from being lost when the
unsupported error text is in the form of a PlainAndColorizedString.

Change-Id: Ibc15a6cd17fea085332a308b58356b8d903a3202
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189901
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-03-10 15:31:23 +00:00
Paul Berry c509ad1e41 Change "could not" to "couldn't" in error messages
See comments at
https://dart-review.googlesource.com/c/sdk/+/186320/4/pkg/analyzer/lib/src/generated/resolver.dart#3423.
On the recommendation of the documentation team, we use a more
informal tone in messages.

Change-Id: I0c243669ebd91b8f4a745530582e0f829769a754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189100
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-03-10 15:26:38 +00:00
Kallen Tu 3210fb4306 [cfe] Environment parents and block tests for const functions.
Fixed up block environment and added tests for them.

Change-Id: I97375c90c9244f6dcf8294dc11b0d4e70697d114
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190320
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-03-10 15:23:18 +00:00
Paul Berry 01ad9f1e8d Make flow analysis tests use a more sophisticated Type data structure.
Rather than represent types by strings in the flow analysis tests, we
have a "mini type" language that can represent function types, type
parameters, nullabilities, and promotions.  This should make it easier
to build more sophisticated tests for shared code.

Change-Id: I66d15ad3dc6a871958ed01654600aea749fa0e65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190340
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-03-10 14:53:58 +00:00
Paul Berry b661bf12c5 Front end: Additional "why not promoted" functionality.
This CL implements "why not promoted" functionality in the front end
for the following scenarios:
- null iterable in for-loop
- null iterable in yield* statement
- null iterable or map after spread (`...`) operator

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I471b8bf558341514207fad527dde009f1372182c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188160
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-03-10 14:52:19 +00:00
Jens Johansen 3794264427 [CFE] Forgotten test for external fields and advanced invalidation fix
This CL is a test I forgot to include in
https://dart-review.googlesource.com/c/sdk/+/188461
even though I wrote it and used it to verify the fix.
Better late than never.

Change-Id: I6371719ce0d447f6ef9aeb6ebed2b7615c911b6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190480
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-10 14:13:59 +00:00
Johnni Winther 03ac05b146 [kernel] Migrate package:kernel/text_serializer.dart
Change-Id: I0b084911fa4ba35593a70ba8c214e818dbf7c219
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190440
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-03-10 13:26:58 +00:00
Paul Berry 73f9d0cd26 Flow analysis: Remove unnecessary argument from tryFinallyStatement_end.
Flow analysis stopped using this argument (the AST node for the
finally block) some time ago, but I kept it around so I could assert
that clients didn't unnecessarily store assigned variables info for
it.  It's been long enough now that we can eliminate this code
entirely.

Change-Id: I8c64e2b4fc5b154f441ec2d057637f3dc9ced277
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-03-10 13:14:08 +00:00
Vyacheslav Egorov a942c10bff [vm] Remove IL serializer.
Unfortunately, we never capitalized on having it (e.g. original plan was
to use it for writing tests, among other things) and continuing to
maintain it does not make sense.

TEST=ci

Change-Id: I02b2c35149298a295aa0de75916d48434d4a3ea9
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,pkg-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190220
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-03-10 10:02:58 +00:00
Vyacheslav Egorov 3ed83c398d [vm] Fix compressed pointers build
Only use unified kStringCid cluster in non-compressed variant (when
we write strings into rodata section)

TEST=x64c bots

Change-Id: Id1781801eae40f570228503fefac43a90d033c7b
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-linux-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190221
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-03-10 09:50:18 +00:00
Alexander Thomas 29c2197712 [release] Add changelog for 2.12.1
TBR=mit@google.com

Change-Id: I8e92052cd45d42f5f4e2e8187e6be2dca407837e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190441
Reviewed-by: Alexander Thomas <athom@google.com>
2021-03-10 09:14:51 +00:00
Tess Strickland 7ba7d65e5b [vm/compiler] Print retained functions when tracing precompiler.
To get this information, enable --trace-precompiler.

There are two version of the output: a human readable version
and a JSON version (preceded by 'JSON for function decisions:')
for easier tabulation. The JSON version is an array of objects,
where the fields of the object are as follows:

* name: a string, the function name
* kind: a string, the function kind
* retained: a boolean, whether the function was retained
* reasons: an array of strings, reasons for retaining
  (only for retained objects)

TEST=vm/dart{,_2}/use_trace_precompiler_flag_test.dart

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I9b006a49e1410a832950a1bd29a0abaabe9431f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190000
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-03-10 08:21:58 +00:00
Sam Rawlins 3a67c5aaa2 analyzer: Remove lateness of LibraryAnalyzer._libraryElement
This field is late and accessed with regularity, requiring ugly initialization
checks.

Change-Id: I307f3736e374991a37777f24264642fdcb73a57a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190100
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-10 05:59:00 +00:00
Konstantin Shcheglov a95b7f6313 Remove an unused field.
Change-Id: I18a1f057bb01608b4bfb9584d354d71c50ed7294
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-10 05:16:08 +00:00
Konstantin Shcheglov 7f02c8818e Fix FileResolverTest on Windows.
TBR

Change-Id: I95815a26a46484cd44689b6b47ef62949ad5d1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190381
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-10 02:19:51 +00:00
Kallen Tu d1fd3c6cb6 [cfe] Local functions for const functions.
Change-Id: I9ad3c36c4d515afe1def3f32244dc15b291d4011
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189980
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-03-10 01:07:32 +00:00
Brian Wilkerson acdd5231fd Deprecated setters should not take priority over non-deprecated getters
I hadn't really noticed this behavior until we deprecated large numbers
of setters in the AstNode hierarchy.

Change-Id: If068edd0a55a7a828b7ad114ff5812716ff265e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190283
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-10 00:55:42 +00:00
Ben Konyi dbbd71cd75 [ VM ] Remove requirement for presence of current isolate for
Dart_ServiceSendDataEvent

Fixes https://github.com/dart-lang/sdk/issues/44720

Fixed: 44720
TEST=Existing dart:io tests
Change-Id: I003a339a91dca84dafc39c44ba804ecf3f6f84ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190303
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-03-10 00:42:37 +00:00
Sam Rawlins 0471644ac9 Reland: Report unused system libraries with shadowed elements
Fixes https://github.com/dart-lang/sdk/issues/45028

Change-Id: I77d6ea9f0eaa3589402abf6c23aeae4978694f19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-10 00:35:42 +00:00
Konstantin Shcheglov 6550317955 Move updateAnalysisOptions() to CommandLineOptions.
Change-Id: I96e63478f2e3ea65d58a56a1b12dc2726a3d55ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189860
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-10 00:34:32 +00:00