Commit graph

76452 commits

Author SHA1 Message Date
Alexander Thomas
44f3881be6 [infra] Update checked-in SDKs to 2.12.0-0.0.dev
This is the first checked-in SDK with null-safety enabled by default.

Change-Id: I8f6fcdfd8856483f4737eb200ed4623a244cb0cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170085
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-11-05 07:53:22 +00:00
Stephen Adams
f387d24f68 [js_runtime] List.of improvements
`List.of` avoids per-element checks and no longer forwards to
the more expensive `List.from`.

Global type inference infers `List.of` and `List.from` as new
list allocations.

Bug: 40211
Bug: 32937

Change-Id: I54746610a1b0089ec54e43459301720105f872ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170127
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-11-05 01:47:17 +00:00
Konstantin Shcheglov
2513d37525 Fix reported void_checks diagnostics.
Change-Id: I49b27cf3aab3606fb5b024cba3ed4b95e9ebe0f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 23:50:37 +00:00
pq
b5f1bbb2d7 simple fix dry-run
See: https://github.com/dart-lang/sdk/issues/43746

Change-Id: I0856471c22b2bb6f4487cca1147b8ad26fd29f93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170405
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 22:41:07 +00:00
Ben Konyi
267db1871c [ VM ] Fix memory leak in main_options.cc
Caused by changes in ffc36db613 which
removed memory cleanup.

TEST=Existing tests surface the problem with ASAN enabled.

Change-Id: I4880a459e5421c754574778ad097984f2e47d885
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170440
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-11-04 22:33:27 +00:00
Brian Wilkerson
2d4070fa34 Fix a bug when adding a named parameter after removing all existing parameters
Change-Id: Ib43b154fb781ff50d32f4259ef198857835f9135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170404
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 21:02:37 +00:00
asiva
5c0e6ba974 [Tests] - Fix legacy tests that broke when non nullability was enabled by default
1. lib_2/isolate/issue_6610_test - the source is served from a http request, the autodetect code causes the code to be served multiple times leading to 'count' being incremented multiple times.

2. standalone_2/http_launch_test - source is served from http request and hence the CFE auto opt out does not work for the spawned isolate

3. standalone_2/io/named_pipe_script_test - serves the source using a named pipe and the autodetect code does multiple fetches of the source resulting in an error

4. standalone_2/io/test_extension_test - spawns processes from a directory that is not auto opted out by CFE

TESTS = Fixes existing legacy tests.

Change-Id: I3c78055136659850ce068d6ab254279839d2414b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170280
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-11-04 20:58:57 +00:00
Ben Konyi
8988d1c18f [ Service ] Disable get_service_limit_rpc_test on NNBD precompiled bots
Change-Id: I1e9bac8206cc72509ba55ecbe6602694579423c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170403
Reviewed-by: Liam Appelbe <liama@google.com>
2020-11-04 19:48:00 +00:00
Jonas Finnemann Jensen
65700b8940 Remove global variables from analytics in dartdev
Change-Id: Ic2b27ae5d1062c8227d082a050056685a3380c77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170089
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-11-04 19:26:37 +00:00
Nate Bosch
be70653a46 Update to latest package:source_span
Change-Id: Ie8851a9b20080fec8cacae7fc4a82c247db33fb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170401
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-04 19:24:27 +00:00
Paul Berry
221c697f31 Migration: fix handling of .call on a function-typed expression.
Change-Id: Ibdee57d455215cd974ea34c8aeab578bd801f87b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170361
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-04 18:28:17 +00:00
Paul Berry
a44fe3f778 Migration: set SDK min constraint appropriately.
As discussed in
https://github.com/dart-lang/sdk/issues/44031#issuecomment-720967259,
we want to encourage users to publish null safe packages with an SDK
min constraint matching the SDK version that was used for the
migration, e.g. `2.12.0-18.0.beta`.  However, we also want to make
sure that users doing migration via internal, dev, or bleeding edge
builds publish their null safe packages don't wind up inadvertently
publishing packages that are un-resolvable with the latest beta SDK,
so if the user is on one of those versions, we'll set their SDK min
constraint to `2.12.0-0`.

And of course, once the feature ships to stable, we'll want users to
publish their null safe packages with an SDK min constraint matching
the version in which null safety shipped to stable.

This CL implements all of that functionality, and tests it by
overriding the `version` file in the analyzer's mock SDK.

Change-Id: Ib9ed97e691271da0ed391a6c1a5fe209aa959dce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-04 18:26:57 +00:00
Brian Wilkerson
b499c76516 Add documentation for some additional diagnostics
Change-Id: Ideb16c6a4c20ebb8e474e8beae841d7bd15afe13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170362
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 17:58:32 +00:00
Danny Tuppeny
648debb622 [Analyzer] Prevent NPE in Surround With assist
Fixes https://github.com/dart-lang/sdk/issues/42556.

Change-Id: I5d38fcbd7932a43da0ca40140cefdef593d6ea8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-11-04 17:52:17 +00:00
asiva
308c8059f3 [Tests] - Fix the spawnuri autodetect tests.
TESTS = existing tests are being fixed here

Change-Id: I9136017d29c11f73dd97c82364dc5ead8e2ae7d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169407
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-11-04 17:50:27 +00:00
Ivan Inozemtsev
4a46b6511e Revert "[pkg/dartdev] refactor the migrate command to subclass DartdevCommand"
This reverts commit c10be63d51.

Reason for revert: this creates a circular dependency between nnbd_migration and dartdev which is hard to support internally

Original change's description:
> [pkg/dartdev] refactor the migrate command to subclass DartdevCommand
>
> Change-Id: I60f91f14e066b3a173f45b3c988830d5b435f2ed
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170206
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=devoncarew@google.com,bkonyi@google.com,sigurdm@google.com

Change-Id: I3ba4648ea7f879ea4a893df2a9d75581a6f48dec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170348
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2020-11-04 17:22:59 +00:00
Devon Carew
c10be63d51 [pkg/dartdev] refactor the migrate command to subclass DartdevCommand
Change-Id: I60f91f14e066b3a173f45b3c988830d5b435f2ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170206
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-04 16:28:47 +00:00
Brian Wilkerson
a1977edddb Support a rename-parameter change for data-driven fixes
Change-Id: I9b2d168e3909e7477724a8feb6ae94b69a09950b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170260
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 16:18:47 +00:00
Jens Johansen
52297bf10e [CFE] Set main, mode and problemsJson for expect-file output in incremental compiler
This only makes the expect files more correct.

Change-Id: Ib15117f9e0a4aa09ceecfe914cb46e050469d56a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170341
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-11-04 13:19:27 +00:00
Johnni Winther
18c7c8bca5 [testing] Opt out generated script in pkg/testing
Change-Id: I1ecb67ad5c7dbd712a2b36fbe8c5b8a1a6fd14f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170340
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-04 12:05:27 +00:00
Martin Kustermann
0358e0e07a [vm/dart2native] Ensure to normalize packages path (in addition to sourceFile) to guarantee consistency
The path normalization done by dart2native for "sourceFile" can cause
lower-casing of the path. We should do the same for the "packages" path.

TEST=Makes pkg/vm_snapshot_analysis/test/precompiler_trace_test pass on
     Windows in unittest-asserts-release-win config.

Closes https://github.com/dart-lang/sdk/issues/43955

Change-Id: I3de0f2cc33d7a30280d4e815b0b7e3588f24e4f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170093
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-04 11:13:36 +00:00
sheunglaili
7d64a93199 API doc issue: Update sqlite-tutorial CString section with correct ascii code
Closes https://github.com/dart-lang/sdk/pull/44042
https://github.com/dart-lang/sdk/pull/44042

GitOrigin-RevId: 2783fe93da270636d5453e03c6cd2c15b8e3c4cd
Change-Id: I663e840cee0d73002c401541bace0bd4016d8e36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170161
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-11-04 10:31:47 +00:00
pq
97015a0f07 linter 0.1.123
Change-Id: I54514e377eb1b2e3cdfab078f940529c06b073a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-11-04 06:22:06 +00:00
Konstantin Shcheglov
1726476120 Check for '!' operator when report HintCode.NULL_CHECK_ALWAYS_FAILS
Follow up for:
https://dart-review.googlesource.com/c/sdk/+/170122

Change-Id: If9b3cb1a18ecd7cf21149dbd0fda4ec209506b90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-04 03:43:25 +00:00
Ben Konyi
ffc36db613 [ CLI / VM ] Add --enable-experiment support for 'dart compile', change
where --enable experiment is accepted

Adds --enable-experiment support for:
  - dart compile aot-snapshot
  - dart compile jit-snapshot
  - dart compile js
  - dart compile exe
  - dart compile kernel

Also changes --enable-experiment from a top level CLI flag to a
per-command flag. --enable-experiment flags will now only be
interpreted by the VM if:

1) They are provided before a CLI command (e.g., dart
--enable-experiment=non-nullable analyze) or

2) They are provided with an explicit or implicit run command (e.g.,
dart --enable-experiment=non-nullable foo.dart or dart
--enable-experiment=non-nullable run foo.dart or dart run
--enable-experiment=non-nullable foo.dart)

This should make it more generally clear where --enable-experiment is
accepted and what subcommands can accept the flag. Prior to this change,
providing --enable-experiment anywhere, even for commands without
experiment support, would not raise an error.

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

Change-Id: I5ec48b2dd2bb6db5526185dae2edbca95ef24d9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169902
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-11-04 00:34:26 +00:00
Ben Konyi
2865802d93 [ Service ] Disable get_stack_limit_rpc_test on precompiled bots
Change-Id: I658d43ef9ad058766f117bdaa45a58590599e7a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170281
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-11-04 00:29:27 +00:00
Jia Hao Goh
8c91d919b7 Treat integration_test/ as a directory for tests
This allows `invalid_use_of_visible_for_testing_member` to work with `@visibleForTesting` annotations when such symbols are accessed from an `integration_test/` package directory.

Bug: https://github.com/dart-lang/sdk/issues/43921
Change-Id: I530b88459060dbb05eb18d2a6de2902c88c246af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169180
Auto-Submit: Jia Hao Goh <jiahaog@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 00:26:15 +00:00
Ben Konyi
a486752050 Revert "[ DDS ] Keep event history for Stdout, Stderr, and Extension streams"
This reverts commit 892cc93f26.

Reason for revert: Causing assertion failures on pkg-linux-debug

Original change's description:
> [ DDS ] Keep event history for Stdout, Stderr, and Extension streams
>
> Change-Id: I14ce732cd408ece1da2801887cac3b518bc36af6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169146
> Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

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

Change-Id: Idf2a5f07433af0772ef36aaa2ba7b24b1a5e0323
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170300
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-04 00:25:37 +00:00
Devon Carew
282e3dc29f [pkg/dartdev] opt a test out of nnbd
Bug: https://github.com/dart-lang/sdk/issues/44050
Change-Id: Id102c927ec4918940050783aa23aed0dad03b341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170241
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-03 23:04:07 +00:00
Paul Berry
92587baee5 Migration: fix "whereOrNull" transformation to handle complex targets.
Previously, when analyzing a call to an iterable method that could
potentially be transformed into an `OrNull` extension, such as:

  allMatches(str).firstWhere(..., orElse: () => null);

the migration tool would erroneously identify some subexpressions of
the call target (`str` in this example) as the argument supplied to
`orElse`, resulting in a crash.

This CL fixes the logic so that we use an `identical` check to verify
when we are looking at the argument to `orElse`.

Fixes #43956.

Bug: https://github.com/dart-lang/sdk/issues/43956
Change-Id: I2f4a0e81becf789cab5334d4926e014bda2772f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-03 22:48:17 +00:00
Alexander Markov
0b3e6bd16c [vm] Enable non-nullable experiment in the VM by default
VM was not performing auto-detection of sound null safety mode
if --enable-experiment=non-nullable was not specified on the command
line. This change flips that logic to perform auto-detection unless
--enable-experiment=no-non-nullable is specified.

TEST=Added regression test runtime/tests/vm/dart/regress_44026_test.dart.

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

Change-Id: Ide8935e90dd3a8bd5a417aeb758605dedbb853eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170201
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-11-03 22:29:08 +00:00
Ben Konyi
89de1e82d9 [ VM / Service ] Add optional 'limit' parameter to getStack RPC
Allows for clients to request the top N frames of the current stack.

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

Change-Id: Ia8d38e6317373024382a5e857faff73c89a0d2c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169980
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-03 21:39:37 +00:00
Nate Bosch
7784843910 Bump SDK constraints in js for pub
Use a 2.12.0 lower bound since pub does not understand allowed
experiments for earlier versions.

Use a 3.0.0 upper bound to avoid a warning in pub and to give some
flexibility in publishing for stable.

Change-Id: I482e89becc7aa9f1a36298701ade70cbcc39702c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170204
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 21:28:47 +00:00
Nate Bosch
d7a0c06108 Update to latest package:async
Migrates to `runZonedGuarded` from `runZoned` with an `onError`
argument.

Change-Id: I5636ce6c6718822440913f8344f6bc15aaec7999
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170203
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 21:01:08 +00:00
Nate Bosch
9ebbca4371 Bump SDK constraints in meta for pub
Use a 2.12.0 lower bound since pub does not understand allowed
experiments for earlier versions.

Use a 3.0.0 upper bound to avoid a warning in pub and to give some
flexibility in publishing for stable.

Change-Id: I3540dc3c085ac120997e107cfed5a991ad3f5ec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170202
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 20:45:37 +00:00
Nate Bosch
64aaa0174e Update to latest package:stack_trace
Fixes async gap handling for VM stack traces.

Migrates to `runZonedGuarded` from `runZoned` with `onError`.

Change-Id: I8bcb543b4107d12c6be541a156b97aca754f4377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170240
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 20:34:57 +00:00
Konstantin Shcheglov
c0c453f7f1 Issue 44029. Use the function type itself as the type of '.call'.
Presubmit in google3 looks green.
https://test.corp.google.com/ui#id=OCL:340480353:BASE:340480464:1604433051239:7c3180b

Bug: https://github.com/dart-lang/sdk/issues/44029
Change-Id: Ifc02615aa92da7ae0369ef55657cf6b0e9cdb0bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170200
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-03 19:59:07 +00:00
Janice Collins
6992e9da41 Update to dartdoc to rev matching v0.36.2.
Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v0.36.2

Tested:  spot checked that right version is built and null safety tags appear.

Bug: 44035
Change-Id: I84bbc5c7a7b715bf60d048bfbb3c802b8a7e5421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170163
Auto-Submit: Janice Collins <jcollins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-11-03 19:13:07 +00:00
Ben Konyi
892cc93f26 [ DDS ] Keep event history for Stdout, Stderr, and Extension streams
Change-Id: I14ce732cd408ece1da2801887cac3b518bc36af6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169146
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-03 19:09:47 +00:00
Sam Rawlins
090e234172 Remove unused dart:async imports
As of Dart 2.1, Future/Stream have been exported from dart:core.

Change-Id: Ia4d70d1ccb55ac117bafe630a24b4ee2f60ff993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170126
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-03 18:49:54 +00:00
Sam Rawlins
c6e4d6bcc8 Analyzer: new Hint: NULL_CHECK_ALWAYS_FAILS
This Hint reports when an expression of type Null is null-checked with `!`.
This check will always fail at runtime.

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

Change-Id: I6e2eac4f7b7720a6b9a1c02066470eb039aa9010
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170122
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-03 17:20:14 +00:00
Paul Berry
4c59c39648 Migration: set SDK max constraint appropriately.
After further discussion, we've decided to reverse the decision from
https://dart-review.googlesource.com/c/sdk/+/169143 and have the
migration tool generate packages with a max SDK constraint of 3.0.0.
See
https://github.com/dart-lang/sdk/issues/44031#issuecomment-720967259.

Bug: https://github.com/dart-lang/sdk/issues/44031
Change-Id: I37b43dfb1f13dd0fe08ab81f4ac01bcc46016bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170160
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-03 16:16:06 +00:00
Jens Johansen
9ec87c2da0 [kernel] Field has 2 references
Change-Id: I9c946119e55256b9fbcbf3076ea008aaa1312e86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168949
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-03 16:02:16 +00:00
Jens Johansen
332ce76055 [CFE][kernel] Add 'invalid' nnbd mode; use when trying to out out when compiling in strong mode
Change-Id: I3d1a8da4378cd59e733fc796df38ae98aaf59d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169881
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-03 14:12:56 +00:00
Johnni Winther
0609c6dacc [cfe] Add predefined constructors for late error messages
This CL adds predefined constructors to LateInitializationErrorImpl that
only take the name of the late field/variable as argument. This can reduce
the size of the generated code for ddc/dart2js size because the long
message isn't repeated at all call sites.

In response to #43995

Change-Id: Ie276dd1455feab1655da3a503856da425b20f04f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169883
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-11-03 12:47:06 +00:00
Paul Berry
b8a243ea48 Remove unnecessary bool return types from flow analysis methods.
The `bool` return types were added to `FlowAnalysis` methods
`nullAwareAccess_rightBegin`, `ifNullExpression_rightBegin`,
`equalityOp_end`, and `isExpression_end` in September as part of an
effort to fix mixed-mode unsoundness loopholes by having the front end
throw exceptions if "impossible" conditions arose.  We later decided
that we would prefer to allow these conditions to arise without
generating exceptions, because that makes it easier for the user to
write defensive mixed-mode code.  So the booleans stopped being used.
This CL removes them entirely.

Change-Id: Ia0ff91a22fe79c2df1dea89bbb286c84a3603821
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170125
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-03 12:42:26 +00:00
Johnni Winther
3f7ca42391 [cfe] Ensure that getDispatchTargetKernel returns a concrete member
In response to #43988

Change-Id: I3aa73a073b275b634b679bebfa2bf2ed9c292074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170087
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-03 12:20:37 +00:00
Daco Harkes
5278383736 [vm] Native API: Make Dart_NewWeakPersistentHandle not auto delete
Changes Dart_NewWeakPersistentHandle to no longer auto delete the
weak persistent handle.

Changes the signatures of WeakPersistentHandleFinalizers to no longer
have access to the handle.

Flutter PR: https://github.com/flutter/engine/pull/19843
g3 presubmit: cl/318028238

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

TEST=runtime/vm/dart_api_impl_test.cc

Change-Id: I3f77db9954d9486759f903b78c03a494f73c68ba
Cq-Include-Trybots:dart/try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151525
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-03 10:27:44 +00:00
Robert Nystrom
6cfd46e177 Roll dart_style 1.3.9 into repo.
This does not affect the formatting of any existing code, so is safe to
roll without updating the pre-built SDK.

Change-Id: I2e7fc20d6933d136dc0390f93f6bc72dc340e9ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170141
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-11-02 23:47:40 +00:00
Sam Rawlins
4097d3024a Migrator: Insert required keyword in correct position
Previously, migration might change:

m({@required @deprecated x}) {}

to

m({required @deprecated x}) {}

Which is illegal syntax.

Change-Id: Ib8397e9e22dbb951758a04c085c40905860a7cb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170026
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-11-02 23:40:25 +00:00