Commit graph

78496 commits

Author SHA1 Message Date
Alexander Aprelev
8e7c8c9d8b Roll icu dependency to 81d656878ec611cb0b42d52c82e9dae93920d9ba.
Last roll was from 6/18/2020.
Allows to enable "implicit-int-float-conversion" warning in the dart codebase.

Change-Id: Ida1a3a477e5bc45993dc10e0c3db410265a005ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191300
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-03-15 23:50:04 +00:00
Konstantin Shcheglov
6b575c72ec Prepare to publish analyzer 1.2.0 and _fe_analyzer_shared 18.0.0.
Change-Id: If31ece2507cfb012d5742aa147df2ca781b4f712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191303
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-03-15 22:58:54 +00:00
Konstantin Shcheglov
c0b800ceb5 Issue 45318. Check for dynamic bounded and Function bounded.
Bug: https://github.com/dart-lang/sdk/issues/45318
Change-Id: I5abd2d237cc3a56551471c2a2fc7a9965eb4223c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-15 22:50:14 +00:00
Alexander Markov
daae24b488 [vm/aot] Retain fields used in constants
Evaluated constant instances in kernel are represented as a list of
field->value pairs. Tree shaker should not remove fields used in
constants as it may potentially affect identity of constant instances
(non-identical constants may become identical).
Previously, fields used in constants were only marked as written,
so they could still be removed as write-only fields.
Furthermore, if such field was also used as an interface target
it could be converted to an abstract getter, causing the conflict
during kernel AST serialization.

This fix marks fields used in constants as also read, effectively
preventing their tree shaking.

Flutter gallery AOT snapshot size is not affected.

TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_45324.dart
Fixes https://github.com/dart-lang/sdk/issues/45324

Change-Id: Id6d35604757ad6ba1e23f7227aa9b769448c2688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191280
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-03-15 21:50:11 +00:00
Konstantin Shcheglov
369c36e67c Issue 45299. Fix yield type check for function expressions.
Bug: https://github.com/dart-lang/sdk/issues/45299
Change-Id: I0f9477a632b635d7e1ac8d4c51f51254e5058cff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191183
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-15 21:26:44 +00:00
Ryan Macnak
c9e10c931c [vm, compiler] Predicate boolean loads.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/29908
Change-Id: I5a5c57a8a79dbe4f2ee5303a4b9436bd36e8d7be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189921
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-03-15 20:53:04 +00:00
Danny Tuppeny
cf3dcc4256 [analyzer] Prevent MOVE_FILE using absolute URIs when moving files out of lib
Fixes part of https://github.com/dart-lang/sdk/issues/41889, maybe part of https://github.com/dart-lang/sdk/issues/43602.

Change-Id: Ic7a1e81a280e9786e26f0075ea079e0136e934b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-15 18:42:44 +00:00
Kallen Tu
c906133967 [cfe] Multi-call const function tests to existing behavior.
Change-Id: Id03250e5eeb38d9c69b629c239e573a1d838820f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190980
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-03-15 18:09:13 +00:00
Alexander Markov
16beb34813 [vm/aot] Remove special cases of dynamic function lookups from precompiler
Flutter gallery AOT snapshot size
release: no change;
release-sizeopt: arm -0.24%, arm64 -0.25%.

TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/44852
Change-Id: I847bfc311552bb4e80222e0040b50b4766a18dbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190783
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-03-15 17:53:23 +00:00
Brian Wilkerson
55522f9e90 Fix a bug in completion when a setter does not have a corresponding getter
Fixes: https://github.com/dart-lang/sdk/issues/45300
Change-Id: I0a5043b5d395abb426615e8c434f23c20062e182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-15 17:34:53 +00:00
Vyacheslav Egorov
d42de4ed06 [vm] Crash on impossible GDT null errors
This CL adds code to detect situations when we hit
null error through GDT call with non-null receiver.

We achieve this by making receiver's cid part of the
GDT calling convention and checking this cid
in runtime entry responsible for throwing the null
error.

This CL is an attempt to narrow down b/179632636
and collapse various impossible crash reports
into a single native crash cluster by crashing VM
instead of throwing a null error.

TEST=tested manually

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try
Change-Id: If2ed4646c4c0f403016266e4e83e296a7b234cb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191141
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-03-15 15:35:10 +00:00
Vyacheslav Egorov
69ec09825a [vm] On Android set abort message before aborting
Android L and newer (API level 21) provides a way to
specify abort message which will be included into
crash report created by debuggerd.

Make sure our DynamicAssertionHelper uses this functionality
if available.

TEST=tested manually

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-android-release-arm64-try,vm-kernel-mac-release-x64-try
Change-Id: If25cd168d43677e0a0fe9b63e21a017415686ab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191140
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-03-15 15:35:10 +00:00
Dmitry Stefantsov
d6b79dab6c [cfe] Correct argument count in extension member errors
Closes #45204.

Bug: https://github.com/dart-lang/sdk/issues/45204
Change-Id: I5295704a8d470e639fe346dbbbf80ad28ff614a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190520
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-03-15 10:46:00 +00:00
Jens Johansen
b5da327ed9 [parser] Parse and skip metadata according to spec
Make the parser handle metadata properly according to the spec.

There has been some confusion in regards to metadata because
https://github.com/dart-lang/language/blob/master/accepted/future-releases/small-features-21Q1/feature-specification.md
(used to) say we needed a spec update.

That was done in the parser in
https://dart-review.googlesource.com/c/sdk/+/182668
but really that made the parser adhere to the spec as it was which is
also correct (as the spec change wasn't needed at all).

The parser also needs to be able to skip metadata, though, and that
wasn't done it that CL which caused the issues in
https://github.com/dart-lang/sdk/issues/45120

The work directly in this CL is:
* Add lots of comments to parseMetadata to make them more up-to-date with
  the spec.
* Fix skipMetadata to correspond to parseMetadata.
* Tests verifying that 45120 is fixed in the parser and that metadata in
  general works as expected in the parser.

(In working on this, the future specification was corrected to say that the
spec did not need updating. Thanks to Erik for the quick turn-around
there).

Bug: #45120
Change-Id: Id1e4912cac7e5d9113efe083b3ecd06e6834a16e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190880
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-03-15 08:40:40 +00:00
Tess Strickland
dc62c9c3c2 [vm/compiler] Write retained reasons JSON to a file.
Instead of being part of the --trace-precompiler output, there is
is a new flag --write-retained-reasons-to=<path>.

To allow for non-functions to have reasons for retention, the
JSON objects in the array now have one additional field:

* type: a string, the C++ type of the Dart object.

This CL also wraps all the machinery in a RetainedReasonsWriter
class instead of putting it in the Precompiler interface.

TEST=vm/dart{,2}/use_trace_precompiler_flag

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: Ifa40ac64fdcbdad5114499425c7f8b08e327fa76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190525
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-03-15 08:37:40 +00:00
Alexander Markov
11d6203130 [vm/aot] Fix retaining of exception types and auxiliary functions
There are two fixes:

1) If a function was compiled but not retained, precompiler
should still trace through types used in exception handlers.

2) Certain auxiliary functions such as implicit closure functions
and field initializers were added to 'possibly_retained_functions_'
set but were not traced through AddTypesOf and were not added to
'functions_to_retain_' set.

Flutter gallery AOT snapshot size
release - no changes
release-sizeopt arm +0.13%, arm64 +0.14%

TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/45179
Issue https://github.com/dart-lang/sdk/issues/44852

Change-Id: Ide9a7e82a7bb9098dc90bc41a76e527e7a5cb603
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190781
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-03-13 00:30:38 +00:00
Kallen Tu
a7e5965495 [cfe] If statements for const functions.
Change-Id: If4449eb6613c7a2b53119ed2e8d3f3042624ccd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190800
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-03-12 21:09:08 +00:00
Dmitry Stefantsov
8ddc7465a8 [cfe] Move ExtensionType into pkg/kernel/lib/ast.dart
Change-Id: I2e8231dad00accafb09d1ec88416242d3d5815a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190483
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-03-12 19:02:27 +00:00
Anna Gringauze
cf7e990233 Add default value for module format in ExpressionCompilerWorker
Current version of dwds does not supply module format to the
expression compiler worker, resulting in initialization failures.
Add default 'amd' format so dwds continues to work with new SDK
version before a matching update that passes format to dwds
lands.

Change-Id: I10e8ddc09b48b91c9c085a6d7579ad01c6e13399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190820
Reviewed-by: Gary Roumanis <grouma@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-03-12 18:37:07 +00:00
Ben Konyi
4fde29d1aa [ CLI ] Poll for VM service URI before launching DDS
Service.getInfo().serverUri can be null if the VM service server hasn't
finished starting up. The CLI isolate should wait for this URI to not be
null before attempting to start DDS.

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

Fixed: 44787
Change-Id: Iadce0901351c0bc5238a4dc805483cce818e9e15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190361
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-03-12 18:34:08 +00:00
Konstantin Shcheglov
60ea845795 Issue 190731. Support for aliasElement/aliasArguments in TypeParameterType.
Bug: https://github.com/dart-lang/sdk/issues/45291
Change-Id: Ia0378722f0e7c48e7a3042c0ef14d6833c7bf2b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190734
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-12 18:22:47 +00:00
Nate Bosch
f54a76f9af Update to the latest package:test
Change-Id: Ia23a5ce61fff38d3d5066b26b7ce1cedbf99619e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190733
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Gary Roumanis <grouma@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-03-12 18:14:37 +00:00
Konstantin Shcheglov
45e3d3c77f Issue 45291. Support aliasElement/aliasArguments for interface types.
Bug: https://github.com/dart-lang/sdk/issues/45291
Change-Id: I97bab24f4d7cf3232a0260ec3c6abec6a4c310be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190731
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-12 17:06:17 +00:00
Konstantin Shcheglov
00a45e425a Remove build mode from analyzer_cli.
Change-Id: I2236c728741837588394f896b37f181fc907d335
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190726
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-12 17:05:37 +00:00
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