Commit graph

74602 commits

Author SHA1 Message Date
Alexander Aprelev ea43e6e267 [build] Make clang-cl targeting ia32 to be goma-compatible.
Stack-alignment flags are not supported by clang-cl, warning messages produced by clang-cl throw off gomas compiler version detection.

Change-Id: I259ed57e72f6c26eb1f01ac2c6dd49ec2e90978c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157100
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-08-04 21:25:39 +00:00
Konstantin Shcheglov ebd5b622ba Add DartSdk.languageVersion
Bug: https://github.com/dart-lang/build/issues/2763#issuecomment-666707445
Change-Id: I8232bd395abc9efea0e5c27716450d6a5442b3bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156489
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-04 21:01:09 +00:00
Vyacheslav Egorov a99edb8ac5 [vm_snapshot_analysis] Fix treemap construction
Do not include package nodes names into path when building treemap from
ProgramInfo. Library names already contain full package name.

Fixes #42907

Fixed: 42907

Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I91c4fc73edb3b345dfcc485e418d50b2ec5f4fe7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156910
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2020-08-04 20:39:38 +00:00
Konstantin Shcheglov 8c5af18cf0 Prepare to publish analyzer 0.39.16.
Change-Id: Ib20a70a7541cf037cce7b648f50a791ffacf08e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157006
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-04 19:29:08 +00:00
Ryan Macnak 9cb5d8e5be [standalone] Fix Isolate.spawnUri to work with AOT snapshots.
Fixes missing initialization of dart:_builtin during AOT.

Change-Id: If9f24f3658b91f490fc8215f2e9343bd437b2744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156050
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-08-04 19:00:18 +00:00
pq e41b4c1357 bulk fix for prefer_is_not_empty
Change-Id: I9188d344f03823d4ab2d7eb46f134910d271e527
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-04 18:24:49 +00:00
Ryan Macnak d8c5f19e01 [vm] Remove hard-coded prohibition of using Isolate.spawnUri with AOT.
This was originally added to prevent fork bombs in our test suite. Early versions of AOT for the standalone VM loaded the AOT program based on LD_LIBRARY_PATH instead of the command line arguments, so tests the tried to spawn a second script spawned themselves. The VM snapshot has since also been changed to be the same for every app, and some embedders already load multiple apps into the same process using the C API.

Embedders can still block any Isolate.spawn or spawnUri in the C callbacks if they don't want to implement loading for secondary isolates.

Change-Id: I4a4beda2a797ce26367350298eaafd7e53256b3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152592
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-08-04 18:15:49 +00:00
Martin Kustermann 34ad270abd [vm] Align linux/android timeline implementation: Add support for async begin/end to linux, make android use correct trace_marker (with fallback)
Change-Id: Id35ebf56480beab68e5604d6c87b3a499d71bdf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156904
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-08-04 17:19:19 +00:00
pq af8767e9c8 bulk fix for prefer_is_empty
Change-Id: I5c4cdb5b87ccbab8e257a45c33fe78d2d41923e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-04 17:17:19 +00:00
Nicholas Shahan 5c141df638 [ddc] Add self reference to ddb bootstrap scripts
Fixes the JS interop tests/benchmarks that expect the global
window.self to exist when running in d8 or node.

Change-Id: Id3eed6cdffb97560d61781e11d97d63edf74232d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156782
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-08-04 17:00:59 +00:00
Ryan Macnak 7fbc4411c4 [vm, reload] Don't zap the size table while concurrent sweeping may read it.
Bug: https://github.com/dart-lang/sdk/issues/42899
Bug: https://github.com/dart-lang/sdk/issues/42901
Change-Id: I995be7218fbf1dace53c3d11ee58653dccb14a73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157001
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-08-04 16:55:09 +00:00
Alexander Thomas 4d16efc562 [co19] Roll co19 to a9bd47e85862b4af9006c24ea0cb626850bc5de7
2020-08-04 sgrekhov@unipro.ru Accidentally added code removed
2020-08-04 sgrekhov@unipro.ru LibTest/core tests fixed to not to fail on tryjobs

Change-Id: I6612e405c98200b0243c900e91601d9b8cc20eb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156905
Reviewed-by: William Hesse <whesse@google.com>
2020-08-04 10:30:22 +00:00
Jacob MacDonald ed3584b71b add remaining flutter test dependencies to the allow list
Change-Id: I00b249feff6ae49f9c9eee841bdf937da7591b9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156942
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-08-04 04:09:13 +00:00
Mayank Patke d5d223944e Run tests/dart2js on chrome instead of d8.
Change-Id: I331159ecec09919fe7c452ad3333bd54ed3d6afc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156924
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-08-04 03:38:53 +00:00
Ben Konyi 54546e2681 [ Observatory ] Remove unused analytics codes
Change-Id: I6aba9a0fbf06fd575da280864c2c856ac361c691
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157002
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-04 02:38:43 +00:00
pq bd65d441f5 bulk fix for prefer_conditional_assignment
Change-Id: I45e979bc00da0d8a5a8a257ce0fbd484137c143d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-04 02:01:13 +00:00
Brian Wilkerson 0a19e8dbfe Add test requested in earlier CL
Change-Id: I112004e06150ed913d64b77f272a4ae85c6ef61a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156926
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-03 23:53:23 +00:00
Ben Konyi d3945b56f7 [ Service ] Fix issue where VM would hang in ServiceIsolate::Shutdown if
shutdown immediately after starting up

Running the VM with arguments that cause a quick failure _after_ the
service isolate is started could result in the VM service starting and
attempting to register a signal handler after the VM has started
shutting down. The open port held by the signal handler prevented the
message handler from shutting down, resulting in the main thread being
blocked on a monitor in ServiceIsolate::Shutdown.

Could be reproduced with the following commands:

$ rm out/DebugX64/dartdev.dart.snapshot
$ out/DebugX64/dart --observe hello_world.dart

Change-Id: I70ddff73c98151bd7eff22064a23f897b4d6299f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156923
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-03 23:24:42 +00:00
Srujan Gaddam 7bb0d1f39a [package:js] Add error for params in factories of anon classes
Adds a static error to check that factory constructors in anonymous
classes contain no positional parameters.

Change-Id: Iae7c5c1d9e2dc91390c85c58eb5e96718e808f9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156145
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-08-03 23:20:42 +00:00
pq 43c68d782d bulk fix for prefer_adjacent_string_concatenation
Change-Id: I873d3531307a9685dc0950aa2fc2119af5abdd0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156925
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-03 22:40:07 +00:00
Liam Appelbe 3ec7ea15ec [vm] Fix some Fuchsia tests
Change-Id: I2a6bedeee059bd461cbc00cc5d13df2bdf3154a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156702
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-08-03 22:24:28 +00:00
Ben Konyi 6a66061703 [ Service ] Add getWebSocketTarget RPC to allow for Observatory to
connect to DDS without relying on a redirect.

Some WebSocket implementations (particularly dart:html's) don't follow
redirects and don't provide the user with the message returned by the
server.

This CL adds 'getWebSocketTarget' as an RPC which returns the
URI that should be used by the client to connect directly to the proper
web socket target. In addition, the "implicit-redirect" forwarding has
been removed.

Change-Id: Iaf88c965f6fedfa6f63c28a08860a3c80388797c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156485
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-03 22:06:41 +00:00
Brian Wilkerson 536b466be3 Add tests for unused_element for mixins
I also renamed a couple of existing tests, but the two tests for
detecting unused mixins are the only substantive changes.

Change-Id: I29001c9c1782395cd2824af6f8a25696e387bd3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-03 21:34:22 +00:00
Konstantin Shcheglov 7723fbb46d Don't report DEAD_CODE hint for all required switch/case statements when legacy.
Bug: https://buganizer.corp.google.com/issues/162213706
Change-Id: I2ad6807194a974e6dc40f5f1cdd17f23196371a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-03 21:11:02 +00:00
pq 2bf777ea6e bulk fix for omit_local_variable_types
Change-Id: I1cc6eb6c7423ded3c5694728271cec52341ff98a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-03 20:59:31 +00:00
pq 987c9e347c bulk fix for null_closures
Change-Id: I20e57da5b95868551216b9b0a095e82116c3585e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-03 19:14:22 +00:00
Brian Wilkerson ac79402072 remove-duplicate-case should not remove statements if there are cases that fall through to them
Change-Id: I2094335d06e62eeb184f78b14e6028fdb5341dba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156849
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-03 18:50:21 +00:00
Nicholas Shahan 40b880ee61 [ddc] Fix import names in ddb script
Some benchmarks are located in directories named with characters
that are invalid in js identifiers. To generate bootstrapping that
loads these modules import the module builder and use the same
naming method that ddc uses.

These names are directly tied to the version of ddc that produces
them. This solidifies the fact that we really can't rely on using
the ddb script to run ddc from a different commit/build.

Change-Id: I92349d70134886de63686d88f5eab9da12b4021f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156820
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-08-03 18:38:01 +00:00
pq d427ab510d bulk fix for no_duplicate_case_values
Change-Id: I4925113c44d5042062ccaabea680a07eedf7bfdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156848
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-03 18:11:51 +00:00
Ryan Macnak 6b9b934d84 [vm, gc] Reduce growth rate as the heap size approaches --old_gen_heap_size.
Normally the heap grows in steps proportional to the size of the heap, so it grows faster the closer it gets to memory exhaustion.

The closer the heap size approaches --old_gen_heap_size, the less the heap will grow between GCs. This is useful on systems that respond to low memory conditions by killing processes instead of failing allocations. It is expected the asymptote will be chosen as some fraction of memory available from the OS (hundreds of MB on mobile).

Change-Id: I65cb4ab833e7a965595642312ce551719c0ade50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151635
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-08-03 17:47:11 +00:00
jlcontreras 0f0e04ec3a Add empty value class transformer.
Change-Id: I8e532c1699785ed75c7eff7a3187a4ca3a2032e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156880
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Javier López-Contreras <jlcontreras@google.com>
2020-08-03 14:14:42 +00:00
Johnni Winther 25e08663ce [cfe] Pass return type as part of callee type for invocation inference
Change-Id: I3b2f54fe73cc7f7c427e51e20cb60b25fc45f6bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156885
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-08-03 14:12:51 +00:00
Alexander Thomas 56ba486709 [co19] Roll co19 to e3d6ccfe8fa278041316f7dc958fdd8c2b447b6c
2020-08-03 sgrekhov@unipro.ru LibTest/core tests fixed after tryjob attempt
2020-08-03 irina.arkhipets@gmail.com Fixes 879: LibTest\typed_data\Float64x2 tests adopted for null safety.
2020-08-03 irina.arkhipets@gmail.com Fixes 878: LibTest\typed_data\Float64List tests adopted for null safety.

Change-Id: I12e86b1b3a8972797264f9142b0601ff44ccdcc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156886
Reviewed-by: William Hesse <whesse@google.com>
2020-08-03 13:36:48 +00:00
Johnni Winther ad9c73cb32 [cfe] Use promoted type as type context in variable assignment
Closes #41698

Change-Id: Iea87c770b560f6f72f9382f06615d99ad2be0c3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155764
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-08-03 10:37:41 +00:00
Sam Rawlins c59cdee365 Analyzer: Move COULD_NOT_INFER tests out of inferred_type_test
Change-Id: I4470617c23b8e4a08370c1da66f945719e58f7a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-03 04:42:43 +00:00
Sam Rawlins 2d98d25e71 Analyzer: Remove instantiateToBounds tests from inferred_type_test
The NOT_INSTANTIATED_BOUND error is thoroughly tested in
not_instantiated_bound_test.dart. The resynthesized elements are
thoroughly tested in resynthesize_common.dart, including
notSimplyBounded classes.

Change-Id: I0f2380133900149bbc5cdc2d996ed071601f2421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156844
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-02 21:12:12 +00:00
Konstantin Shcheglov 365525432a Issue 42788. Report MISSING_REQUIRED_ARGUMENT for 'call'.
Bug: https://github.com/dart-lang/sdk/issues/42788
Change-Id: Icece8f0e9865e659187d556c582929efcb7d242e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-02 19:44:23 +00:00
Christian Altamirano 352262e630 Added a wrapped abstract value domain strategy:
It will be used as a base for the upcoming powerset abstract value domain
Tests that do not depend on the detailes of the TypeMask abstract value will be fixed in a follow-up CL

Change-Id: I42398504d7c09a0b7c3b3d6b0682e1e813ea4d1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154520
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-02 18:39:43 +00:00
Sam Rawlins 7e6c55e3aa Move TopLevelInferenceTest off StrongTestHelper
Change-Id: I847de154a89e2bca1ca6e0028b7c4861ad9a0f23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-02 15:24:25 +00:00
Sam Rawlins d169af6f7d Analyzer: remove unnecessary this
Change-Id: I85a769e0c32159ac2a6422d3a60d160bda40d9b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-01 06:16:31 +00:00
Sam Rawlins ad5bcf16f1 Analyzer: remove unnecessary this in lib/src/summary,2
Change-Id: I110ffd76b1d04f83bbe08b79937c2ef6d02987a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156487
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-01 06:12:11 +00:00
Brian Wilkerson 4121cf3cb4 Add a quick fix to add a null check operator
Change-Id: Ie85ab236015057c2cb0255cc1548605e5b01e908
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156783
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-01 01:17:11 +00:00
Konstantin Shcheglov 28c20c0861 Fix for crash in ReplaceCascadeWithDot, simplify it.
R=brianwilkerson@google.com

Change-Id: I3243203e42856b6a4e65603aafb708473bdfe3fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156701
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-01 00:32:01 +00:00
Christian Altamirano 1d1a775620 [dart2js] Refactored readFromDataSource for TypeMask
This function only uses the CommonMasks and not the JClosedWorld.

Change-Id: I315da588612499324894dbecba7a7983de009ffb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156802
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-01 00:20:41 +00:00
Christian Altamirano 63fc596ee1 [dart2js] Tiny cleanup
Inside masks.dart using '_closedWorld.abstractValueDomain' is the same as using 'this'

Change-Id: I30384f6f542283bc770bbf2b0bebdbb12c3c0306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156800
Commit-Queue: Christian Altamirano <coam@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-07-31 23:29:00 +00:00
pq 5553dcbea7 bulk fix for hash_and_equals
Change-Id: Ifbca2871bbf90f8c1ea3e3ae6dd6ef9e8b5b00c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-07-31 22:28:20 +00:00
Ben Konyi 501c807266 [ VM / DartDev ] Update argument handling for 'run' command
Previously the help messages for 'dart run' were output by a secondary
VM spawned solely to print the VM's help message. However, this help
message was not consistent with those found for other DartDev commands.

With this change, the 'run' command:

- Uses package:args to create a help message consistent with other
 DartDev commands.

- No longer accepts arbitrary options and is instead restricted to a
 subset of common flags. Passing a VM flag which is not included in
 this subset of commands will result in an argument error if passed
 *after* the 'run' command. Other VM flags can be passed immediately
 following 'dart' and before the DartDev command.

- No longer outputs the VM verbose options when invoked with '--help
 --verbose'. VM verbose options and the original VM help message can
 be viewed by running 'dart --help --verbose'. This makes uncommon
 VM flags used for development less visible to regular users.

- Now properly forwards the subset of VM options accepted by 'run' to
 the VM (e.g., 'dart run --observe --no-pause-isolates-on-exit foo.dart'
 would have ignored '--no-pause-isolates-on-exit').

Change-Id: Ie56b767cc21e6af3630c742458a6c3e9f7418250
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155841
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-07-31 21:41:10 +00:00
Nate Bosch f885727a85 Remove references to cps_ir
The string `cps_ir` does not show up anywhere else in the SDK repo,
there are no references to or usages of this argument.

Change-Id: Ife5136393cfc026a88aef7b9e00de3e7ad9b13a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156688
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-07-31 21:34:40 +00:00
Zichang Guo d6d37ed203 Prevent VM crashing from \\?\ prefixed path
"\\?\" prefixed path is not properly supported. Arguments historically
were parsed as a Uri, which converted backward slashes into slashes. It
used to work because Win API is able to handle slashes as separators.
But "\\?\" has a special meaning and should not be changed. '?' is also
invalid char in the URI. So it leads to a crash.

The best solution is to avoid using URI to parse the path. This cl is a
workaround for crashing.

Bug: https://github.com/dart-lang/sdk/issues/42779
Change-Id: I13bcefc820eb578a2707181080eac9c0f1592e4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156364
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-07-31 21:09:40 +00:00
William Hesse 033a81d924 [build] Add dependencies to the strong summary generation
Change-Id: If3615f95ad60f5b33250bd0387fb35141cff0bee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156687
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2020-07-31 20:49:29 +00:00