Commit graph

73670 commits

Author SHA1 Message Date
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
Johnni Winther 261e283a0a [cfe] Handle explicit type parameter type nullability in bounds
Closes #42143

Change-Id: I05f181889481c48b183cef135f96dbf510ca788d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151381
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-06-16 12:28:04 +00:00
Martin Kustermann 21222b64c4 Revert "[vm] Build dart2native dependencies with the normal "create_sdk" target"
This reverts commit a88a328b7f.

Reason for revert: Auto roller hasn't rolled previous changes from
Dart yet. Those changes updated DEPS for icu/boringssl. We have to
wait with this CL until the DEPS changes have been done in the engine.

Original change's description:
> [vm] Build dart2native dependencies with the normal "create_sdk" target
> 
> 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: I3e47664d9fadb9ed1ad033bb17d46e769442f741
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=kustermann@google.com,zra@google.com,athom@google.com,asiva@google.com

Change-Id: Ied0f2f5b58dceb2b59bc2ac6e11e5fd717c8885e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151382
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-16 10:41:27 +00:00
Johnni Winther f369194255 [cfe] Add test for extension on Never
Closes #42180

Change-Id: I690d3419d94bfc593f77f0cea75274cb20182ba2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151229
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-06-16 08:10:24 +00:00
Vyacheslav Egorov 967deb8db4 Revert "[vm, timeline] Fix compilation failed below macOS 10.14"
This reverts commit 156ef76535.

Reason for revert: broke compilation on buildbots

Original change's description:
> [vm, timeline] Fix compilation failed below macOS 10.14
> 
> signpost.h exists in macOS 10.14 or above, so compilation failed below macOS 10.14
> 
> Change-Id: I97c4d6652f8330d3fc150186e41067c80c3b56f2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151101
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,3630cn@sina.com

Change-Id: I04cd72a0c16a9e1d32d1735abf0fe42d35d240e1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151380
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-06-16 07:53:36 +00:00
pangzhen 156ef76535 [vm, timeline] Fix compilation failed below macOS 10.14
signpost.h exists in macOS 10.14 or above, so compilation failed below macOS 10.14

Change-Id: I97c4d6652f8330d3fc150186e41067c80c3b56f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151101
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-06-16 07:15:31 +00:00
Jaime Wren 6021f0aec2 Follow up on https://dart-review.googlesource.com/c/sdk/+/151343, assertOrder() now accepts the order with current.relevance > previous.relevance instead of current.relevance >= previous.relevance, additional tests use assertOrder([]).
Change-Id: I7f7c27d2e3205cc4b556e0fbb1b238a743d281ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151323
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-16 06:55:21 +00:00
pq c68c06996a prefer “exclude” language for excluded entities
See for example:

* https://9to5google.com/2020/06/12/google-android-chrome-blacklist-blocklist-more-inclusive/
* https://thenextweb.com/dd/2020/06/15/github-plans-to-replace-racially-insensitive-terms-like-master-and-whitelist/

Change-Id: Id40e8b20f8dcab6db291159c33db5197aedf9fae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151304
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-06-16 05:12:16 +00:00
Joshua Litt 09ea885dcd [testing] Rename dart2js filesets more generically.
Change-Id: I00b2cea7bad20837940334dadf1862b1511fd698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151342
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-16 01:20:26 +00:00
Joshua Litt 3798e5c2f0 [dart2js] Fix some compilation errors in dart2js/native.
Change-Id: Idb614189a31ceaeb53a9acb1f23f0ff3f46eb9c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150666
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-16 01:20:18 +00:00
Brian Wilkerson 0d3e77d28e Start converting assists to CorrectionProducer
Change-Id: Ie2d12ce8c15a75e8db71434d790c32a76a06b13e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151324
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-16 00:11:28 +00:00
Konstantin Shcheglov 7f6b0d82eb Issue 42337. Report BODY_MIGHT_COMPLETE_NORMALLY for factory constructors.
Bug: https://github.com/dart-lang/sdk/issues/42337
Change-Id: I9209d7bf519ec61026ffe22bb05145e776e8517d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-15 23:46:38 +00:00
Konstantin Shcheglov 18b753cbcd Support for null-aware ExtensionOverride.
Bug: https://github.com/dart-lang/sdk/issues/41780
Change-Id: Ib5d11000847434c679df1ec882ee6d9777670fe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151097
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-15 23:45:08 +00:00
George Wright d39d4d0d55 Revert "Add an --os=fuchsia option to build.py:"
This reverts commit 4ce18ab931.

Reason for revert: bad merge, caused build breakages in flutter/engine

Original change's description:
> Add an --os=fuchsia option to build.py:
> 
> tools/build.py --os=fuchsia runtime create_sdk
> 
> This is analogous to --os=android. It cross compiles from Linux x64 to
> Fuchsia.
> 
> A lot of the build rules are just slightly different between the existing
> Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
> example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
> So to support this I had to add a new variable, using_fuchsia_gn_sdk,
> analogous to using_fuchsia_sdk. Flutter will need to set this to false.
> 
> Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com,kaushikiska@google.com,matthewcarroll@google.com

Change-Id: If01ee34eba906c55f2d56ba650748a86e81e701c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151321
Auto-Submit: George Wright <wrightgeorge@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-06-15 23:01:53 +00:00
Jaime Wren 047f1721a1 Remove the DartCompletionManagerTest and replace it with CompletionRelevanceTest, making all of the completion relevance tests consistent.
Change-Id: I24d042b420a3c1d6f38b063913cb702c34858076
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151343
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-15 22:37:04 +00:00
Zichang Guo b65c90a07a [dart:io] Fix _connecting counting in HttpClient
Resolves comments in previous cl and fix a problem where _connecting
decrements twice.

Bug: https://github.com/dart-lang/sdk/issues/34477
Change-Id: Icf5a98f4cf9e3f6ca582fe69f41074d482e00f0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148841
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-15 22:24:02 +00:00
Brian Wilkerson bd3b3299cb Correct an abbreviation
Change-Id: I7424cd587c87f1256237de1cf913b9b0b31104f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151341
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-15 22:16:52 +00:00
Alexander Markov badc77239a [vm/aot] Avoid unbinding canonical names in AOT transformations
AOT transformations (mixin deduplication and TFA tree shaker) were
using CanonicalName.unbind() in order to make sure that kernel
writer will not be able to write dangling references to the deleted
classes or members (to detect such dangling references earlier).

This conflicts with lazy reading from a kernel file if --from-dill
option is used: lazy reader may read a reference to such class after
unbind() and it creates a new Reference object for such canonical name.
This causes crash later when the fresh Reference is used as it doesn't
have Class node filled in.

The solution is to avoid calling CanonicalName.unbind().
Instead, it is enough to nullify node.reference.canonicalName, which
won't break CanonicalName.reference used by lazy reader.

This crash can be reproduced on tests/language_2/vm/regress_flutter_55345_test.dart
if it is compiled in AOT mode using 2-step kernel generation.

Bug: b/158853113
Change-Id: Ib2004dbbbda85d9f56adc56b48882f4ef08869a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151120
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-15 22:00:42 +00:00
Zichang Guo 66cd5d9cc7 [dart:io] Update inaccurate comments of writeByteSync
Closes: https://github.com/dart-lang/sdk/issues/42298
Change-Id: Ide2a5318c185530368ae3ebded3c3c0fb86e8338
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151162
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-06-15 21:20:45 +00:00
Robert Nystrom 85f6c01fc4 Migrate language_2/subtyping_static to NNBD.
Change-Id: I94ea79417ae39f64f558d55489000d720c3191e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151092
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-15 20:53:55 +00:00
Konstantin Shcheglov f2fafcd440 Extract and reuse EnclosingExecutableContext.displayName
Change-Id: If411305b7484e59b234366b656d07d2235e6513d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151305
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-15 20:16:16 +00:00
Alexander Aprelev 48f20c64c6 [vm/benchmark] Fix metric type of GenKernelKernelMaxRSS benchmark
Change-Id: Id7d0cdea5536752217968e235d065ce9b0140443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151307
Auto-Submit: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-06-15 20:10:16 +00:00
Liam Appelbe 4ce18ab931 Add an --os=fuchsia option to build.py:
tools/build.py --os=fuchsia runtime create_sdk

This is analogous to --os=android. It cross compiles from Linux x64 to
Fuchsia.

A lot of the build rules are just slightly different between the existing
Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
So to support this I had to add a new variable, using_fuchsia_gn_sdk,
analogous to using_fuchsia_sdk. Flutter will need to set this to false.

Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-15 20:05:16 +00:00
Leaf Petersen d2543e32f4 Migrate standalone tests which rely on the pre-nnbd sdk libraries.
Migrate all the tests under standalone/ that include files under
sdk/sdk/ as part files to unblock the replacement of the unmigrated
sdk/sdk with the contents of the migrated sdk/sdk_nnbd.

Change-Id: Ia2e78bbff797f58244d94021d4b9616793bd641d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151036
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-15 19:41:46 +00:00
Alexander Markov 9a87cf9174 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>
2020-06-15 19:35:06 +00:00
pq 5619ec500e prefer “exclude” language for excluded entities
See for example:

* https://9to5google.com/2020/06/12/google-android-chrome-blacklist-blocklist-more-inclusive/
* https://thenextweb.com/dd/2020/06/15/github-plans-to-replace-racially-insensitive-terms-like-master-and-whitelist/


Change-Id: I51fe56bb7a09c5cc3280119e2c121aac86e44f8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151303
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-06-15 18:48:06 +00:00
Stephen Adams cf1681e11e [dart2js] Remove more unused old rti helpers
Change-Id: Icbc50554f2b3ae2cb74b32c9876c7c0cdf15c75b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150640
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-15 18:23:17 +00:00
Jaime Wren 920ddae937 Re-write of the computation of the context type for code completion.  Instead of passing a parent and child node, a parent node with an offset is passed.  The primary purpose of this change was to fix a bug with argument lists which is close to being fixed.
I will follow up with some additional fixes and tests for map and list literals.

Change-Id: I1a26e8f900dcf13402385a49e8f3538c5d1b39df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151030
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-15 18:19:42 +00:00
Sam Rawlins 459255ab09 Migrator: Fix navigating to top-of-file
There is logic to navigate to the top of a newly-loaded page. It
broke with a visual redesign, in which the title of a page is always
sitting at the top of the screen. The new logic will scroll the page
to the first line of source text.

Change-Id: I685d1fb96c6ca1789f114871acd2bb8148e6ae7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151032
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-15 18:15:12 +00:00