Commit graph

79985 commits

Author SHA1 Message Date
Konstantin Shcheglov df8ad69405 Store staticInvokeType and typeArgumentTypes.
We set them during linking, so for consistency and to keep the same
expectations for linking and loaded elements tests, we need to
store and read them.

Change-Id: I8de88e2dbf4e08eee2d654b27f7cb548ffb7f1be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202161
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-03 03:58:14 +00:00
Stephen Adams 09b75a3d53 [benchmarks] Add benchmark to measure dart2js string pool cost
Change-Id: I15099af08526444c2e01da46b9939f2435547c90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201981
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-06-03 03:11:44 +00:00
Konstantin Shcheglov 2c22f0db29 Don't set isFinal for synthetic properties in ElementBuilder, set isStatic.
Similar to https://dart-review.googlesource.com/c/sdk/+/201780

Change-Id: Ie82aae2ae88a6947ef57a73aae76a99a2bae85e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 01:52:24 +00:00
Konstantin Shcheglov a25d211666 Detach nodes referenced by elements from original units.
This is a necessary step to keep linking elements without loading
from bytes.

Change-Id: I7bc8bdc0b10e178ab46d15e288a76eb3d732891f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 01:42:14 +00:00
Robert Nystrom 0a3b4fca3e Rename some more incorrectly named tests.
Change-Id: Ia15c2accc2e5b192834bbd37bbd6a720bf52a3f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201224
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-06-03 00:49:54 +00:00
Robert Nystrom e376bcd30f Rename "string/overflow.dart" -> "string/overflow_test.dart".
Change-Id: I32fa46c5750ee6d2410231322bf16fa7decb751d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201227
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-06-03 00:40:24 +00:00
Mark Zhou b72588aa3e [dart2js] Extending pkg/js_ast to support arrow functions and methods.
* Adds a couple of arrow function and method tests
* Does not add support for method interpolation (like in DDC).

Change-Id: I73ccbbf2907611dae6f1720f7933e3469d4eb9b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198883
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-03 00:15:04 +00:00
Mayank Patke 93c96d5857 [dart2js] Implement basic lowering for late instance variables.
This feature is gated behind the --experiment-late-instance-variables
flag.

Change-Id: I1ecb2d4d960b58204207ea055361463efa3a0bcb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200922
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-02 23:21:24 +00:00
Mayank Patke 7cdb6444f2 Add language tests for some late instance variable corner cases.
Change-Id: Ic269846684201bebab74ae83d269753fa40626f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200921
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-02 23:21:24 +00:00
Kevin Moore 1664e310d5 pkg:wasm - use pkg:lints lints
- enable and fix other lints as well
- Split up generated code into part file - less boilerplate
- Clean up exception checks

Change-Id: I6d8e0753b496356e3c001b9d0b902131d7d03c20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202142
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2021-06-02 23:15:10 +00:00
Kevin Moore e096e24a33 wasm: add TODO around wasi test failing on mac
RE https://github.com/dart-lang/sdk/issues/46222

Change-Id: Ic7a2cffc73ef0b2adfe20086422665012cb368d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202143
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-06-02 23:09:46 +00:00
Ryan Macnak a10e038f09 [vm] Remove Script::compile_time_constants_.
Dead since 5cce1e4acd.

TEST=ci
Change-Id: If55de08b753e5948785187e455ac793356d1e794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202066
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-06-02 22:50:14 +00:00
Brian Wilkerson cf5a9c4250 Suggest functions with a void return type in an expression function body when the parent closure returns void
Change-Id: I1cedcba4a486c886a5670283c988f66887199213
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202141
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-02 22:44:44 +00:00
Ben Konyi fa5da6a944 [ VM / Service ] Move sourceLocation property to reference objects for Class, Function, and Field.
Token position and script reference information are cheap to provide and
make it possible to tie objects to scripts without requiring additional
requests for full objects.

TEST=Existing

Change-Id: I917714149a72a53081fee5626ccad858e86f5313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201864
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-06-02 22:18:32 +00:00
Konstantin Shcheglov 40856c14c1 Remove most trailing spaces in analysis_server/
Change-Id: Ib03564c09af974b74be893ea2d6fdf1f6669d99b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-02 21:50:24 +00:00
Stephen Adams d3d6c86fe1 [dart2js] Migrate shared libraries to 2.12
Change-Id: I5600fe01e90963b56a6ffa36ec9edf0096088b2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202000
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-06-02 21:41:34 +00:00
Kevin Moore d8ac73aab2 pkg:wasm - add static analysis to test_matrix
- disallow implicit casts
- move generation code to `tool` directory (as is convention)
- rename template files so they are not analyzed
- deleted test/test_all.dart (not needed)

Change-Id: Ie319dfbb34dc662a346b4145dff0ef1213dcebc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202140
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2021-06-02 21:37:50 +00:00
Konstantin Shcheglov ac75a62e8e Support inherited context type for constant initializers.
Change-Id: I8a6221bffd47ace94b5113441e1c9493d4d91397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-02 21:26:21 +00:00
Kevin Moore 4d607fd3b7 wasm: example readme cleanup
Change-Id: I7b525571abaa0c510863d70540dfcfb29c90d357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202102
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-06-02 20:41:40 +00:00
Liam Appelbe 11271f477a [wasm]: Remove unnecessary linker flags
Bug: https://github.com/dart-lang/sdk/issues/46212
Change-Id: I2bfc911022b1c7fa5e9719db0cbb0fe03ec31483
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202101
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-06-02 20:27:35 +00:00
Joshua Litt 92bfa5acfb Reland "[dart2js] Only emit holders into a part file if they are used."
This is a reland of 7af28d8274

Original change's description:
> [dart2js] Only emit holders into a part file if they are used.
>
> Change-Id: Ie1eb4dcf71e30002e3030603f201e2b6a97d4182
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200483
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>

Change-Id: I06966217925a7d17615c80a5534d58f5095e579b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201985
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-06-02 20:15:25 +00:00
Devon Carew 154b217822 [pkg/dartdev] support analyzing multiple directories
Bug: https://github.com/dart-lang/sdk/issues/45352
Change-Id: I9ffdf1d56ea52fd17ff8e9ce936ee82f108d7b61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202065
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-02 20:11:24 +00:00
Kevin Moore f14f0798ee pkg:wasm: More cleanup, with latest pedantic lints, etc
Change-Id: Iecc762814a06a6e76d5f8d3fb099598a6bff9d74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201987
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2021-06-02 20:07:23 +00:00
Brian Wilkerson 095385c8c9 Fix the version number in the message about the availability of Never
Change-Id: I0b947240ba8b84e810fed61c238d1837ae4b8597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202067
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-02 19:50:04 +00:00
Stephen Adams 8d8ade4945 [dart2js] Migrate Maplet
Change-Id: I4bb859b9da634ceefffbd2d3ada0bf51fdeb67ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202001
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-06-02 19:23:34 +00:00
Brian Wilkerson 4aef907927 Suggest void and other keywords inside the first token of a parameter declaration
We suggest user-defined identifier anywhere inside the first token, so I
think we should be consistent and suggest keywords there as well. As a
bonus, this will increase the accuracy of our completion metrics.

Change-Id: I88daf6b3b047ccfacd06cf25184d8bbbf42c682b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-02 18:38:44 +00:00
Danny Tuppeny a50c12093e [dds] Support running scripts with DAP in debug mode
This starts the app paused, connects t the VM service and resumes. It handles dart:developer log() events, but no other debugging functionality yet (for ex. breakpoints, stepping).

Change-Id: Ib50680c775da5d13df95771eec62e77a4af75a08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201566
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-02 18:28:55 +00:00
Danny Tuppeny 0374c8f720 [dds] Add support for running DAP integration tests with an out-of-process server
Change-Id: Iffa9154951a6e5e4dc1fad783f8710dad5f1a5a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201563
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-02 18:17:13 +00:00
Tess Strickland a205935d9a [vm/compiler] Treat allocations generically in redundancy eliminator.
Instead of explicitly listing certain subclasses in some places, instead
allow any AllocationInstr subclass and just reject certain subclasses if
necessary.

Code size different in Flutter gallery (release-sizeopt):
* ARM7: Total -0.12%, instructions -0.14%, readonly -0.11%
* ARM8: Total -0.12%, instructions -0.15%, readonly -0.09%

TEST=Current test suite.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64c-try
Change-Id: I4ce42d7185d4b3a83356e5131a5835fa858c4882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201832
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-02 18:10:38 +00:00
Tess Strickland faa1c9ff98 [vm] Move context setting into AllocateClosure stub.
With this change, allocation instructions can now be direct inputs to
other allocation instructions, so the redundancy eliminator is extended
to handle this possibility.

Methods for working with instruction input-related slots are added to
subclasses of AllocationInstr, so that the redundancy eliminator can be
written more generically in places, instead of needing to add cases for
new allocation instructions and/or instruction inputs.

Code size different in Flutter gallery (release-sizeopt):
* ARM7: Total -0.30%, instructions -0.41%
* ARM8: Total -0.31%, instructions -0.47%

TEST=Current test suite.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64c-try
Change-Id: Idc1aa2a1cb8c0c62f0bcb64aee89a7525dd3d1e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198406
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-02 18:10:38 +00:00
Ryan Macnak 6b39b1c07f [vm] Remove script offsets.
The frontend is no longer capable of handling embedded scripts.

TEST=ci
Change-Id: Iea8bb45e701f29648ec2fe15f6be68c4561a6933
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201980
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-02 18:02:37 +00:00
Paul Berry 40a1ae7fc0 Add parser support for use of new as a constructor name.
The new "constructor tearoffs" feature includes the ability to use the
`new` keyword in a place where an identifier is expected, and that
identifier could denote a constructor name.  We handle this by
replacing the `new` keyword token with an identifier token whose
identifier string is `new` (this should ease the burden on the
implementations, since they are already set up to handle constructor
names that are identifiers).

Since all such situations follow a `.`, and `new` was never previously
allowed after a `.`, the parser treats `new` as an identifier in any
situation where it could possibly refer to a constructor, regardless
of whether the "constructor tearoffs" feature is enabled.  (This
should allow for easier error recovery in the situation where the user
tries to use the feature with a language feature that does not support
it).  It is up to the client to report an error if the feature is
disabled.

In this CL, I've implemented logic for the analyzer to choose whether
to report an error based on whether the feature is enabled.  I've
implemented logic for the CFE to report the error unconditionally.

Bug: https://github.com/dart-lang/sdk/issues/46020, https://github.com/dart-lang/sdk/issues/46044
Change-Id: I36a496688400d2d9f699dd42be4d0ba620cda244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201961
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-02 18:02:35 +00:00
Brian Wilkerson dbdde949e0 Suggest Never when types are appropriate
This also fixes a bug in the completion metrics that I found while
adding the suggestion. The bug happens when an experiment causes a kind
of completion to be produced that wasn't produced before.

Change-Id: I244ae41161a9ff607c18273d0744f3cf27eb5caa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-02 17:46:22 +00:00
Devon Carew bfa01e5dd1 [pkg/dartdev] pass in client id for dart cli analysis server usages
Change-Id: If35edb33a26fdc5640577b3c7b95805a020f04a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202060
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-02 17:13:03 +00:00
Simon Binder be893fdf27 [vm/ffi] Add providesSymbol to DynamicLibrary
This adds the providesSymbol method to DynamicLibrary. It returns
whether the library contains a function with the given name.

As per dlsym(3), it is valid for dlsym to return nullptr in a success
case if the symbol actually has a NULL value. So I've changed the logic
to check for dlerror() after we invoke dlsym(), both in the existing
lookup and in the new method.

Closes https://github.com/dart-lang/sdk/issues/46192

TEST=tests/ffi(_2)/has_symbol_test.dart

Change-Id: Ibcb1c051cc0cdd95a104fe86ef2fc76da5bafb5d
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-win-debug-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201900
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-06-02 16:01:43 +00:00
Alexander Thomas 997487db0f [testing] Fix line numbers in dwarf_stack_trace_test.dart
The test contained hardcoded line numbers that changed when the language
version comment was added[1].

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

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try
Change-Id: I2fda2b013a8ac3ee71dd98a6c243c00a5aeae823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202040
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-06-02 09:54:25 +00:00
Alexander Thomas b50889e739 [sdk] Update checked-in SDKs to 2.13.1
* This adds a mac amd64 SDK as the arm64 SDK to bootstrap arm64
  development on macOS.

Change-Id: I519e5ad2343360bc2e692b52d95c94076bfd9e87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201833
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-06-02 09:29:45 +00:00
Alexander Thomas 7baeabe0e4 [testing] Rely on language versions in the analyzer tests
https://github.com/dart-lang/co19/issues/1090

TEST=Standard tryjobs, all changes are in test code only.

Change-Id: Ie73174447ab165827335652cf035f85b7510ab55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201564
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-02 07:47:46 +00:00
Konstantin Shcheglov 5e69aa3276 Build elements for GenericFunctionType and its parameters in annotations.
Bug: https://github.com/dart-lang/sdk/issues/46201
Change-Id: I6256984e1eda58e067e03d3090b1531cd15eaa0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201940
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-02 06:32:35 +00:00
Stephen Adams acf463616e Redo again "[dart2js/js_ast] Escape strings in the printer"
Patchset 1 is original change.

Change-Id: I19832574012af4a81f6d32c8ea46b196b6f306a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201101
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-06-02 02:05:05 +00:00
Robert Nystrom 6fd24ef3c4 Show analysis errors when a non-static error analyzer test fails.
There are two ways the test runner might want to parse and show errors
from analyzer:

1. When a static error test's output doesn't match the expected errors.
2. When a normal runtime test produces unexpected errors.

The former were correctly migrated over to parse and read the analyzer's
JSON output. The latter wasn't. It was still trying to parse the old
"|"-separated machine format.

Worse, when migrating to the new JSON output, a try-catch-block was
added to handle any unexpected errors. That had the unintended side
effect of silently catching this parse error and then continuing. The
end result is that if an analyzer test failed on a normal runtime test,
the test runner didn't print any of the analyzer errors. :(

This fixes that. It uses a single code path to parse the JSON output to
AnalyzerError. Then, for static error tests, it converts those to
StaticErrors.

Change-Id: I51c1277f0ed04faead82f579d668f8897f379a49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201382
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-06-02 01:51:25 +00:00
Kevin Moore e453b4c64f Cleanup pkg:wasm
- Fix many lint warnings
- Cleanup readme
- Remove author from pubspec
- Increase length of pubspec description to follow guidlines
- Improve default experience for running bin/setup.dart on MacOS

Change-Id: I586716be06c48db3030c5076b5e65c8995cc6d27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201881
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2021-06-02 00:05:25 +00:00
Brian Wilkerson 25b71e07e7 Add a quick fix to import extensions when members are referenced
Change-Id: Ic7f85cecdc06e255264441db7add6bd4a9bda5d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-01 23:28:25 +00:00
Ryan Macnak b898375e27 [vm] Avoid races on Scavenger::to_.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/45810
Change-Id: If6a7063f66123cd38fc76db370364dbd608f93da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201982
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-01 23:22:25 +00:00
Joshua Litt 2a6af1f50e Revert "[dart2js] Only emit holders into a part file if they are used."
This reverts commit 7af28d8274.

Reason for revert: This breaks the angular goldens. This is a known breaking change, but because these tests are on the cbuild it breaks dart rolls into flutter. I will try and figure out a way to land this change less disruptively.

Original change's description:
> [dart2js] Only emit holders into a part file if they are used.
>
> Change-Id: Ie1eb4dcf71e30002e3030603f201e2b6a97d4182
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200483
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>

TBR=sra@google.com,joshualitt@google.com

Change-Id: I19ac272c7eafc1172370b39baf4c2c0ec6ead540
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201984
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-06-01 23:02:46 +00:00
Paul Berry b7c6ad117f Remove hack that builds FunctionExpressionInvocation with synthetic arguments.
Now that we have an AST and visitor support for the FunctionReference
structure (which represents `Expression<TypeArguments>` for various
kinds of expressions), we no longer need to error recover this as a
FunctionExpressionInvocation with synthetic arguments.  The resolver
still doesn't resolve the syntax properly, but that's ok because it's
not permitted in valid code (for now we just treat it as having type
`dynamic`).

Fixes #46150.

Change-Id: I357175cc16bcf2f9027be2e1da66bb6ca70a9400
Bug: https://github.com/dart-lang/sdk/issues/46020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199682
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-01 22:44:45 +00:00
Devon Carew 46b04e6c4a Analyze flutter/plugins as part of the flutter-analyze try bot.
Bug: https://github.com/dart-lang/sdk/issues/45873
Change-Id: I3d603ce31ca0fd5402cb359f376f810f78f21a5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201221
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-01 22:22:20 +00:00
Alexander Aprelev fe6bcb952f Update to the latest package:http.
This is needed as a pre-requisite for landing https://dart-review.googlesource.com/c/sdk/+/194881

Change-Id: I64a8afa922baef4be64f815a0163f569aa1aa580
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201660
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-06-01 22:16:55 +00:00
Konstantin Shcheglov 935be5e1ab Remove trailing spaces in analyzer/
Change-Id: Ib4e78f839d08ba66d91f7e675257dfcb8cc5d34d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-01 22:14:15 +00:00
Parker Lougheed 666a72f7f2 Switch changelog entry for dart create lints package usage from the core to recommended set
The change was implemented in 2f85591b67

Change-Id: I60f93b307c81e65065e55193111253b6170d04c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201865
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-01 21:45:25 +00:00