Commit graph

79353 commits

Author SHA1 Message Date
Daco Harkes 0aaf26d265 [vm] Fix OSR entry missing phis in indirect joins
Closes: https://github.com/dart-lang/sdk/issues/45260

TEST=tests/language/vm/regress_45260_test.dart
TEST=Added assert + optcounter bot.

Change-Id: Ic55ecf14678047a006c20bd8be4dd20c39ec4272
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-ia32-try,vm-kernel-optcounter-threshold-linux-release-x64-try
Fixed: 45260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196320
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-04-27 13:12:48 +00:00
Dmitry Stefantsov cc621431f9 [cfe] Implement subtype relation for ExtensionType
Change-Id: I725c6abd4ad2ec7fe217e271fbe60d57af443f7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196933
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2021-04-27 13:03:38 +00:00
Alexander Thomas 6a7aaf5bc3 [build] Raise minimum mac SDK version to 10.13 to reduce build warnings
This removes warnings like these:
```
 ld: warning: object file (../../buildtools/mac-x64/clang/bin/../lib/libc++.a(memory.cpp.o)) was built for newer OSX version (10.13) than being linked (10.8)
```

These warnings seem to be harmless but may indicate that our builds are
no longer working below macOS 10.13. On developer machines, these
warnings don't seem to occur. We don't test on versions older than 10.13
so we can't guarantee that the Dart SDK works on those.

https://github.com/dart-lang/sdk/issues/40850

Change-Id: I1b146803605daa9e42d4283722efb39ecd66f0ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146803
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-04-27 10:37:30 +00:00
Johnni Winther 8f92864ca3 [kernel] Rename MapEntry to MapLiteralEntry
- to avoid collisions with MapEntry from dart:core

TEST=existing

Change-Id: I7b9592844345313e79ac18d18017c74de7c02106
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196930
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-04-27 10:36:38 +00:00
Aske Simon Christensen a2b951d5db [cfe] Mark issue 45700 regression test crashing.
This avoids analysis crash in VS Code when opening the SDK.

Change-Id: I44f13d9f1c871fe77a023008fc44e42bbfbbe7a3
Bug: https://github.com/dart-lang/sdk/issues/45700
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196670
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-04-27 10:00:28 +00:00
Alexander Thomas 0c9078756a [sdk] Update checked-in SDKs to 2.13.0-211.13.beta
Change-Id: I543cee3c7a70816526a0fa9ed1bcc7e7d127804c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197041
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-27 07:34:08 +00:00
Alexander Thomas 17a1c13fdf [co19] Roll co19 to 13f010c4047c4c7d52afe67ecc57ebc415ea4ea8
2021-04-22 sgrekhov@unipro.ru 993. Wrong annotation tests added
2021-04-22 sgrekhov@unipro.ru 993. Packed tests added
2021-04-21 irina.arkhipets@gmail.com Issue 1081: Missing Issue tags added to the tests.
2021-04-21 sgrekhov@unipro.ru Fixes 1004. Add tests that confirms that tight-looped isolate is not killed with Isolate.beforeNextEvent priority
2021-04-20 sgrekhov@unipro.ru Fixes 1078. Expect an error in case of cyclic initialization

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,analyzer-nnbd-mac-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I04d6af2bcf7fd436082f460d9b91c22f7a1f1255
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197040
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-27 07:29:00 +00:00
JustWe ac2cd2d73c [vm/ffi] Array dimensions non-positive check in CFE
Bug: https://github.com/dart-lang/sdk/issues/45540
Closes: https://github.com/dart-lang/sdk/pull/45785

TEST=tests/ffi/vmspecific_static_checks_test.dart

GitOrigin-RevId: e4c091a617acf36f60de7ddfc957a58323663813
Change-Id: I393e1dbbf34aa9f72e2e942c3a40c2f37c90e0c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196246
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-04-27 06:56:28 +00:00
Chandru S 871374447f Expose loadId during deferred loading that will allow for advanced bundling optimizations.
Change-Id: Ic4e5edd8dc4761e49b4eb97892c75b869adfc2a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196980
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-04-27 01:40:48 +00:00
Ryan Macnak 1305295051 Revert "[build] Don't list Dart sources up front when creating application snapshots."
This reverts commit a23c31bf8d.

Reason for revert: The bootstrapping compilations are a bit confused about whose deps they're writing

Original change's description:
> [build] Don't list Dart sources up front when creating application snapshots.
>
> GN/Ninja will discover them via the depfile created alongside the snapshot.
>
> Bug: https://github.com/flutter/flutter/issues/81074
> Change-Id: I6e0f07214e8ea29e6d23261c71558da06fd2223a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196982
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,chinmaygarde@google.com

Change-Id: I267b6bac2676a18f57291c8472fab5c2aaa60284
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/flutter/flutter/issues/81074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197000
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-26 23:53:39 +00:00
Alexander Markov 869b007e9f [vm/service] Fix service/bad_reload_test
The test was incorrectly assuming the format of response for the
failed hot-reload and that expression evaluation can be performed
on top of the failed hot reload.

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

TEST=service/bad_reload_test
Change-Id: Iac9109371e2bc0b89e7c26ab008e0a174ecb754a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196984
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-26 23:31:27 +00:00
Ryan Macnak a23c31bf8d [build] Don't list Dart sources up front when creating application snapshots.
GN/Ninja will discover them via the depfile created alongside the snapshot.

Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I6e0f07214e8ea29e6d23261c71558da06fd2223a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196982
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-26 22:52:47 +00:00
Ryan Macnak 494e5b0380 [build] Remove expensive use of make_version.py for unused OBS_VER.
TEST=ci
Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I6e06e21d358fd4aafd37960803269796d2e62753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196983
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-26 22:51:08 +00:00
Tess Strickland 6b9210df84 [vm/compiler] Fix --resolve-dwarf-paths on Windows.
Fixes https://github.com/dart-lang/sdk/issues/45828

TEST=vm/dart{,_2}/use_resolve_dwarf_paths_flag_test

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-win-release-x64-try
Change-Id: I40c05a5b4dbb370af197a6c50f7e7dc54e29ee4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196932
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-04-26 22:44:28 +00:00
Ryan Macnak 11c2c4aacc [vm, compiler] Allow further folding of UnboxInt64(Constant) to UnboxedConstant.
TEST=ci
Change-Id: I3a55a007d4b8510faa33593698554f7e9bf982e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196225
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-26 20:23:07 +00:00
Alexander Markov db8d71d47e [vm/aot] Discard Code objects of entry points
Calls from C++ to Dart entry points are currently performed by
calling via Function::entry_point() in AOT mode
(with --use_bare_instructions). Such calls no longer use
Code objects, so Code objects can be discarded even if they
belong to a Function which is used as an entry point.

TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/44852
Change-Id: Iaf9dd67392780ef4344fc518865ffbe30648762e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196720
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-04-26 19:49:58 +00:00
Kallen Tu 8a0801572c [cfe] Instance method invocations for const functions.
Change-Id: I2e7d8b3859f09dd906e78e6e6d44722a0aabaeb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196140
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-04-26 18:11:47 +00:00
Leaf Petersen b101a7d002 Add language versions to _2 test libraries
Change-Id: Ib33169c3e0ffc870915c189404074a1dea472546
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196548
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2021-04-26 17:58:57 +00:00
Stephen Adams a2f48e931a [dart2js] Remove soft-deferred code
The soft-deferred experiment no longer generates working code and is
in the way of some work in progress.

Change-Id: I3f1043b5e289981ab9351247e7b02ee9671f565f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196551
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-04-26 17:57:17 +00:00
Danny Tuppeny 1e51549fab [analyzer] Don't show duplicate code completions for items imported via multiple libraries
Fixes https://github.com/Dart-Code/Dart-Code/issues/3227.

Change-Id: Iac5704fea4f00470040b6b94bbf508dd916ed234
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196923
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-26 16:48:28 +00:00
Kallen Tu 931f7dc2e6 [cfe] List [] for const functions.
Change-Id: Ibbd9b828334609bca3d700bd5af7049b78b8a33a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196200
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-26 16:40:17 +00:00
Johnni Winther c2ac75a213 [cfe] Migrate first part of wave 7
Change-Id: Ie68bae61379bd489177e587282b833c49f8cf3b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196665
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-26 14:05:12 +00:00
Johnni Winther 30bbd2963b [cfe] Migrate wave 6
Change-Id: I4cdc5b6dd1261841217c823e2b8820b97fe9375a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196664
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-04-26 14:05:12 +00:00
Vyacheslav Egorov 9057d9812e [vm/compiler] Fold IntConverter(Constant(...))
This is important for keeping shifts compiling properly on some
platforms: because some shift variants only support constant shift
distances, so an interfering IntConverter inserted by the
representation selection pass causes compilation to fail.

This fixes Meteor benchmark, which is currently crashing the compiler.

TEST=runtime/tests/vm/dart{,_2}/regress_lsl_with_constant.dart

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try
Change-Id: Ie2f316cd917a8ebd8d3d96f394b39eac4d135d95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196662
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-26 14:04:12 +00:00
Johnni Winther f209a4aea8 [cfe] Handle duplicate declaration use in parts
Closes #45711

Change-Id: I77d98e2c02bda001ee9a0bf8446f2987e4266ec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196280
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-26 13:57:07 +00:00
Johnni Winther e90063b57b [cfe] Update tests to prepare enabling generic-metadata flag by default
Change-Id: I209e9e03291cfdf282254b4fa2a4a47c6bb36811
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196921
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-26 13:56:07 +00:00
Tess Strickland 6730b12edc [vm] Add --resolve-dwarf-paths (disabled by default).
When --resolve-dwarf-paths is enabled, then paths output to DWARF
information will be resolved to either an absolute or relative path.
If this cannot be done, snapshot creation fails.

File URIs are output as absolute paths.

SDK URIs are output as paths relative to the SDK root.

TEST=vm/dart{,_2}/use_resolve_dwarf_paths_flag_test

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: I63c694f0f707ef6a3d3faa690e001fefe2b26094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196491
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-04-26 11:44:47 +00:00
Tess Strickland ca224adba0 [vm] Make --code-comments a VM global flag.
This way, it is appropriately enabled if possible during snapshot
loading if the snapshot was compiled with --code-comments, instead of
forcing the user to remember to run the snapshot loader with
--code-comments to avoid a runtime failure.

TEST=vm/dart{,_2}/use_code_comments_flag_test

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Ib3de04ecbd95ee4069c3d31ef3e4dc4b2a3ac94c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196668
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-04-26 11:44:38 +00:00
Vyacheslav Egorov 9a266c7fde [vm/arm] Fix vmovd Dd[x], ... simulation
This instruction operations on the lo/hi parts of D register and not
on S registers - which means we should not be using D->(S, S) projection
helpers because not all D registers have corresponding even/odd S
registers.

vmovd D20[0], ...  is a valid ARM instruction, but viewing it as
vmovd S40, ... is incorrect (because there is no such thing as S40).

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

TEST=lib_2/typed_data/float32x4_test on dartkp-linux-debug-simarm-crossword


Change-Id: Ia2fc827e1e629cdf5f2b66502681a080274fd73c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196660
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-04-26 11:08:07 +00:00
Alexander Markov 47eff41aa0 [vm/aot/tfa] Handle classes which implement Future along with another generic type in a cast to FutureOr
When handling a type check to FutureOr in TFA, there is a case
when a ConcreteType is a subtype of Future. In such case, it was
assumed that ConcreteType has only 1 type argument.
This is not true if class extends/implements/mixes-in Future along
with another generic class.

This change adds the logic to query offset of Future type arguments in
the type arguments of a class and also check if the type argument is
known.

TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter81068.dart
Fixes https://github.com/flutter/flutter/issues/81068

Change-Id: I970e649823bafec433fc21a286498acc0126b331
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196546
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-04-26 10:28:47 +00:00
JustWe 417e3ef225 [analyzer/ffi] Array dimensions non-positive check
Bug: https://github.com/dart-lang/sdk/issues/45540
Closes: https://github.com/dart-lang/sdk/pull/45784

GitOrigin-RevId: 09a3c9651488938597142f5a22b42e56ec965394
Change-Id: I1ea38a45aca836060de35e90b47a25f0d6b9947e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196245
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-04-26 09:17:47 +00:00
Ivan Inozemtsev a5ff656da1 Revert "[vm] Switch datastream Write/WriteUnsigned to (S)LEB128."
This reverts commit 80102c981b.

Reason for revert: b/186359854

Original change's description:
> [vm] Switch datastream Write/WriteUnsigned to (S)LEB128.
>
> This reduces the number of variable-length integer encodings in our
> database from 2 to 1, and chooses the more standard one.
>
> TEST=Existing tests, in particular any that involve snapshots.
>
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
> Change-Id: Ia700158ac873ad32ac28c1027a669895961bc715
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196321
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Idf32bdd879cf8bb7407f6dae764312140ad6eeb2
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196920
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2021-04-26 07:52:47 +00:00
Konstantin Shcheglov 50de84a3fb Issue 45467. A setter in lexical scope shadows inherited getter.
Bug: https://github.com/dart-lang/sdk/issues/45467
Change-Id: I1c7c67fcc61f9cc2661ba4a2d73da9634a285d41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-26 00:24:56 +00:00
Brian Wilkerson aaf35b839a Unify some error codes for documentation purposes
Change-Id: I3a0f66f29a446d677b459dc92f5bdded9f480719
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-25 14:59:36 +00:00
Konstantin Shcheglov 7b9cfb4837 Restore caching of converter in InputConverter.
Change-Id: Ie801d8b7b29f40cd624690d31de1f883cd08260e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-24 20:20:15 +00:00
Stephen Adams 3ec6a72b93 [dart2js] Cleanup triple-shift flags
Bug: 45335
Change-Id: I4fc2f970884439d9e4f0957dd4f756c13511306a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-04-24 18:55:12 +00:00
Konstantin Shcheglov 9995cf0f37 Add TokenType.binaryOperatorOfCompoundAssignment, use instead of operatorFromCompoundAssignment().
Change-Id: Ib8f116c16a11f0b003988a208703837754d1c0bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-24 18:46:32 +00:00
Brian Wilkerson eb1ce5d640 Remove some unnecessary null checks
These were found using the unnecessary-null-checks lint. It has a bug
that prevents us from enabling it at the moment, but we should consider
enabling it once the bug has been fixed.

Change-Id: Ice250b5a6a8723c5f08dec5b07ae738e17c842cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196550
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:22:43 +00:00
Danny Tuppeny 8a0897c165 [analyzer] Fix a bug with completion ranking for items with 0 relevance in LSP
Change-Id: Ic4ef390ba4bdc627e075ae9dade8ced5a307a8ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196667
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:13:32 +00:00
Brian Wilkerson 1ad68b9b16 Make local variables that hide fields be final (analysis_server)
As per our earlier conversation, I looked for places where a local
variable was introduced to overcome field promotion and has the same
name as the field. Where possible I made them final; where not possible
I changed the name.

Change-Id: Iad3d2139693ca66f1eb22a3926c3b84a4115f13d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196552
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:12:07 +00:00
Brian Wilkerson 3498404125 Make local variables that hide fields be final (analyzer_plugins)
Change-Id: I41e39a3f26f4f2c1d5e6d3597b8017e376df8709
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196553
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:04:12 +00:00
Brian Wilkerson 5be0438e47 Make local variables that hide fields be final (analyzer)
Change-Id: I4cb41aec1757e133751979d3c0cdc697ccafc4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:04:04 +00:00
Brian Wilkerson 30d27c6f61 Migrate all remaining server libraries except the library in bin
Change-Id: I2041763971a85fb8e9530b64ef30d106091c9739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196547
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-24 04:19:22 +00:00
Nate Bosch 90c309e9e4 Upgrade to null safe migrated json_rpc_2
Change-Id: I05c7dc4c266c7351f044f1e423922c01d05e96e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196563
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-04-24 01:11:42 +00:00
Konstantin Shcheglov 6a203ce308 [analyzer] add error check in not binary operator.
try to fix: https://github.com/dart-lang/sdk/issues/45659

Closes https://github.com/dart-lang/sdk/pull/45751
https://github.com/dart-lang/sdk/pull/45751

GitOrigin-RevId: ae4544cd41743ee1a5e0576ee64dd9544990b3d7
Change-Id: Ie4ccb05aa8f3df2d55e474056f69c56d6cca6a62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-24 00:04:32 +00:00
Stephen Adams 470576682a [dart2js] Access closureFromTearOff directly
Change-Id: I52fc6cee1affc778a8e8a9de712514f6f1f153fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196622
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-04-23 21:40:12 +00:00
Paul Berry b10a592341 Add a url field to DiagnosticMessage.
This paves the way for allowing analyzer and analysis server clients
to format diagnostic message URLs in a special way (e.g. to make them
clickable).

Note that DiagnosticMessage is part of the public API of the analyzer,
so I've retained the old behavior in a deprecated fashion to avoid
breaking clients that don't yet handle diagnostic messages containing
URLs.

See
https://dart-review.googlesource.com/c/sdk/+/193749/comment/86d1ce4b_77a60b1e/
for additional discussion.

Change-Id: Iae9d43a2be7dbc67cb7cb82afe0a7824043d6113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196101
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-23 20:34:32 +00:00
Stephen Adams 235ff47a07 [benchmarks] Fix lints in Omnibus benchmarks
Change-Id: I08dd527bcfd3b4ed97d0c57a877c64ff0ec49ade
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196460
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-04-23 20:11:52 +00:00
Srujan Gaddam f08e228238 [dart:html] Use python2.7 for go.sh
Due to third_party dependencies, this script can't use python3 yet.
Note that this means if we can't use python2.7 in the future, we
either need to update our copy of the IDL scripts to use python3,
update the dependency so that we use the latest IDL scripts, or
we stop using these scripts to generate dart:html.

Change-Id: I42eb7d1fc769644e358dbf26344b6c66265ce10c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196582
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-04-23 19:06:01 +00:00
Sigmund Cherem d52475c166 [web] deprecate dart:web_sql
The WebSql was dropped 5+ years ago and this library is unsupported.

This change adds the `@deprecated` annotation on the library and APIs in
dart:html that expose it (`window.openDatabase`). It also indicates to dartdoc
to skip it for the api.dart.dev site.

I run a `pub_crawl` process to verify that this is not in use. I checked 15K
packages, and only found 2 occurrances of an import to this library:
  * One in a package marked as discontinued (used for migrating constants back
  in Dart 2)
  * Another in an example mock test (generated by mockito for mocking dart:html)
Also no library uses `window.openDatabase` either.

We will send a breaking change announcement soon and plan to delete this in a
future Dart release (possibly 2.15).

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

Change-Id: I8cd2bfa0ce64892c3f108bd6e24b8a0a3ec7c6ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196461
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-04-23 19:04:42 +00:00