Commit graph

77394 commits

Author SHA1 Message Date
Daco Harkes c36028b002 [vm/ffi] Migrate benchmarks/Ffi* to CallocAllocator
This CL does not yet roll `package:ffi` to use `Allocator`, because that
breaks the checked in Dart in Flutter in g3. Instead, this copies
`_CallocAllocator` from `package:ffi` into the benchmarks. (We need a
copy per benchmark such that file-copying before running benchmarks
works properly.) The copies can be deleted when we can update
`package:ffi` in the DEPS file to contain `_CallocAllocator`.

New API landed in: https://dart-review.googlesource.com/c/sdk/+/177705

Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

Change-Id: I546de7ec65ceb6f05644a5f269b83f64656892e5
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178995
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-14 12:35:58 +00:00
Daco Harkes c7306aaf41 [vm/ffi] Migrate runtime/tests/vm to CallocAllocator
This CL does not yet roll `package:ffi` to use `Allocator`, because that
breaks the checked in Dart in Flutter in g3. Instead, this uses the copy
of `_CallocAllocator` from `package:ffi` in `calloc.dart` in tests/ffi.

New API landed in: https://dart-review.googlesource.com/c/sdk/+/177705

Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

Change-Id: Iedfc4a11d4606915a324c824372bca643016f5a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178994
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-14 12:28:23 +00:00
Daco Harkes 9922491ba8 [vm/ffi] Migrate pkg/front_end tests to Allocator
New API landed in: https://dart-review.googlesource.com/c/sdk/+/177705

Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

Change-Id: Id45274313edbb3842438b66b9c0917a86884c8ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178993
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-01-14 12:27:53 +00:00
Michael Thomsen e7f1c03b73 Elaborate on what is included
Change-Id: Ie3a2214d37d6bbe645b5e86749dd80448624eda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178997
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-01-14 12:16:09 +00:00
Johnni Winther 990b03290f [cfe] Mention update_expectations.dart in failure log
Change-Id: I692e6aa8571c14817831b7c6a135b2cd6ef0ed2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178991
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-01-14 12:06:59 +00:00
Michael Thomsen 716a43e27a Fix link to flags
Closes https://github.com/dart-lang/sdk/pull/44445
https://github.com/dart-lang/sdk/pull/44445

GitOrigin-RevId: 980bf9dfb30c14e287e7cd0918496f9dbc47c7df
Change-Id: I7410a19af91a947553a58084c3babda98474427e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175701
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-01-14 12:02:43 +00:00
Lasse Reichstein Holst Nielsen 434a97a3c1 Update documentation of dart:math.
Change-Id: Ice4a00c0dee37e88e4ee52ce76d7e7955e75cdb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178820
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-01-14 11:24:06 +00:00
Lasse Reichstein Holst Nielsen 1ebeb87a82 Update dart:typed_data documentation.
Update to using `///` and some minor tweaks.

Change-Id: Iaae63111952b56fa7631c969d5f43bff774216ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178801
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-01-14 11:10:17 +00:00
William Hesse 56de044376 [test] Use test configuration name to name generated test directories
The directories where generated tests and compilation output are stored
by the test runner were named based on all the relevant configuration
options. Change this so that the directory path is based on the
name of the tested configuration instead. This allows simultaneous
test runs of configurations that don't differ on relevant options.

Change-Id: Iaad8d0212cb900bc91d7472d99e266183d29a0b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178986
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2021-01-14 10:12:56 +00:00
Bob Nystrom cfa5b4bfb9 Roll dart_style 1.3.11 into the SDK.
There are no formatting changes, so this does not need to be coordinated
with a new pre-built SDK. The only changes are:

- Fix a performance issue in files that contain many constructors with
  no initializer lists.
- Fix uses of deprecated analyzer API and List().
- Move from Travis to GitHub actions.

Change-Id: I0ef2e5f841bcd94ec1930e187bc3a4121c190e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179100
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-01-14 07:49:06 +00:00
Konstantin Shcheglov b0db6d38c0 Use single InstanceState.lazyEqualEqual()
R=brianwilkerson@google.com

Change-Id: I74e36c5b1a98cff0429a1cb77452f53a59cee9e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-14 02:24:04 +00:00
Konstantin Shcheglov 353b35cc4e Suggest only either getter or setter, but not both.
Otherwise we get two conflicting edits.

R=brianwilkerson@google.com

Change-Id: I57f69099f715ad3cfd342d65a6a80e2c34d812a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-14 01:17:55 +00:00
Konstantin Shcheglov aaabc7537d Use runtime type equality for type literal identity.
https://github.com/dart-lang/language/pull/1389/files#diff-2f9dda5244b707ca3b6d5988c6e5257d6025a99a5fa08ce0dc171c94bdc8ce0dR1256

Change-Id: Ie6b01c1ad5f5ab62ceef3e2672a2174ddaf62db8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-14 01:13:34 +00:00
pq f757851fa6 add test for over-eager add_late fix
Change-Id: I9cf7d6eda6b9ed50b87225e4a2558d2ca29b011b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-01-14 01:05:30 +00:00
Ben Konyi e49937769f Revert "[ CLI ] Improved consistency of -D and --define across tools and"
This reverts commit e83e78431f.

Reason for revert: Failing on SIMARM and AOT bots

Original change's description:
> [ CLI ] Improved consistency of -D and --define across tools and
> commands
>
> - Added support for --define to the VM and dart2js
> - Added support for -D and --define for `dart run` and `dart compile js`
>
> Remaining improvements:
> - Add support for providing multiple comma separated values for `dart
>   run`, `dart`, and `dart2js`
>
> Related issue: https://github.com/dart-lang/sdk/issues/44562
>
> TEST=Updated CLI tests and added new dart2js tests.
>
> Change-Id: I9379c7aee1eab377adb3438393d9ad79c4938cc4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178262
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=bkonyi@google.com,asiva@google.com,sigmund@google.com

Change-Id: I1c594ae7db551619cc3191ff7f832c4fc61a4171
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179081
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-01-14 01:05:29 +00:00
pq 4a7dd03932 bulk fix for avoid_private_typedef_functions
Change-Id: I9775a542b58948488710156652ff8960ccbbc45b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178932
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-13 23:38:27 +00:00
Ben Konyi e83e78431f [ CLI ] Improved consistency of -D and --define across tools and
commands

- Added support for --define to the VM and dart2js
- Added support for -D and --define for `dart run` and `dart compile js`

Remaining improvements:
- Add support for providing multiple comma separated values for `dart
  run`, `dart`, and `dart2js`

Related issue: https://github.com/dart-lang/sdk/issues/44562

TEST=Updated CLI tests and added new dart2js tests.

Change-Id: I9379c7aee1eab377adb3438393d9ad79c4938cc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178262
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-01-13 23:33:17 +00:00
Nate Bosch d4840fa476 Update to the latest package:html
Change-Id: Ieccf4184ea4ba881a6ae8d60c8c87087f53ace2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178642
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-01-13 22:25:23 +00:00
Konstantin Shcheglov e5d5a0f345 Don't report INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_* when null safety.
https://github.com/dart-lang/language/pull/1389/files#diff-2f9dda5244b707ca3b6d5988c6e5257d6025a99a5fa08ce0dc171c94bdc8ce0dR665

Change-Id: Iccc90f8f9bb877da604d5a5774a931b71a185b91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178928
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-13 21:19:04 +00:00
Ben Konyi 613ab14a9a [ package:dds ] Disable package:test timeout for sse_smoke_test
Fixes https://github.com/dart-lang/sdk/issues/44474

Fixed: 44474
Change-Id: I62e6847f2e6c14deee16c3676e5e18616baa4ad4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176780
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-01-13 21:06:03 +00:00
Dan Field c163bc24df roll boringssl_gen_rev to aaac86738c4f2d1bdf00f54d197f50f247ffee04
Flutter needs this to roll to Clang 12

Change-Id: I461be3836c8aab2ab4c9bd6c9233068ec4fefb28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178930
Auto-Submit: Dan Field <dnfield@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Dan Field <dnfield@google.com>
2021-01-13 20:29:48 +00:00
Regis Crelier 16f2a1edc5 [VM/runtime] Implement constant canonical type erasure when reading from kernel.
Modify the constant verification when writing a full snapshot in agnostic mode.
The implemented changed are specified in https://github.com/dart-lang/language/pull/1389
This (partially) fixes issue https://github.com/dart-lang/sdk/issues/44643
More work may be required for type parameter names of type literals.

TEST=new tests added in https://dart-review.googlesource.com/c/sdk/+/178929

Change-Id: Ie42bbe482763f8e737c3f5bd26e7752511e7398e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178927
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-01-13 20:26:18 +00:00
Danny Tuppeny f0f4f58728 [analyzer] Use generated names for extracted methods
Change-Id: I2aeaac092bc2222d6116c2e7172e73406bfa2260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178988
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-13 18:51:38 +00:00
Danny Tuppeny 65af2a0941 [analyzer] Add ExtractLocalVariable to LSP server
Change-Id: I997b9914d0c451e69a914c75da0f313430ba3722
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178987
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-13 18:48:52 +00:00
Danny Tuppeny a154a0dbdf [analyzer] Add new contexts to declarations tracker after rebuilding due to watcher failure
Fixes https://github.com/dart-lang/sdk/issues/44650.

Change-Id: Ifb59268b550e69b909c15e592cf925f40ba5f7cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-13 18:06:28 +00:00
Sam Rawlins d5ab427d16 analysis_server: Add a Convert to Null-aware Spread quick fix
Change-Id: I04dfb48e0257d8e14de81b927699b7eb063ea578
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178924
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-13 17:24:48 +00:00
Daco Harkes 5d40d52fca [vm/ffi] Add Opaque type
Issue: https://github.com/dart-lang/sdk/issues/44622
Issue: https://github.com/dart-lang/sdk/issues/43974

TEST=samples/ffi/sqlite/lib/src/bindings/types.dart
TEST=tests/ffi/vmspecific_static_checks_test.dart

Change-Id: Ib9e72df6a07b1bc2b72a7db66f945652814baf51
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-nnbd-linux-release-try,front-end-linux-release-x64-try,front-end-nnbd-linux-release-x64-try,benchmark-linux-try,dart-sdk-linux-try,pkg-linux-release-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178984
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-01-13 17:04:08 +00:00
Daco Harkes 4e2343c290 [vm/ffi] Introduce Allocator API
Introduces the Allocator API in `dart:ffi`.

This CL does not yet roll `package:ffi` to use `Allocator`, because that
breaks the checked in Dart in Fluter in g3. Instead, this coppies
`_MallocAllocator` from `package:ffi` into the ffi tests for testing.

This CL does not yet migrate off `allocate` and `free` in the SDK. That
is done in a dependent CL.

Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

TEST=tests/ffi/allocator_test.dart
TEST=tests/ffi/calloc_test.dart
TEST=tests/ffi/vmspecific_static_checks_test.dart

Change-Id: I173e213a750b8b3f594bb8d4fc72575f2b6b91f7
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-nnbd-linux-release-try,front-end-linux-release-x64-try,front-end-nnbd-linux-release-x64-try,benchmark-linux-try,dart-sdk-linux-try,pkg-linux-release-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177705
Reviewed-by: Clement Skau <cskau@google.com>
2021-01-13 17:04:08 +00:00
Paul Berry 10917ffd55 Don't promote this inside extension methods.
Bug: https://github.com/dart-lang/sdk/issues/44652
Change-Id: I05e5acfbff1d498fa3ad513d956510909ec7d24f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178920
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-01-13 16:48:08 +00:00
Jens Johansen 4ea0bae02a [kernel] Tools and fixes wrt lazy loading and reachability
Change-Id: I191d338097b09ff2211d6d14c6013632190de629
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-01-13 14:20:28 +00:00
Lasse Reichstein Holst Nielsen 8a81fe235d Update dart:collection documentation for null safety.
Minor cleanups.

Change-Id: I8bd2efbec3aa0c7cf9651c1a2cfa7e436e09ab0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178204
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-01-13 12:05:14 +00:00
Clement Skau 8f2c47f24b [VM] Adds Future.then and Future.catchError stack unwinding.
TEST=Various 'causal' tests updated below.

Bug: https://github.com/dart-lang/sdk/issues/40815, https://github.com/dart-lang/sdk/issues/37953
Change-Id: I1420d6163ac2e3b22e0971f7b0ad516895dded70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176662
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-13 08:00:14 +00:00
Karl Klose e776054596 [pkg/test_runner] Support 'enable-experiments' in multi-test converter
This change adds support for the 'enable-experiments' option to control
the experiments used in the analyzer and CFE.

It also adds support for multiple input files.

Change-Id: I15b9082e96f276249165efc66734ac9506b93ca1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178560
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2021-01-13 06:50:54 +00:00
Nicholas Shahan 07fa8a6589 [ddc] Add null safety mode to metadata output
Change-Id: Ic9c932aa1161885a9b4073ada1c17f475716950e
Fixes: https://github.com/dart-lang/sdk/issues/44601
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178161
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-01-13 01:32:54 +00:00
Sam Rawlins ef72b9fe6d Analyzer: Look for bazel BUILD file before .packages files
Also move local function packageRootedHere outside of a while loop.

Change-Id: Ie900a36507934038a7bace23e6241a9c91080943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178640
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-13 00:34:33 +00:00
Sam Rawlins c5e0e73df5 dart migrate: Fix rendering overlay offset issue in Firefox
Fixes https://github.com/dart-lang/sdk/issues/44635

Change-Id: Id6e0518b86859605c5cfacb9091f7e1ed612b71c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178724
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-01-12 23:17:33 +00:00
jonahwilliams d13b1e82a7 [frontend_server] allow dart define to contain commas
package:args seems to chop off commas unless disabled. This prevents users from having
dart defines that contain commas.

Bug: https://github.com/flutter/flutter/issues/72105
Change-Id: I9900a0db0d0ad24348dd06acff7a48d3c579564f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178881
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
2021-01-12 23:09:43 +00:00
Konstantin Shcheglov 4bef6607e7 Fill and use DartType.aliasElement/aliasArguments
Change-Id: I71a3b7efbbe8578c47a832cb85aab6177156531f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-12 22:50:44 +00:00
Sigmund Cherem b461400e5a [tests] Add regression test for mixin+super+initializer.
This change adds a test to ensure we properly handle super calls in mixin that
override initializers.

This is a regression test for https://github.com/dart-lang/sdk/issues/44636,
which happened to trigger a stack-overflow in ddc.  The issue existed for a long
time, but was fixed in a recent CFE change
52db62dd65

Change-Id: I7d4aceb8e313f0000e32d9550f301792a9ab84cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178900
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-01-12 22:48:44 +00:00
Paul Berry 6f40248275 Simplify usage of addFactor and addSubtype.
These test harness methods now take strings rather than Type objects,
which should make the tests easier to read (and less work to write).

Change-Id: I160bb7a7a61116e18736d414d5a549971d851c02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-01-12 21:47:04 +00:00
Lasse R.H. Nielsen ef8cc2c1cf Remove LateInitializationError.
As per planned breaking change to let platforms decide how they and what throw for late initiaization errors,
we no longer need a public `LateInitializationError` class. It's confusing to have one if some platforms throw
something else instead.

Removes the public abstract class. The dart:_internal implementation class `LateError` no longer implements it.
This is the only implementation of the public interface, and the class which platforms either throw directly,
or through front-end lowering of the feature.

Remove mentions in tests. All tests now just expect `Error`, some platform specific tests might test the message.

TEST=rewrote tests referring to LateInitializationError.

Change-Id: I54344a67f89ce101ed770412db134e12354cdcc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174928
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-01-12 20:21:33 +00:00
Danny Tuppeny 6c33457014 [analyzer] Add support for multiline TODO comments
Fixes https://github.com/Dart-Code/Dart-Code/issues/3030.

Change-Id: I97b885ee49573514560bc0452fd84793e04ee5df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178680
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-12 19:08:02 +00:00
Ben Konyi cbc46012b5 [ VM ] Address comments from https://dart-review.googlesource.com/c/sdk/+/178723
TEST=N/A

Change-Id: Ied133a59eb5562971ecca7f6106650e25676a539
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178860
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-01-12 18:53:05 +00:00
pq 1d35109cc1 bulk fix for prefer_is_not_operator
Change-Id: Ib9888b034ff4e7376d295fb15adb738451a50085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-01-12 18:24:23 +00:00
Stephen Adams 87ad206da2 [dart2js] Make JS string literals more uniform
More runtime and boilerplate strings use double-quotes.
This is more consistent with strings from codegen.

Change-Id: I53b6852fc3e8b644a530046aa1a135faf9ae3782
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178380
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-01-12 18:24:21 +00:00
Ryan Macnak 784e69a6ad [vm, gc] Ensure exclusive access to the heap during deserialization.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: I37d2b83802a11b9cf5ffc2d7d4852daa18941006
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178720
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-01-12 17:42:41 +00:00
pq 2866e46476 UseIsNotEmpty name fix
Change-Id: I01b358f9f80698bfa760bb6cac6e2f00a98dccd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-01-12 16:15:21 +00:00
Paul Berry 9370651773 Prepare to eliminate context arg from MigrationCliRunner.shouldBeMigrated
This change changes `MigrationCliRunner.shouldBeMigrated` to forward
to a transitional method `MigrationCliRunner.shouldBeMigrated2`, which
lacks the now-unused `context` argument.  After this lands, internal
clients will be switched to overriding/calling `shouldBeMigrated2`
instead of `shouldBeMigrated`.

Once no clients remain that refer to `shouldBeMigrated`, the `context`
argument will be removed from it (this will be non-breaking since
`shouldBeMigrated` will at that point be unreferenced outside the
nnbd_migration package).  After that, we will switch clients back to
overriding/calling `shouldBeMigrated` and eliminate
`shouldBeMigrated2`.

Change-Id: If9b476878260a5777f3346486d44c805dc361691
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178761
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-01-12 16:11:21 +00:00
Lasse Reichstein Holst Nielsen 2499451126 Update documentation of dart:convert.
Change-Id: I8c739b720a749b11035fa2841ebb024bf1d5b351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178205
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-01-12 14:31:01 +00:00
Lasse R.H. Nielsen fe7efd5606 Update documentation in dart:core.
Fix null safety issues and tweak documentation where it can be improved.

Change-Id: Ia8cc20274ae151c454662bf5f137913787365a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177960
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-01-12 13:06:41 +00:00