Commit graph

73648 commits

Author SHA1 Message Date
Joshua Litt
d14ab0779a [dartdevc] Migrate tests/compiler/dartdevc_native to tests/dartdevc_2.
Change-Id: I9c486f29f3bcf8a6ecf481eb25ea61d0468049b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150667
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-17 18:14:00 +00:00
Joshua Litt
fd1556c1e4 [dart2js] Fix sdk yaml files.
Fixes unittest-weak-asserts-no-sdk-linux pkg/compiler/test/end_to_end/no_platform_test

It is a total mystery though why this was passing before migrating sdk_nnbd to sdk.

Change-Id: Id71efb2c1b399ca64233b3544d2f274d63690aa6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151468
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-06-17 18:13:19 +00:00
Paul Berry
82750c58f7 Update toList in analyzer's mock SDK
Fixes #42327.

Change-Id: Iecab55d0c97d439de02ac63ba53a0511532c773f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151560
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-17 17:20:57 +00:00
Kevin Moore
073cbcc5a4 [pkg:js] Enable pedantic lints
Change-Id: Ia03a68431d3e62f2b5db45d3c38fb99f5ab07ca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151540
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2020-06-17 16:35:56 +00:00
Martin Kustermann
168539d61d Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target"
The flutter engine DEPS got new icu/boringssl so this CL can safely
land and roll into engine. A small change is made in Patchset 1..3.

This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

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

Change-Id: I8d9b37acbb5eb94e44d97652f838948a946fd372
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151505
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 16:12:26 +00:00
Regis Crelier
db29a9697f [tests/NNBD] Fix expectations in normalization test.
This fixes issue https://github.com/dart-lang/sdk/issues/42143

Change-Id: I11df42728f74e85071566b355d1a3bbba4182aea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151440
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-06-17 15:51:39 +00:00
Danny Tuppeny
f36151e2d2 Add ChangeTo/CreateClass fixes for implements/mixin of missing identifiers
Change-Id: Iac0c512e87aaf5ba183d155e7bffe2a74936d7a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151509
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-17 15:44:36 +00:00
Brian Wilkerson
094d98a812 Use the context type for available declarations
Change-Id: I698becd01145dde94505608f99171789a7f39c62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151428
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-17 15:43:36 +00:00
Danny Tuppeny
b2f755ac07 Add a note about passing client-id/client-version to LSP doc
Change-Id: Ic82e5915e512c78c99b963bbaa74aaed42374726
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151506
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-06-17 15:06:54 +00:00
Danny Tuppeny
728df5d9ab Fix placement of "final" for late fields with types
Fixes https://github.com/Dart-Code/Dart-Code/issues/2553.

Change-Id: Ief79c8d5e095c17afc39d83eb231604bcf224ee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151511
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-06-17 14:56:04 +00:00
Sam Rawlins
8fcb9e4b0e Migrator: draw a hard edge when marking an AsExpression non-nullable
Fixes https://github.com/dart-lang/sdk/issues/41397

Change-Id: I03307f297954f97911ed501240df17e48ef2dfc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151480
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-17 14:38:24 +00:00
Paul Berry
0b12c1d775 Migration: fix crash when there is an extension in code not being migrated
Change-Id: Ie7d4daf827f7803ea4001a26e06aa58577b9d49a
Bug: https://buganizer.corp.google.com/issues/158730342
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151443
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-17 14:03:44 +00:00
Vyacheslav Egorov
025d256658 Remove divisive terms
Based on guidance in https://developers.google.com/style/

Related to https://github.com/dart-lang/sdk/issues/42247

Change-Id: Iaf37f3372b2b5882738cfa63339dd7b032cdbba9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150630
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-17 14:01:54 +00:00
Alexander Thomas
72f65f7c18 [benchmarks] Opt-in benchmark_harness to null safety
The package was opted out in package_config.json and therefore not
allowed to run with null safety enabled.

Change-Id: I1f2bf2f3c0e2451f54092dac919c80ee4ffd32c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151510
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-06-17 11:48:22 +00:00
sgrekhov
d1eae9f742 [co19] Enable Language/Expressions tests
Change-Id: I6ebe9227965e038a42ce30da8c5ac70866297d24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151392
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 11:30:31 +00:00
Tess Strickland
c45c07592a [vm] Test disassembly in v8_snapshot_profile_writer_test separately.
Disassembling on every run makes it difficult to get an idea of which
specific configuration failed. Instead, just pick a configuration that
already succeeded and test that configuration with disassembly
separately so that it's clear if the disassembly was what caused the
failure.

Also add reasons to Expect.isTrue/isFalse uses in
package:vm/v8_snapshot_profile.dart. Now we don't have to track down the
specific line to find out what failed when reading logs. Another benefit
is that the error message now includes the values involved in the
failure and not just "Expect.isTrue(false)" or "Expect.isFalse(true)".

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: I3d4b533f4df041dfcced4eaeb8bc5729dfad0b82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151502
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-06-17 11:11:43 +00:00
Jago
7d863d7266 Doc: DateTime accepted format for parsing date
Add to the inline documentation the most simple and often most used simple date format that can be parsed, that was missing.

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

GitOrigin-RevId: 03e6d955961a2fc8b0eab5c9e46f4212ef470c9a
Change-Id: Ia2a5e8376a3741d34dbd27ceb6f39d986687bfee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150507
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-06-17 08:43:23 +00:00
Daco Harkes
8e2fa30e6c [test/ffi] Disable handles test on msan
Properly running msan on this test would require us to emit
msan_unpoison and msan_poison calls in the ffi trampolines to mark
explicitly what we are doing with the stack during ffi calls.

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

Also, this CL unifies the two status files a bit more.

Change-Id: I3a234b9c6dc430883a2d224b9ed3d7d48f4f678a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151399
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-06-17 08:26:39 +00:00
Mike Fairhurst
aa3f7dc4e9 [analysis_server] Fix crash reporting bug, casting exception to a string
Brian noticed this running unit tests. Who knows how many bug reports we
have missed from this -- we can only hope it is very few.

```
type '_TypeError' is not a subtype of type 'String'

package:analysis_server/src/server/error_notifier.dart 26:7        ErrorNotifier.logException
package:analysis_server/src/analysis_server.dart 266:54            AnalysisServer.handleRequest.<fn>
dart:async/zone.dart 1222:13                                       _rootRunBinary
dart:async/zone.dart 1107:19                                       _CustomZone.runBinary
dart:async/zone.dart 1601:18                                       runZonedGuarded.<fn>
dart:async/zone.dart 751:19                                        _ZoneDelegate.handleUncaughtError
...
```
Change-Id: Ib83dc99a88a1566ead5d59a9f71afc80416eb341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151464
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-06-17 07:11:30 +00:00
Alexander Thomas
1046888b1b [build] Also default to use a sysroot when the HOST_OS is linux
Previously, gn.py would not enable the sysroot when building for android
on Linux. However, the build also uses the host toolchain to create
tools and these need to be built with the sysroot. Otherwise, the new
goma backend refuses to run the build actions.

b/144018396

Change-Id: Ifda03ac82ce7d4cc8289198924a8316ab6751f45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151389
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-06-17 06:53:40 +00:00
Konstantin Shcheglov
9468ba063e Non-nullify types when inferring types of top-level variables and fields.
Change-Id: Id272958725d582892aa9cacdddbb5cde89793bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151444
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-17 05:15:10 +00:00
Stephen Adams
88411f7cf7 Don't run analysis_server_client tests on dart2js
They use 'dart:io'.

Change-Id: Ia18dff5c4427e5592adbe426d2d1afb3b1af9b53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151361
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-17 05:08:40 +00:00
Konstantin Shcheglov
d279cb47b5 Enforce sorting in analyzer/.
Change-Id: If7e76e442e64cd4991b80c3993e3da10bb3a19ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-17 05:04:30 +00:00
Jacob MacDonald
e7218354a8 add all flutter/flutter_test/test isolate deps to the allow list
I also had to migrate package:js to nnbd as a part of this

Bug:https://github.com/dart-lang/sdk/issues/42274
Change-Id: Ia0223e013d2afb464c05eba71783827cf1fb4781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151400
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-06-17 04:58:30 +00:00
Robert Nystrom
7e5fe50b24 Migrate language_2/sync_star to NNBD.
Change-Id: I184c984b65f15dabc647c510295c3dc82be3a203
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151473
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-06-17 02:25:41 +00:00
Robert Nystrom
f638fe385b Migrate language_2/symbol to NNBD.
Change-Id: I05faaa3481bde1085af2b0e887e33310fc0592f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151472
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-06-17 02:19:16 +00:00
Robert Nystrom
5a27ea139e Migrate language_2/switch to NNBD.
Change-Id: Idbf338099414c78e1bb6ee2852c41495fb53f70b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151471
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-06-17 02:17:36 +00:00
Robert Nystrom
03f8c11f2d Migrate language_2/stack_trace to NNBD.
Change-Id: I1c34d91ba549715b661ca9103b9a7d5b9e3566f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151087
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-17 00:28:06 +00:00
asiva
4b9aa2bd7e Revert "[VM/Runtime] Cleanup package config initialization code"
This reverts commit 29e93bcdbd.

Reason for revert: Windows bots are failing with package resolution
errors. Looks like we are missing a windows path sanitization step.

Change-Id: Ib56f7e926b4f385fa3fde74c9c71947f64b8be1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151469
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-06-17 00:03:19 +00:00
Leaf Petersen
d44457f79d [Core Libraries] Eliminate the fork in the core libraries.
Move the nnbd core libraries from sdk_nnbd to sdk, and updates
references in build files and elsewhere accordingly.

Change-Id: I09760fe1e006657aacdfe80f3b22fdf6f7e30a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151121
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-16 23:37:36 +00:00
asiva
29e93bcdbd [VM/Runtime] Cleanup package config initialization code
- Use _Init function for initialization of package config
- Remove DartUtils::SetWorkingDirectory, SingleArgDart_Invoke,
  DartUtils::SetupPackageConfig
- Rename Loader::InitForSnapshot to Loader::Init
- Remove _setPackagesConfig, _setWorkingDirectory from builtin library
- Rename _setPackagesMap to _setPackagesConfig
Change-Id: I0b83574593fa95e1b948134fcd4a7b4858ea19c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151045
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-06-16 23:24:26 +00:00
Nicholas Shahan
07e2921287 [ddc] Cleanup false assumption from subtype check
FutureOr<A> <: FutureOr<B> iff A <: B was proven to not always be true.
Changing this to simply an optimization and no longer "if and only if".

Change-Id: I46f228933df65a86c2c525a48f11b18397b7c48c
Fixes: https://github.com/dart-lang/sdk/issues/38818
Fixes: https://github.com/dart-lang/sdk/issues/42326
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151325
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-06-16 21:20:01 +00:00
Ryan Macnak
62893f9b00 Reland "[vm] Check prefix.loadLibrary is called and returns before prefix members are used."
This reverts commit 9a87cf9174.

Reason for revert: Broken test disabled

Original change's description:
> Revert "[vm] Check prefix.loadLibrary is called and returns before prefix members are used."
> 
> This reverts commit b0484ecbde.
> 
> Reason for revert: timeouts on Flutter integration tests
> (https://github.com/dart-lang/sdk/issues/42350).
> 
> Original change's description:
> > [vm] Check prefix.loadLibrary is called and returns before prefix members are used.
> > 
> > Restore checks against reloading a library with deferred prefixes.
> > 
> > No loading is actually deferred.
> > 
> > Bug: https://github.com/dart-lang/sdk/issues/26878
> > Bug: https://github.com/dart-lang/sdk/issues/41974
> > Change-Id: Iec2662de117453d596cca28dd9481a9751091ce9
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149613
> > Commit-Queue: Ryan Macnak <rmacnak@google.com>
> > Reviewed-by: Alexander Markov <alexmarkov@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> 
> TBR=rmacnak@google.com,alexmarkov@google.com,asiva@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: https://github.com/dart-lang/sdk/issues/26878, https://github.com/dart-lang/sdk/issues/41974
> Change-Id: I78709650e91d206b84a8ddd9171ef66d6cf1b008
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151169
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,asiva@google.com

# Not skipping CQ checks because this is a reland.

Bug: https://github.com/dart-lang/sdk/issues/26878, https://github.com/dart-lang/sdk/issues/41974
Change-Id: Ife76bd51db65ca58e08655a9b8406c8ca483447f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151326
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-06-16 21:11:40 +00:00
Paul Berry
ed9112e862 Sort declarations in api_test.dart
Change-Id: Ibe2b078f6a38a79d304ad81b1625c72a65fe53c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151320
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-16 21:10:11 +00:00
Paul Berry
a9bb706ce2 Migration: allow the client to specify which files to analyze/migrate.
Change-Id: Ie49f003640342a8c0d26b4f509a9268200955dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151302
Reviewed-by: Janice Collins <jcollins@google.com>
2020-06-16 21:10:11 +00:00
Jaime Wren
651464c909 Implement the rest of the ArgumentList ASTNode logic in the context type visitor in feature_computer.dart, tests added in feature_computer_test.dart
Change-Id: I35afea21912a785af427afb317cbff532c29d717
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151364
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-16 20:51:21 +00:00
Brian Wilkerson
c7d9fa996b Clean up some unnecessary code in completion manager
Change-Id: Ifdbe46f12b82a521aa079db87fd8c1aba9dd165b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151424
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-16 20:41:01 +00:00
Mike Fairhurst
e11eb2cd08 [nnbd_migration] Fix #42263, tool inserting ! on toString/hashCode
Fixed: 42263
Change-Id: Ia4c6d3543bc7628c76b85d986b9709de58925884
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151441
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-16 20:21:31 +00:00
Konstantin Shcheglov
021a49e88c Update the way to get feature set and language version.
https://github.com/dart-lang/sdk/issues/42274
https://github.com/dart-lang/sdk/issues/42321

Change-Id: I5551ecd2803f9d26e720e5cf5671b3be8236bce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-16 19:05:43 +00:00
Paul Berry
d1638508c1 Migration: streamline behavior injection in migration_cli_test.dart.
We now store both environmentVariables and injectArtificialException
in the _MigrationCliTestBase class, and refer to them wherever they
are needed, so we reduce the amount of plumbing we need to do.

In a follow up CL I'll be adding more behavior injection using the
same technique.

Change-Id: Ib736373f7a92a46922964d3c5c59d35bf72d618a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151300
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-16 17:52:10 +00:00
Brian Wilkerson
6d4e7d6830 Fix an exception thrown when a method cannot be resolved because the target type is dynamic
Change-Id: I0479305057a2f763f68aa61c860ab9785d2ca1b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151420
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-16 17:38:30 +00:00
Johnni Winther
7fce125300 [cfe,kernel] Add AstPrinter
This CL adds a Node.toText method together with an AstPrinter. These
facility and better toString implementation on AST nodes while allowing
for toString independent printing of AST to use in testing. This also
add support for an integrated toString of custom/internal nodes.

Some work is still needed in bringing the toString implementation on
all nodes to the old quality, and not all internal nodes have
customized textual representations yet. This work is left for future
CLs.

Change-Id: Ib0bf8a0bc02f489dfacdc8aa5f96da9c52f26058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150923
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-06-16 17:15:10 +00:00
Alexander Thomas
b2d41ab0a2 [infra] Update checked-in SDKs to 2.9.0-16.0.dev
https://github.com/dart-lang/sdk/issues/42274

Change-Id: I3a566f14482de29e9aa499d8a8e7c4281c30fbd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151391
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-16 16:51:20 +00:00
Danny Tuppeny
25f2f7796a Send LSP outlines for all open files
Change-Id: Icd785376c54965c53bd4ea0cf89ede74a4287981
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151390
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-06-16 16:21:50 +00:00
Kevin Moore
e1d1adce17 pkg:native_stack_trace - fix sdk version range
Change-Id: I15632e69ecefb9644b2d2e04f6d5096744ad687d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151422
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-06-16 16:06:37 +00:00
Sam Rawlins
efcb8f9213 Migrator: Do not connect return values to return types on generators
Fixes https://github.com/dart-lang/sdk/issues/42299

Change-Id: I07b3955907efa3007ec146f4cb4170b117b58dcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151328
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-16 14:08:54 +00:00
Sam Rawlins
61184814e2 Migrator: use dart pub to check outdated
Fixes #42343

This also prevents a crash if the binary-to-execute could not be found.

Change-Id: I19dd9f6dcbb41a5c8b4ef2a04a87c1fc83429120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151327
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-16 14:08:04 +00:00
sgrekhov
1a2cbd54d7 [co19] Enable migrated Language/Classes tests
Change-Id: I49ee2549b38cdd019131a3f32da0cfbe5b2db769
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151237
Commit-Queue: Sergey Grekhov <sgrekhov@unipro.ru>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-16 13:45:14 +00:00
Tess Strickland
6f83a5ff9b [vm/aot] Add a GNU build ID to direct-to-ELF snapshots.
For proper crashpad integration, we need to generate a build ID, as the
build ID generated by crashpad if there is not one will be a simple XOR
of the first text page, which rarely changes for Dart snapshots.
Assembly snapshots already have a build ID included by the assembler, so
we currently only do this for ELF snapshots.

Currently the build ID is a 128-bit hash value that is four separate
32-bit hash values concatenated together. Those hash values come from
the contents of the VM and isolate .text and .rodata sections.

This change also contains work to separate out the concepts of sections
and segments in the ELF builder. Now, consecutive allocated sections
with the same write and execute flags are combined into a single PT_LOAD
segment when possible, which reduces the padding needed to ensure that
segments start on page boundaries in ELF snapshots.

Bug: https://github.com/dart-lang/sdk/issues/42020
Change-Id: I42a837dae665a3902d881b8d151b49ede87d6c67
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150625
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-16 12:46:24 +00:00
Tess Strickland
2e939f215a [vm/aot] Move ELF section manipulation out of CreateAppAOTSnapshotAsElf.
Instead, we just always add a BSS section and we add the ROData
sections for ELF snapshots in BlobImageWriter::WriteText() (similar
to how AssemblyImageWriter::WriteText() handles it for assembly).

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: I87ce64037821ce10f2344964e7f379376c4538df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150937
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-16 12:46:24 +00:00