Commit graph

76493 commits

Author SHA1 Message Date
Paul Berry 3eb34ef646 Migration: programmatically generate package_config.json in unit tests.
Previously, we hard a hard-coded set that included all packages added
by unit tests, which created confusion when writing new unit tests.
Now, `addPackageFile` records a list of all packages and
`package_config.json` is automatically generated just before analysis
begins.

Change-Id: I3393c0266a54d051ffa7601e74753a75857635e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170024
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-02 19:55:39 +00:00
Jonas Finnemann Jensen 5918aa8985 Fix #44027
Remove if-else branches introduced in [1], fixing crash bug when
`$HOME/.dart/` does not exists.

[1]: https://dart-review.googlesource.com/c/sdk/+/168947

Fixed: 44027
Change-Id: Ic178ebf8eb04ac34c1574269b5d7191a5e514460
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170088
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-11-02 19:55:09 +00:00
Sam Rawlins 416cfa7c41 Migrator: Add /*required*/ hints when meta not imported.
Currently the migrator can add `@required` from the preview, which will crash
the preview upon rerunning, if package:meta is not imported.

This change instead adds a /*required*/ hint when meta is not imported.

Additionally, /*required*/ is understood by the migrator just as if it were
`@required`.

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

Change-Id: I1ea532246b956feacedd179146372b13c65003df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169900
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-11-02 17:30:59 +00:00
Tess Strickland 132bec50fc [vm/compiler] Fix runtime regressions in GenerateAssertAssignable.
Specifically, we used to specialize TypeParameter TTS stubs, but that
was mistakenly removed when the non-IA32 versions were unified. Also
move the int subtype check before TypeParameters as it was before.

TEST=Ran golem benchmarks before submission to verify.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try
Change-Id: I235d519c49341af76a902ac22df46c6754445a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170086
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-11-02 17:26:59 +00:00
Konstantin Shcheglov 5ac23a0c51 Use ExperimentStatus.currentVersion in MockSdk.
Change-Id: I9750278b58656d9049f689d4e1ea9b9c1f00f863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170025
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-02 17:21:59 +00:00
William Hesse 979c10c5b5 [infra] Rename test.py option to --cleanup-dart-processes
The option is changed from --cleanup_dart_processes to
--cleanup-dart-processes.

Change-Id: I3f9aefea81ac4ea040741d0850a851688f69e1a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170084
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-02 15:22:55 +00:00
Erik Ernst 1072a85ec7 Lower aliased constructor invocations
Change-Id: Iceb4c5bcf7e317a534eecb39f389b7e70aa39f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169889
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-11-02 15:10:09 +00:00
Johnni Winther b74e408f1a [cfe] Ensure redirecting factory parameters are declared before inference
Closes #43918

Change-Id: I5cbd733abebb388ebb1e70556f7c1ea8af105711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169888
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-02 15:09:19 +00:00
Paul Berry 531ffd0e45 Migration: add repro for #44012
Bug: https://github.com/dart-lang/sdk/issues/44012
Change-Id: Iabddb6de213aa70feb42b273f0e48fc2b5fa582d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170020
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-11-02 14:43:29 +00:00
Alexander Markov 4054a9edf4 [Test tool] Remove -c dartkb configuration
Change-Id: I178f18484b853aa35248fa9f6252509ec0df6832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169500
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-02 14:06:19 +00:00
Sigurd Meldgaard ea7e27cfeb Roll dart_style 1.3.8+1 into the SDK.
There are no formatting changes in this release. The only change is the
fix for https://github.com/dart-lang/dart_style/issues/964.

Includes corresponding adaptations of dartdev/dart CLI.

Change-Id: I1c97f0b7009b98ae609b258401522453faa35c64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170083
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-11-02 13:42:19 +00:00
William Hesse 5b159f0970 [infra] Add --cleanup_dart_processes to test.py
This is needed for Windows test shards on swarming builders,
    where the task_kill step at the end of the recipe is not sufficient
    to clean up abandoned Dart processes on a single shard task.

BUG=https://github.com/dart-lang/sdk/issues/32138
Change-Id: Id48f29f46350b5496c7427ca043dc5f2445fae37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170082
Reviewed-by: Karl Klose <karlklose@google.com>
2020-11-02 13:24:09 +00:00
Gihwan Oh afa41aa3f1 Correct a typo in the documentation
`Symbol("[]=")` is identical with `#[]=` not `#[]=]`

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

GitOrigin-RevId: 48e3c5da1c1e9e2374fbb29247244a765aef4258
Change-Id: I3da5e74b9f075094a5d3e4667a5b9b1a386d7b3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162760
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2020-11-02 11:03:52 +00:00
gaaclarke a4786e8f77 [vm] Update Dart_Initialize doc string for parameter
Closes https://github.com/dart-lang/sdk/pull/43964
https://github.com/dart-lang/sdk/pull/43964

GitOrigin-RevId: 7d803758ca60764423915b5319a12711d56808dc
Change-Id: I4b396673014735a44564ca7400632d01beafd112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169582
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-02 11:00:32 +00:00
Matthew Lloyd 30ba97bb1b Fix remaining instance where DateTime accesses the private member _value
This does not work if the DateTime accessed is an implementation of
the DateTime interface, rather than an instance of the same class.

Related issues:

* https://github.com/dart-lang/sdk/issues/34962
* https://github.com/srawlins/timezone/issues/57

Related changes:

* https://dart-review.googlesource.com/c/sdk/+/81828

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

GitOrigin-RevId: 877ae83867a37c402ae5057471fa283eebd8891c
Change-Id: I91205292bb91d7958c4b3687135a8152d6ebbe6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151322
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2020-11-02 10:35:42 +00:00
Ming Lyu (CareF) 2613251b4d typo fix
Fix a spell typo

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

GitOrigin-RevId: 32c2b39492d6b1dc5a66c7d8f2f99a0230200cf0
Change-Id: I393e4ed66ed7c6a9aef5cac7ae3bcef15a0d0e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159500
Reviewed-by: Michael Thomsen <mit@google.com>
2020-11-02 09:32:15 +00:00
Clement Skau 79ca2ef7b8 Clean-up: removes unused set_raw_async_stack_trace(..)
Change-Id: I37634839c5e9fe8ab9c81a4b7d387f78028e6268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170081
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-11-02 08:37:22 +00:00
Brian Wilkerson 2ab3ebad9d Remove a duplicated error code
The parser produces this diagnostic, so analyzer doesn't need to.

Change-Id: I39e2ade681e5580b6ca5493a334d87d66f51e1ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170041
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-02 05:06:02 +00:00
Brian Wilkerson 98ba51c48e Improve the highlight range for ambiguous_export
Change-Id: I0c4f887ad467fa5e186ad34650816f15956f623f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170021
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-01 15:25:11 +00:00
Brian Wilkerson 3fe3a0384f Improve the highlight range for invalid_super_invocation
Change-Id: I8be664802f04def78304b7cc0e8481d734d295e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-01 15:24:51 +00:00
pq 3fde0ca43d linter 0.1.122
Change-Id: Ib551f019175dffe1473959ad91217ed97a8f34df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-31 13:40:53 +00:00
Alexander Aprelev da133e5047 [io/file_watch] Don't attempt to close already closed DirectoryWatchHandle.
Fixes https://github.com/dart-lang/sdk/issues/43941

TEST=Running four dart scripts in parallel that delete/watch thousands of file reproduces the failure after several minutes. After the fix it no longer reproduces.

Change-Id: I6a0a928838c676f44e747a822611b56f0ffc4841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169601
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-10-31 01:39:33 +00:00
Konstantin Shcheglov 77f2019f00 Use the current SDK language version by default.
Change-Id: I317ad3858b0f023cdf2fd02a1a28a9c22742b74c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-31 00:20:22 +00:00
Konstantin Shcheglov 7dcb9bba3e Use the releaseVersion in errors for ExperimentalFeatures.non_nullable
Change-Id: I46a623601aee90f19ce1770cda3c8125ec2ef941
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169943
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 23:39:12 +00:00
Ben Konyi 7f723f4166 [ VM / CLI ] Fix issue where VM flags would be parsed from the option
list for a script.

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

Change-Id: I6f0860e0a43055aaab775a28baa660d60fb1c47e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169782
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-10-30 23:25:22 +00:00
Brian Wilkerson 195820ec10 Update the message for sdk_version_never and comment in previously reviewed docs
Change-Id: I505e4a577feecbb4deb25eaaeb863a80c7e71602
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 23:17:12 +00:00
Ryan Macnak c8dea19836 [vm, gc] Reserve some memory to use during handling of OutOfMemoryErrors.
This reserved space can only be allocated from after an allocation has failed from OutOfMemory, and once some portion of this space is used, refilling it is the first allocation performed after GC.

Also avoid greatly slowing down from ineffective scavenges as the memory limit is reached.

Bug: https://github.com/dart-lang/sdk/issues/43543
Bug: https://github.com/dart-lang/sdk/issues/43642
Bug: b/169880355
Change-Id: Ic7132cb34d7a7d13c67661f057f00dd74306251c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165862
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-30 23:07:22 +00:00
Brian Wilkerson 740857152a Fix the wording of a warning
Because this is only a warning the user can ignore it and the code will
compile and run without problem. Hence, the previous wording was a bit
strong.

Bug: https://github.com/dart-lang/sdk/issues/43189
Change-Id: Ibe4f048191b28230fede8e7e5d76943c5b56f31b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169962
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 22:57:32 +00:00
Alexander Markov bf968d5627 [Test] Remove vm/dart/il_round_trip_deserialization_test
This test was added a while ago during development of IL serialization
and deserialization (https://github.com/dart-lang/sdk/issues/36882),
which wasn't completed.

Since development of serialization/deserialization was put on hold,
this test was failing with a lot of flakiness, flipping between
Crash/Timeout/RuntimeError on unrelated changes (https://github.com/dart-lang/sdk/issues/43617,
https://github.com/dart-lang/sdk/issues/43359, https://github.com/dart-lang/sdk/issues/36882),
and even turning bots purple (https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-nnbd-linux-debug-simarm_x64/32).

There are no signs that underlying problems with IL serialization/deserialization
are going to be addressed, but this test requires constant attention.
If implementation of https://github.com/dart-lang/sdk/issues/36882 is
ever resumed, it would be possible to resurrect this test from git history.

Closes https://github.com/dart-lang/sdk/issues/43617
Closes https://github.com/dart-lang/sdk/issues/43359
Closes https://github.com/dart-lang/sdk/issues/42441

Issue: https://github.com/dart-lang/sdk/issues/36882
Change-Id: I5a8789397efcb69ad30257077aee0a3e195c8a69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169940
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-30 20:59:22 +00:00
Konstantin Shcheglov d484a6f09f Remove support for experiments in Analysis Server options.
analysis_options.yaml should be used instead.

Change-Id: I02a03667d5de5c9e764e30ff3c77b8df6deaa221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 20:46:02 +00:00
Konstantin Shcheglov 77a5f85dbf Simplify check for parameters DeprecatedMemberUseVerifier.
Follow up for https://dart-review.googlesource.com/c/sdk/+/169903

I believe inDeclarationContext() is unrelated and not necessary.

Using thisOrAncestorOfType() is cumbersome here, so I changed it
to iterating directily over parents.

Bug: https://github.com/dart-lang/sdk/issues/44004
Change-Id: I2ecd1d5833b4deaac8afcc8ac9a6a53c3eeb6f4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 20:32:32 +00:00
Brian Wilkerson be5446f700 Improve the location of a couple of diagnostics
Change-Id: I11e935b89d7e2a91a71b2fed162407d6bb2c2367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169942
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 20:31:52 +00:00
Ryan Macnak 88fdb3ee68 Add tests for the identity of constants repeated in different loading units but not present in the main unit.
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: I29a00aa6139dc2a1f865f8c5f659169c84c8e45d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169790
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-10-30 19:16:42 +00:00
Sam Rawlins d0db3b1d23 Do not report @deprecated field formal parameters at their declaration.
Fixes https://github.com/dart-lang/sdk/issues/44004

Additionally, fix @deprecated parameters referenced in initializers.

Change-Id: Ibad9c3acaf3991c722bee95ecd58d3e3a04bb4cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-10-30 19:10:03 +00:00
Johnni Winther d70796bae8 [kernel] Add caching ability to StaticTypeContext
Dart2js is changed to use the caching scheme in preparation for dart2js
to use the static types computed by the CFE instead its own custom
static type computation.

Change-Id: I1d45eda2f67ce4b23d669ec49e476ee357b37fc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166845
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-30 17:55:21 +00:00
Brian Wilkerson 224a997a23 Remove the obsolete dartfix package
Change-Id: Icc986d6345e2867ca0f3e3863dff6b0418db8242
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169761
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-10-30 17:22:31 +00:00
Johnni Winther 5efe55abf7 [cfe] Fix missing case of using receiver type instead of bound
+ fix test to expect erasure of `S & int` to `S` also when bound is `dynamic`.

Closes #43591

Change-Id: I44cb4c726648d4065bdf89bb2dbf71b2753c6c84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169340
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-10-30 16:33:51 +00:00
Clement Skau f7e678d71d Nit: typo _asyncSet.. -> _setAsyncThreadStackTrace
TEST=None. It's a nit typo in a comment.

Change-Id: I80c1fc1c1dd59c3e841791b6134e4c06fd866358
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169886
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-10-30 16:16:45 +00:00
Erik Ernst 0cf3c37e9e Adjust tests verifying the static type dynamic
Change-Id: Icf229e3877ce646340b6dad1bd49c20110953d44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169885
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-10-30 16:10:30 +00:00
Konstantin Shcheglov 5d383959ce Fix crash when integerDivide and the result is not finite.
There are crashes logged internally.

Change-Id: I8e5705017f976891981389135b4713a13f824f46
Bug: https://github.com/dart-lang/sdk/issues/43997
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169861
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 16:08:40 +00:00
Vyacheslav Egorov 4b6f0f5c7b Revert "Require that all changes to VM have TEST line"
This reverts commit a2ceec3e25.

Reason for revert: presubmit hooks are run very early (before CL description is edited), which breaks common workflows.

Original change's description:
> Require that all changes to VM have TEST line
>
> All changes touching one of the following directories will after this
> change be required to contain TEST= line.
>
>     runtime/vm
>     runtime/bin
>     runtime/lib
>     runtime/include
>     runtime/observatory
>     runtime/observatory_2
>     runtime/platform
>     sdk/lib/_internal/vm
>     pkg/vm
>
> This line is supposed to describe in free form how change was validated,
> for example by listing existing or newly added tests.
>
> The goal behind this requirement is to remind both reviewer and change
> author that changes to the code base are in general expected to be
> covered by tests, especially when CL is addressing a regression which
> slipped through existing testing.
>
> Having TEST line in the description would allow both author and
> reviewer to take additional time to consider if validation was
> sufficient or additional test coverage is needed.
>
> The inspiration for this line comes from Chromium[1].
>
> [1] https://chromium.googlesource.com/chromiumos/docs/+/master/contributing.md#describe-testing-performed
>
> TEST=changed file in runtime/vm and run git cl presubmit
>
> Change-Id: Ie16cf7c14af18e3a22a17084c0aebb4d1dfd6d23
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169640
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=vegorov@google.com,kustermann@google.com,asiva@google.com

Change-Id: Ib2e198c322447e8d1166d5d05b2f3209d168f1e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169887
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-10-30 15:28:41 +00:00
Mayank Patke a5afc3e974 [dart2js] Remove tests/dart2js/boolean_conversion_test.
The dart2js_2 version still exists.

Prior to null safety, it was legal to assign `null` to a `bool`, so
things like boolean operators and control flow constructs required
null checks on their inputs. `--omit-implicit-checks` removed these null
checks, so we had to specify what the behavior would be in these cases.
(In general, `null` was just treated as a falsey value, since that's
what happens in JS.)

With null safety, it is no longer legal to assign `null` to a
(non-nullable) `bool`, so the backend freely optimizes boolean
expressions under this assumption. It's possible to smuggle `null` in
via a cast to `dynamic` and an implicit downcast to `bool`. The downcast
ordinarily fails at runtime but can be removed with
`--omit-implicit-checks`. We do not want to specify the behavior in this
case. We do not guarantee the behavior under `--omit-implicit-checks` of
code which would have failed with checks enabled.

Maintaining the old behavior would likely require us to be pessimistic
about nullability and miss optimization opportunities.

Fixes: https://github.com/dart-lang/sdk/issues/43471
Change-Id: I7e8e7c66f777ef631ef4054a8dfe211e3e2bef55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169820
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-10-30 15:21:20 +00:00
Martin Kustermann 04105ec124 [vm] Fixes "nesting" support for SafepointRwLock implementation
Fixes https://github.com/dart-lang/sdk/issues/44000

TEST=vm/cc/SafepointRwLockExclusiveNestedWriter_Regress44000

Change-Id: I376198195164ab5f41b3e42138f204eaa934bd4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169882
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-10-30 14:15:10 +00:00
William Hesse 65b424b3fd Skip VM tests that hang on Windows
Three dart:io tests in the co19 suite are hanging, causing
test infrastructure failures. Skipping them until the problem is fixed.

BUG=https://github.com/dart-lang/sdk/issues/32138

Change-Id: I5102eef49bf094158535aa2b938930994d4df4dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169880
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-30 11:20:43 +00:00
Johnni Winther 9cd13cdaee [cfe] Add test for issue42607
This verifies that we no longer emit spurious errors/warnings in opted out
libraries when trying to compile with sound null safety.

Closes #42607

Change-Id: I89063003fb5140d9cd0a3ce937017976e2fdd1c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169740
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-30 09:58:01 +00:00
Karl Klose 5cc2ca1ccf Fix typo in list.length= method comment
Change-Id: I35457f926446c9b77c34d7b2a967b6d9076ba055
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169841
Auto-Submit: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-10-30 09:47:01 +00:00
Vyacheslav Egorov a2ceec3e25 Require that all changes to VM have TEST line
All changes touching one of the following directories will after this
change be required to contain TEST= line.

    runtime/vm
    runtime/bin
    runtime/lib
    runtime/include
    runtime/observatory
    runtime/observatory_2
    runtime/platform
    sdk/lib/_internal/vm
    pkg/vm

This line is supposed to describe in free form how change was validated,
for example by listing existing or newly added tests.

The goal behind this requirement is to remind both reviewer and change
author that changes to the code base are in general expected to be
covered by tests, especially when CL is addressing a regression which
slipped through existing testing.

Having TEST line in the description would allow both author and
reviewer to take additional time to consider if validation was
sufficient or additional test coverage is needed.

The inspiration for this line comes from Chromium[1].

[1] https://chromium.googlesource.com/chromiumos/docs/+/master/contributing.md#describe-testing-performed

TEST=changed file in runtime/vm and run git cl presubmit

Change-Id: Ie16cf7c14af18e3a22a17084c0aebb4d1dfd6d23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169640
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-10-30 09:16:41 +00:00
Konstantin Shcheglov 2d4a3bd913 Fix UNUSED_ELEMENT for top-level getter/setter.
Change-Id: I4bba8f0d64176e8b96ce273a6679274665b901e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169789
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-30 06:27:50 +00:00
Brian Wilkerson c63f5c9d13 Prepare to publish a new version of dartfix
Change-Id: I9cf1cf3a135ffda24509f892b9039a88a40b9ee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169791
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-30 00:11:30 +00:00
Devon Carew 9ca05a4092 Fail the flutter/engine bot on analysis info items.
Change-Id: Id82ec041a924ad6f859859fafa90570ed14b69d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169787
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-10-29 23:39:59 +00:00