Commit graph

76503 commits

Author SHA1 Message Date
Devon Carew 5871cfb23c [analysis server] remove older analysis server flags
Change-Id: I4384c98a067467def91e2b769d711069ad057a27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170801
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-09 03:54:58 +00:00
Sam Rawlins d8903669be Quick fix: make a parameter nullable
Closes https://github.com/dart-lang/sdk/issues/44098

Change-Id: Ib3bb0b352f33a027c79746418033497aee1d8a7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170763
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-09 01:19:07 +00:00
Sam Rawlins ae4e13a0a0 Analyzer: prepare for migration, mostly with explicit casts
Change-Id: Ic7565765d67a6b07c9028ad70f285cf0ed9de855
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-08 18:13:47 +00:00
Paul Berry 9b4cbf46b8 Migration: clarify the "unmigrated dependencies" warning text.
The old phrasing was confusing because it was unclear which libraries
were being referred to.

Bug: https://github.com/dart-lang/sdk/issues/44061
Change-Id: Id68f28fcd8ba5a80763e7bf86d6774289701d381
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170841
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-11-08 17:00:17 +00:00
Devon Carew beb56d51f6 [pkg/nnbd_migration] remove a leading space from a message
Change-Id: Ida7bc63a1aa90e252b3bd65263f5d0a72e906c87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170747
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-07 22:02:26 +00:00
Nate Bosch 8b2adff0b4 Update to the latest package:convert
Change-Id: I212d54aec029d01eba3993e39425b31519df0de4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170762
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-06 23:08:03 +00:00
Sam Rawlins 594f0fd51d Analyzer: Delete unused class in source_factory_test
Change-Id: Ia46e3cec3addc18c69259587d5186f9ec078cbfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170761
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-06 22:40:13 +00:00
Sam Rawlins 1b060fb77b Analyzer: prep for null safety with explicit casts, late hints
* `reference.hasElementFor` implies that `reference.element` is not null.
* Using `whereType` prevents an explicit cast from being needed.

Change-Id: I800f7183292ecd0bb6370a381b1d0b924b7f5a61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170744
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-06 22:07:43 +00:00
pq 29168f11d2 linter 0.1.124
Change-Id: I97431c0eadb5dcaa92160eab4a0581e35492b8cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-11-06 21:26:43 +00:00
Ben Konyi df9597169a [ CLI ] Update experiment parsing
Continuation of https://dart-review.googlesource.com/c/sdk/+/169902

Change-Id: Ia971f75aa81c2b5d8696c35f3d16ff53c29f874a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170460
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-06 20:44:43 +00:00
Alexander Aprelev 6200e47c2d [vm/concurrency] Add read lock asserts for Class direct_subclasses/direct_implementors
Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: Ie4f16c395efaf27f8a7b43af90e5eb703eb90ee5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170128
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-06 20:05:53 +00:00
Ben Konyi 996626c089 [ VM / Service ] Remove ReceivePort debugging information in product
builds.

Change-Id: Ie054fa03b3c8d6dc849c9e369b5b4ec48a4b3d2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170402
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-11-06 19:23:23 +00:00
Ben Konyi d2775733a6 Reland "[ DDS ] Keep event history for Stdout, Stderr, and Extension streams"
This reverts commit a486752050.

Change-Id: I112a907792b5cbfd4a1ee0eb96898dc931c92f23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-06 19:02:23 +00:00
Dmitry Stefantsov b66fbd1829 [cfe] Use type parser in legacy upper bound tests
Closes #44094.

Bug: https://github.com/dart-lang/sdk/issues/44094
Change-Id: Ib32a25545b65a91f951ee613276e7c275a91a739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170698
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-11-06 17:00:03 +00:00
Sigurd Meldgaard 9d132ebba9 Bump pub
New commits:

git log --format="%C(auto) %h %s" 900e796a37fd9f68de9dd183cf4798fe5f055eaa..4ca4767a6c00b2dadecdaee9a4866dae40ef25f2
 4ca4767a Added a dart pub outdated --transitive option (#2731)
 6b145bd6 Deprecate --server argument to `pub publish` and `pub uploader`. (#2697)
 7737023a don't warn if previous prerelease was null safe (#2730)
 62f92838 Improve outdated --mode=null-safety (#2724)
 cc589ec3 Change message for no Latest resolution (#2729)
 656803e9 Require sdk constraint (#2718)
 8309d877 Added test that dev_dependency does not trigger null-safety warnings when publishing (#2727)
 332ea049 Remove warning about mixed mode. (#2723)
 a98a1f23 Simplify null-safety analysis in `pub outdated --mode=null-safety` (#2721)
 5fba2015 Outdated null safety implies prereleases (#2722)
 fb9ec4af Fixed bug in yaml_edit (#2703)

Change-Id: I22a084aee06542e04a272269fb0134f0ac62f779
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170690
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-11-06 15:36:02 +00:00
Martin Kustermann 391bc8d33d [vm/concurrency] Allow calling SafepointRwLock::IsCurrentThreadReader() inside safepoint operation scope
Currently `IsCurrentThreadReader()` can only be called outside
safepoint operations. We'll loosen that restriction for future CLs
which require calling this method inside safepoint operations.

Change-Id: I23a99cc535df47c1dbd41f92e29e669e7ddd921f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170685
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-06 14:46:22 +00:00
Sam Rawlins 466f2fd8a7 Analyzer: prepare some generated/ tests for null safety
Change-Id: Ieca714d8b32b7b283a8dc30dd820df07d1e64655
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-06 14:34:02 +00:00
Clement Skau e90967f29d [SDK] Makes --lazy_async_stack default.
Bug: https://github.com/dart-lang/sdk/issues/42062
Change-Id: If22ed42b363e2d75d0be5cc14aef9e909b8ff2e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149288
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-06 14:12:52 +00:00
Daco Harkes 6101e4653b [test/ffi] Add struct stack alignment test
A smoke test to exercise alignment of structs with various field types
to see how they are aligned on the stack. Only contains small structs
because most ABIs only pass structs less than 16 bytes on the stack.

Especially tests iOS64, where `AlignOf(struct{float32;float32;}) == 4`
but `AlignOf(struct{int32;int32;}) == 8` due to the special treatment
of homogenous floats in the arm64 ABI combined with iOS decision to not
align everything on the stack to at least word size.

Test tested on iOS64 through Flutter.

structs_by_value_tests_configuration.dart is the only non-generated
file.

The tests are tested in the dependent CL. Tests are ignored in status
file and are un-ignored in dependent CL.

Tests for https://github.com/dart-lang/sdk/issues/36730.

Change-Id: I6ec4523208db740b8ea3f8a4ab1e5717f1088467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170691
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-06 13:54:23 +00:00
Dmitry Stefantsov d54e2bb568 [cfe,ddc,dart2js,vm] Add NullType
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/170342/
* https://dart-review.googlesource.com/c/sdk/+/170344/
* https://dart-review.googlesource.com/c/sdk/+/170345/
* https://dart-review.googlesource.com/c/sdk/+/170346/
* https://dart-review.googlesource.com/c/sdk/+/170347/

The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.

Closes #40122.

TEST=Verified by changes in .expect files in pkg/vm/.
Bug: https://github.com/dart-lang/sdk/issues/40122
Change-Id: Ib8197802fdc69694387ae47ac990c58b3aaab7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170689
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-06 12:43:52 +00:00
Johnni Winther 1876c6751b [cfe] Add test for forwarding stub targets
The added test show that we generate a super call to the wrong target
in some forwarding stubs. The target should have been the mixed in
member but is instead the super member that it overrides.

Change-Id: If7536628370ba69405cbedef969e727a5d220058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170684
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-06 11:48:33 +00:00
Alexander Thomas 54cd996b77 [co19] Roll co19 to de1f3498dff1091b7ca715eb7f831e24ec1a8c64
2020-11-05 irina.arkhipets@gmail.com Fixes #602: New tests for least and greatest closures added.
2020-11-05 sgrekhov@unipro.ru #926. Rewrite io/Process/start_A01_t02 test to work on precompiled environment
2020-11-05 sgrekhov@unipro.ru #932. Rewrite HttpRequestUpload/onLoad_A01_t01 test to send correct HttpRequest
2020-11-04 sgrekhov@unipro.ru Fixes #956. Don't expect extension invocation on type dynamic
2020-11-04 karlklose@users.noreply.github.com Convert some multi-tests to static error framework  (#958)
2020-11-03 irina.arkhipets@gmail.com Fixes #602: dynamic tests for least and greatest closures updated.
2020-11-03 irina.arkhipets@gmail.com Fixes #602: tests for least and greatest closures added.
2020-10-28 sgrekhov@unipro.ru #926. Fix two Process tests to use 'process_test' tool
2020-10-28 sgrekhov@unipro.ru #926. Rewrite two Process tests to use 'process_test' tool
2020-10-28 sgrekhov@unipro.ru Fixes #955. Expect less specific error for typed_data tests
2020-10-26 sgrekhov@unipro.ru Fixes #954. Change the line where we expect an error for CFE
2020-10-20 sgrekhov@unipro.ru Fixes #912. Abstract variables syntax tests added
2020-10-19 sgrekhov@unipro.ru #912. More external variables syntax tests added
2020-10-17 sgrekhov@unipro.ru External variables syntax test added
2020-10-16 sgrekhov@unipro.ru #912. More test for static analysis of external variables added
2020-10-15 sgrekhov@unipro.ru #912. Test for static analysis of external variables added
2020-10-14 sgrekhov@unipro.ru #912. Test for static analysis if abstract variables added

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,analyzer-nnbd-win-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,front-end-nnbd-win-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-win-release-x64-try
Change-Id: Id9cde784918faa4e891da8c4cb448d415a7a18aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170680
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-11-06 11:15:32 +00:00
Martin Kustermann 7e28ecc270 [vm/concurrency] Avoid calling into Dart code for evaluation of enum constants
There is no need to call from C++ into Dart code just so the Dart code
can return a constant. Instead we can get the constant directly in C++
code.

This avoids calling into Dart code during class finalization to evaluate
enum constants.

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

Change-Id: Ia0b09482188be2d0ce83ce9ffc20e5c15e52d070
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170540
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-11-06 10:41:43 +00:00
Alexander Thomas 4c7740ab07 [infra] Copy environment to ensure debian-package can find ninja
The copy was accidentally removed when removing bot.py.

TEST=BUILDBOT_BUILDERNAME="debianpackage-linux-be" ./tools/run_debian_build.sh

Change-Id: I9264824246a96a83f171602571d2073243776d64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170686
Reviewed-by: William Hesse <whesse@google.com>
2020-11-06 10:27:26 +00:00
Alexander Thomas cc853ee3e3 [infra] Add missing import to linux_distribution_support.py
TBR=whesse@google.com

Change-Id: I00dfdc3257be8bd2ca9b39e957c427e842c98cd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170683
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-06 08:52:39 +00:00
Alexander Thomas 57864a88a6 [infra] Fix another undeclared variable in debian-package scripts
TBR=whesse@google.com

Change-Id: Ibb4bcbb85c22ec348cb4a94f8408defe1eefa8b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170682
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-06 08:44:31 +00:00
Sigurd Meldgaard cd970af91a [Dart CLI] Embed pub in dartdev
This includes the following pub commits:

 git log --format="%C(auto) %h %s" 5b4df5a6f931c63622ac349602d6ef0367e8070f..fb72c1f774ca27556225b207185c0b6b6ab1c274
 fb72c1f7 Make `run` available (but deprecated) in the embedding (#2698)
 63b56ea4 Return the exit-code from commands (#2689)
 7fc4e273 Deprecate top level (#2694)

Change-Id: I5842b1ecb15fc7844d628e2ad5fb00e3f627dbff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168347
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-11-06 08:30:12 +00:00
Erik Ernst 35d83867ba Enable non-function type alias tests for the analyzer
Change-Id: I64074eb4b49e514f3b7454de0fb244f21ef336a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-11-06 08:19:52 +00:00
Daco Harkes f3b27c5433 [vm/ffi] Refactor callback id exponential growth
Also lower the initial array size to save a tiny bit of memory and
let the existing tests exercise exponential growth

TEST=tests/{ffi,ffi_2}/function_callbacks_many_test.dart

Change-Id: I7b490878035cf2e2264ce7443dfdc2b342bedcc3
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170438
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-11-06 08:08:52 +00:00
Alexander Thomas 63b097ece0 [infra] Fix wrong variable name that broke the debian-package builder
TBR=whesse@google.com

Change-Id: Idc89bfb190e51a43ea09044476d9fbdf0562802d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170681
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-06 08:03:43 +00:00
Alexander Thomas bbe16d5dfe [infra] Remove dead code in tools
* Remove bot.py and all it's uses.
* Remove unused buildbot pre-recipe framework recipes.
* Remove abiversions folder.
* Remove old browsers folder.

Change-Id: Iebd0a374c5bd1f17fed9d1fa9dbf750639242312
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170432
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-11-06 07:29:12 +00:00
Paul Berry 7322bc027e Migration: replace pub outdated check with a check on transitive imports.
Instead of running `pub outdated` to see if the user's dependencies
have been migrated yet, the migration tool now examines all of the
transitive import dependencies of the user's code to see if they are
opted in to null safety.  This produces a more accurate result than
`pub outdated`, because it is able to ignore files in transitive
package dependencies that aren't reachable via imports
(e.g. references to `package:analyzer` brought in by `package:test`).

Fixes #44061.

Bug: https://github.com/dart-lang/sdk/issues/44061
Change-Id: I38465bcbf35e8552f0060b5d51c0f1cfc5d18c7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170561
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-11-05 23:05:51 +00:00
Sam Rawlins 40cfccda6f Migrator: Add a progress bar for explainMigration, which can take a long time.
This shows progress for work which happens after the migration suggestions have
been generated. This work is generating instrumentation details for the front
end.

When migrating the analyzer package, the progress indicated by this third
progress bar takes approximately the same time as generating suggestions (on
the same order of magnitude).

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

Change-Id: I0b40dd5e587b718bd1ef56d64f03929924cc430a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170563
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-05 22:10:51 +00:00
pq a15b252c28 overlapping fix test
Change-Id: I4621e8e24b8d296875d2033ac21ba8da68fb0387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-11-05 21:14:31 +00:00
Stephen Adams e769817cdc [tests] Split corelib{,_2}/list_concurrent_modify_test
Splitting out a failing test to increase coverage of other tests.

It is not clear that `a.addAll(a)` should throw if `a` is empty.
`a` is not modified by the action.

dart2js/DDC do not detect this case and I'm reluctant to add a check
for the case where `a` is in fact not modified.

The VM test is very specific to an identical argument and cannot
detect the case for `a = Mylist([])`.

Another option to this proposal is to simply delete the `[]` case.

In general, I'd like to move more ConcurrentModificationError tests
into assert statements.

Change-Id: I1f9559bdb43ea1bae0575413748c9d9d0de58b99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170023
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-11-05 19:46:35 +00:00
Paul Berry 9d3b932640 Migration: fix handling of .call tearoff on a function-typed expression.
Change-Id: I18b102ae83afdb051decfc26762619fb5746f73f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170364
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-05 19:18:54 +00:00
Sam Rawlins d01694d8aa Migrator: Do not overflow progress bar, or print warnings before ticks
Fixes https://github.com/dart-lang/sdk/issues/43752

Change-Id: I538b283b1cabe2b2212ada30317c14e76e182a06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170562
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-05 19:08:14 +00:00
Paul Berry e8c8e51139 Migration: opt in dependencies in migration unit tests
Early in the development of the migration tool, due to language
versioning support being incomplete, it didn't have a good way to
distinguish opted in from opted out code, so we had the convention
that any code not being migrated was opted in.  Now that we have
language versioning support, we need to explicitly opt that code in.

Without this change, we'll get bogus failures when we add logic to
detect unmigrated dependencies.

Bug: https://github.com/dart-lang/sdk/issues/44061
Change-Id: I12920ea75b8af2142a044314b89b76bb602897c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170560
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-05 18:16:57 +00:00
Sam Rawlins 9e6486fe3f Analyzer: Make test fields late, late final, or hinted for migration.
Many fields can be late or late final, so adding hints for the migration tool.

In SnippetTester, the fields are all set in the constructor. Added a factory
constructor so the fields can be final. Renamed them to be private.

Change-Id: I559e7ba92c7c6749038630b03f67f8a77bdc704a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170406
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-05 17:45:17 +00:00
Sam Rawlins e56e5104cf Analyzer: prep file_system tests for null safety.
Fields initialized in `setUp` are late.

Variables initialized with implicit casts like:

    ClassDeclaration clazz = unit.declarations[0];

would need a cast:

    ClassDeclaration clazz = unit.declarations[0] as ClassDeclaration;

so they are updated to use var, which is more idiomatic:

    var clazz = unit.declarations[0] as ClassDeclaration;

Change-Id: I4e4ae814a814d3a4200c5078a6904dbac0a8140c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170520
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-05 17:39:37 +00:00
Erik Ernst d13eaddf97 Lower aliased redirecting factory constructor invocations
Change-Id: I281f959b94d6e9dc2d7f7c6e4923cc841897041b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170431
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-11-05 15:17:43 +00:00
Clement Skau 60c5434084 [Test] Clarifies test flags, get_stack_limit_rpc_test.
This test, it turns out, only works for these particular flags.
Any other combination of causal/lazy-async-stacks will make it break.

Change-Id: I03efa5c28f49e6bbdb9da359270a0f7eff072924
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170436
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-11-05 15:01:13 +00:00
Erik Ernst 3a7eeb6315 Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety
Change-Id: If3912d75c5f89a741299b2fae4299d01ac928eec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170424
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-11-05 14:26:53 +00:00
Daco Harkes 633c5389a5 [vm/ffi] Document shadow space and restore RSP
Split off from https://dart-review.googlesource.com/c/sdk/+/140290.
We start using the stack after the C call, so RSP needs to be restored.

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

TEST=All existing FFI tests on windows.

Change-Id: Idcaff9007c1b6f42b95288e39470b3d6cca2ef56
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170425
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-11-05 13:58:43 +00:00
Daco Harkes b1946a51ed [vm/ffi] Rename NativeFundamentalType to NativePrimitiveType
These types are called object types in the C standard
(ISO/IEC 9899:2011) and fundamental types in C++
(https://en.cppreference.com/w/cpp/language/types) but more commonly
they are called primitive types
(https://en.wikipedia.org/wiki/Primitive_data_type).

Change-Id: I78ac9bee162e547a7b9b04cf142b274602c53d18
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170429
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-05 13:57:53 +00:00
Daco Harkes 88de61b933 [vm/ffi] Refactor Zone arguments to first position
We pass `Zone* zone` usually as first argument to functions.
This was not the case in existing FFI code.

Addressing:
https://dart-review.googlesource.com/c/sdk/+/140290/37/runtime/vm/compiler/ffi/native_type.h#181

Change-Id: I858af575848d94381780800eda7a9c506f67eb3e
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170428
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-05 13:57:53 +00:00
Sam Rawlins 60323ebce9 Analyzer: Add nullability hints to memory_file_system
The migration tool thinks the various parameters are nullable otherwise.

Change-Id: Ie24cf73bfd32ed4d4bade36a9d4fda76e1ca991a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170481
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-05 11:41:44 +00:00
Daco Harkes d9d0cc61c4 [vm] Remove old flutter_engine patches
Dart has rolled beyond these Dart SDK hashes in flutter/engine/DEPS.

Change-Id: Ib7dc7b7f746b8485348cef09d30f67bf3b965bac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170426
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-11-05 11:34:13 +00:00
Clement Skau 27ca552ddb [SDK] Replaces async's _AsyncAwaitCompleter with _Future.
Run time (less is better) impact:
dart:
- Calls.AwaitAsyncCall  -43.95% ~ -55.50%
- Calls.AwaitAsyncCallClosureTargetPolymorphic  -40.33% ~ -53.58%
- Calls.AwaitAsyncCallInstanceTargetPolymorphic  -42.69% ~ -55.65%
- Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits  -42.05% ~ -56.14%
- Calls.Await...  0% ~ -13%
dart-aot:
- Calls.AwaitAsyncCall  -9.748% ~ -11.13%
- Calls.AwaitAsyncCallClosureTargetPolymorphic  -8.673% ~ -13.19%
- Calls.AwaitAsyncCallInstanceTargetPolymorphic  -9.799% ~ -11.74%
- Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits  -5.412% ~ -13.43%

Code size impact:
- flutter_gallery_app_so_brotli_size  -0.1237% ~ -0.2410%
- flutter_gallery_readonlydata_size  0.1693% ~ 0.2041%
- flutter_gallery_instructions_size  0.1157% ~ 0.1779%
- flutter_gallery_total_size  0.1021% ~ 0.1413%

Bug: https://github.com/dart-lang/sdk/issues/39119
Change-Id: I64d28a8bea078277946d7be43737e265920c8f16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126322
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-05 09:51:13 +00:00
Jens Johansen 7b75bd8ece [CFE] Special case StrongModeNNBDPackageOptOut message in IncrementalCompiler
This CL fixes the wrong message, so - when in the process of fixing
the package nnbd settings - one gets the correct message, mentioning the
right packages and no longer mentioning the fixed ones.

Change-Id: Ied26094055e56b44dfdd2e942b98eb9e1e7968fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170423
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-05 09:43:23 +00:00