Commit graph

79971 commits

Author SHA1 Message Date
Ryan Macnak
815fc81d24 [vm] Remove Script::compile_time_constants_.
Dead since 5cce1e4acd.

TEST=ci
Change-Id: I50e8bc9eea9625120c5038b29deb6b2ee33dd6c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202306
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-06-04 17:34:31 +00:00
Konstantin Shcheglov
b13e2c4a51 Report HintCode.DEPRECATED_IMPLEMENTS_FUNCTION
Change-Id: I044ad8f2577870889fe8981fc0f47ca798960b31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202340
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-04 17:32:52 +00:00
Ryan Macnak
4d0fb34272 [vm, isolate] Run the service and kernel isolates on their groups' mutator pools.
This fixes idle GCs never running for the service and kernel isolates.

TEST=--verbose-gc
Change-Id: Iea0b0aa808c757a527724e3d2599c170cb383574
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202362
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-04 16:01:46 +00:00
Konstantin Shcheglov
1e445ada4f Remove deprecated ErrorCode.temporary2()
Change-Id: I9c37bedc2841a55e9e24a636e15dc3b9a18cc53b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-04 15:52:06 +00:00
Martin Kustermann
706965fd2c [gardening] Fix string_overflow_test.dart
The test was originally introduced in [0]. This restores its state to
how it was written back then with some small adjustements.

[0] d8ef2ae7 https://codereview.chromium.org//16783003

TEST=standalone{,_2}/string_overflow_test

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

Change-Id: I255f676481f2ab6e906ebfe4612d394c29663dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202482
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-04 14:38:16 +00:00
Alexander Aprelev
05e5427800 [io/mac] Ensure FSEventsWatcher::Node is deleted synchronously with Callback that uses it.
This is follow-up to ed82bb6f4c

TEST=tests/standalone/io/file_system_watcher_large_set_test.dart

Change-Id: If02c922eafe1371c6e67196158896b9cb786bfd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202312
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-04 14:26:36 +00:00
pq
63a77416b7 enable depend_on_referenced_packages
this is under consideration for core lint inclusion: https://github.com/dart-lang/lints/issues/42

(also undoubtably nice to get the early warning.)

Change-Id: I3ea204444f48d3b4bde3ff65b4ce85a2cf2a7b11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202301
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-04 14:19:08 +00:00
Jonas Finnemann Jensen
22080071e5 Bump pub.
New commits include:
```
git log --format="%C(auto) %h %s" 11c2a0978e66fbc2c182dc6a8174db1a3651276c..3c14d86a67db7207bbc9f654ac49ee60e08e5240
 3c14d86a Test cases with core.ignoreCase = true / false (#3025)
 937cd3be Fix CR LF in .gitignore / .pubignore (#3026)
 610254f7 Add test to ignore dot-files (#2983)
 c24d7478 Fixes linter warnings (#3021)
```

Change-Id: I49f0fc3a2360b0e1e4e009a4fff2a702163cd6b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202481
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-06-04 09:56:16 +00:00
Parker Lougheed
47e4b4f2d9 [dart2js] Migrate command line util
Also makes the following minor improvements:
- Standardizes the file on single quotes to make the file more uniform and match elsewhere.
- Switches the ESCAPE_MAPPING declaration to const
- Corrects method spelling in doc comment

Change-Id: Ic271cd28d287f321b9b3719250b053df548ba194
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202061
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-06-04 04:23:45 +00:00
Konstantin Shcheglov
51b78099da Clean up computing unlinked/elements/unresolved salt, use toUint32List().
Change-Id: Ib667dd3553edcf55afed0eaa9e6503556fe1e843
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202341
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-04 02:03:35 +00:00
Konstantin Shcheglov
0d579ac784 Resynthesize new Token instances, not shared static.
We will need separate instances to set offsets to them, when resynthesize
constant initializers and annotations.

See also https://buganizer.corp.google.com/issues/180549869

Change-Id: I04a7e8ff05c013aea7952b373a260b76f728a7e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202420
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-04 01:56:06 +00:00
Konstantin Shcheglov
e41d3ebe77 Merge getUnitKeyByPath() into getResolvedUnitKeyByPath().
Change-Id: I23e59dfe904b45ab7216379a6a021b7e53cb6a86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-04 01:51:35 +00:00
Sigmund Cherem
80160d3efb [dart:html] add syntax highlighting to code blocks
Change-Id: I7dc008c01e776be8010da4845b3dc95643e34194
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202401
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-06-04 01:07:35 +00:00
Konstantin Shcheglov
e2178cecfc Remove deprecated LintCodeWithUniqueName and SecurityLintCodeWithUniqueName.
These are not used by the latest linter, and are not API.
https://github.com/dart-lang/linter/pull/2675

Change-Id: I9877e01681c573dfff1bda1c8cd6424e7eff1f4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202320
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 23:11:25 +00:00
Ryan Macnak
bc3aa70e20 [vm, compiler] Fix size of sign-extension in x64c BigInt intrinsics.
TEST=ci
Change-Id: I99aa9875705823c22b5474bb1d66c7bc1aaac9fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202309
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-03 22:47:56 +00:00
Konstantin Shcheglov
e4aad3fc6c Issue 2694. Include pubspec.yaml content into the resolution salt.
Bug: https://github.com/dart-lang/linter/issues/2694
Change-Id: I239863703c70c6bd810be6847606e5fc6695073a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202265
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 22:34:45 +00:00
Konstantin Shcheglov
1b4d7ec7a3 Remove deprecated LinkInputLibrary.tmp1() and LinkInputUnit.tmp1()
Internal repository was updated.
https://critique-ng.corp.google.com/cl/377290044

Change-Id: I3586c895b89de8ed464d059a7318c98e3860e38d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202322
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 22:29:05 +00:00
Konstantin Shcheglov
1b70b94df9 Issue 46039. Restore FieldFormalParameterElement.hasImplicitType
This reverts commit 33231b3005.

The necessary fix landed into linter, and pulled into SDK and google3.
https://github.com/dart-lang/linter/pull/2674

Bug: https://github.com/dart-lang/sdk/issues/46039
Change-Id: I24a6fea41aa749c5fc7ffffc842d119d2a617658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202262
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 21:09:02 +00:00
Keerti Parthasarathy
e1f37f6029 Also return lineInfo and oldName from canRename
Change-Id: I5ae683cdfe3a82d8dea72745d77d8dcb435c0759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202280
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 20:49:42 +00:00
Ben Konyi
ffecb6d44c [ package:dds ] Update to package:vm_service ^7.0.0
Change-Id: I3a504f3006fccd1b86356380c07f6641bf1b27ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202305
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
2021-06-03 18:28:10 +00:00
Ryan Macnak
ad233e5ff1 [vm, profiler] Compact the representation of Samples.
TEST=ci
Change-Id: I6078479074b5681fad194d1457717878ecc0f6f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202063
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-06-03 18:23:07 +00:00
Kevin Moore
b9811285ac pkg:wasm - have setup.dart output to the current package directory
...not to the directory that currently contains pkg:wasm

Also DRY'd up some values and helpers

Change-Id: I71292dacf089e285dd5080e9830e8a6e520c1491
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202302
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-06-03 18:18:57 +00:00
Joshua Litt
5a26d86753 Revert "Reland "[dart2js] Only emit holders into a part file if they are used.""
This reverts commit 92bfa5acfb.

Reason for revert: Breaks for no holders in an output unit.

Original change's description:
> 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>

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

Change-Id: I918f3f7b496d3051046ac13dde37a8f1fbd9e892
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202304
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-06-03 17:59:18 +00:00
Paul Berry
9a83a75a10 Migration: fix handling of /*!*/ comments in is/as expressions.
Previously, the migration tool had a small amount of special case
logic in `EdgeBuilder._dispatch` to ensure that if an `as`
expression's type was annotated with `/*!*/`, that `/*!*/` wouldn't be
misinterpreted as also applying to the `as` expression itself (causing
a `!` operator to be inserted).  This logic wasn't sufficiently
general; it failed to handle `is` expressions (which can run into the
same issue), and it failed to handle situations where the `is` or `as`
expression was at the end of a larger expression (e.g. `y = x as
T/*!*/;`).

This change removes the special case logic and replaces it with a more
general-purpose mechanism: when visiting any type name, if it ends in
a `/*!*/`, the edge builder stores information about it in the
`_nullCheckHints` field.  This ensures that when visiting an
expression ending in that type name, the `/*!*/` will be ignored
(since `EdgeBuilder._handleNullCheckHint` skips any hints that are
already stored in that field).  This ensures that we properly handle
both `is` and `as` expressions, as well as larger expressions that
contain them.

Change-Id: I2b902ef809b4cc5eb8b493fa4405c0f0c8c10a96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202261
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-03 17:39:47 +00:00
Paul Berry
4b5c275d2c Sort api_test.dart
Change-Id: I1beb4c553b0e9b03ce9c37d3507ec33ed44269ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-03 17:39:47 +00:00
Ben Konyi
9cf93054ee [ benchmark ] Fix names for SDKArtifactSizes benchmark outputs
Change-Id: I569723b04136d37607a61e5a47a2e8661425f820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202263
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-03 17:26:07 +00:00
Kevin Moore
2383d4c579 pkg:wasm: Update lints to pkg:lints, cleanup setup.dart
- Standardize on `dart run wasm:setup`
- Cleanup in readme

Change-Id: I98099cead7be715aa804397e73aac74197713f69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202145
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-06-03 17:17:14 +00:00
Ryan Macnak
6589ca13bc Revert "[vm] Remove Script::compile_time_constants_."
This reverts commit a10e038f09.

Reason for revert: Android ARM32 disagrees on how UntaggedScript is packed

Original change's description:
> [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>

TBR=bkonyi@google.com,rmacnak@google.com

Change-Id: I41872aa99af056d4a2c730403628a86b61185e46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202300
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-03 17:05:38 +00:00
Konstantin Shcheglov
4cc88389fd Issue 45672. Report constant errors when null value where non-nullable type is expected.
When in a legacy library, runtimeTypeMatch() with the legacy type.

Original: https://dart-review.googlesource.com/c/sdk/+/196042
Reverted as: https://dart-review.googlesource.com/c/sdk/+/196281

Presubmit looks green:
https://test.corp.google.com/ui#id=OCL:369597863:BASE:377223944:1622729657782:14c50e7

Bug: https://github.com/dart-lang/sdk/issues/45672

Change-Id: Ife02dbdc4c111dec22536de4c50c349381ba1b3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197109
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 16:58:57 +00:00
Alexander Aprelev
6c254fab89 [io/http] Don't add zero-valued content-length header on GET, HEAD, DELETE, CONNECT requests.
Per https://tools.ietf.org/html/rfc7230#section-3.3.2:
"... A user agent SHOULD NOT send a
Content-Length header field when the request message does not contain
a payload body and the method semantics do not anticipate such a
body."

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

Change-Id: I96b735c06038eb3d12a303ee5329228a9b594726
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194881
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-06-03 16:14:24 +00:00
Martin Kustermann
2505b6c64e [vm/concurrency] Ensure no races can occur when setting identity hash code
Usually the identity hashcode is implemented by returning if present and
otherwise generating a random number, setting the hash code and
returning it.

This works fine in single-mutator environments, though when multiple
mutators might race to install identity hash codes we should ensure only
one of them wins and all others will obtain whatever hash code has been
set by the winner.

This will matter once we start sharing more objects across isolates.

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

TEST=vm/cc/AsmIntrinsifier_SetHashIfNotSetYet

Change-Id: Ie760ca9658e6ec0640255361544d6822b07574e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201827
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-03 14:45:44 +00:00
Dong-Heon Jung
e3bc9b6104 [vm/compiler] Remove unnecessary register assigning for constant
In function entry, there are redundant register assignings for constant.
This removes the register assignings.

TEST=Existing test coverage.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try
Change-Id: I08e75118a60f01b0d1a010ef4e2eaa3f5760a4ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202180
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-03 13:21:35 +00:00
Clement Skau
3c8115db5a [test] Fixes memory issue in json test.
JSON_JSONStream_DartObject used to elide a JSON string longer
than 1024 into a buffer of 1024 bytes, which was causing memory
issues, including tripping ASAN.
This is fixed by doubling the buffer.

This CL also adds ASSERTs to ensure all buffers used with
`ElideJSONSubstring(..)` are big enough.

TEST=Existing, updated tests.
Bug: https://github.com/dart-lang/sdk/issues/46246
Change-Id: I7ce86429efecd91e768be413fd86f7d3c53c5d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202244
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2021-06-03 13:14:14 +00:00
Irina Arkhipets
79a61fab8f [co19] Remove Compiler-tear-offs tests from status files.
Change-Id: Ia41537d3a4c5951841de92507c62711d1f2d8fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202240
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-06-03 10:49:04 +00:00
Robert Nystrom
4333b3db98 Add deprecation warning to dartfmt.
Change-Id: I7c67041fc84cddbc44b54e629eee79548fd6566b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202144
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2021-06-03 10:11:24 +00:00
Konstantin Shcheglov
abbff018c0 Deprecate LinkInputLibrary/LinkInputUnit.tmp1(), use unnamed instead.
This is the next step to rename these constructors.
After updating google3 to unnamed constructors we will remove `tmp1`.

Change-Id: Ib010ad6c2de6918dc9daceaa7d27449618ebd9b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202200
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 05:03:24 +00:00
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