Commit graph

79985 commits

Author SHA1 Message Date
Alexander Thomas 6d0f90ea54 [release] Add release notes for 2.13.2
Change-Id: I153e8f6ca05df97a3026491e5f6857780d718c56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202624
Reviewed-by: Michael Thomsen <mit@google.com>
2021-06-07 10:53:09 +00:00
Clement Skau 197c42c40e [clean-up] Removes NATIVE_ENTRY_FUNCTION macro
The only remaining use of the macro was to do a string concat
which might as well be done directly.

TEST=CQ

Change-Id: Idbf2eb823c74afbd249a60649f185397caf8a32e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202680
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-06-07 08:59:32 +00:00
Brian Wilkerson 01fb0a6e22 Add specialized messages for conflicting type parameters in mixins
Change-Id: I8d858226b2c93c15c3bf7610980672b064b40167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-06 21:51:11 +00:00
Brian Wilkerson 7d2ffd78de Make correction producers know whether they can be bulk applied
This change makes sense to me for a couple of reasons. First, when
editing a correction producer the information about whether it can be
bulk applied will be easier to find. Second, the information doesn't
need to be duplicated when the producer can be applied to multiple
error codes. And third, because the information is in one place we can't
enable a producer in one place and miss enabling it in other places.

This does have the unfortunate consequence that an extra producer needs
to be created for bulk application in order to determine whether it
should be applied at all, and can't be re-used because producers
maintain state. We could consider storing a 'generator' object rather
than a generator function in the map and have the `newInstance` methods
produce those objects, but I'm not convinced that it's worthwhile given
how short lived the extra producer is.

There was also one subtle change that you probably won't see by looking
at the changes, which is that one of the producers was enabled for bulk
application for a lint but not enabled for several non-lint cases. It is
now enabled everywhere. I remember thinking at the time that it should
be fine, but I've forgotten which producer it was, so I can't easily
tell you. If you want to confirm that change I'll be happy to do the
work of figuring out which producer it is and which error codes were
impacted by the change.

Change-Id: I2010d777f727472c0d307a6948b84d37491e2b17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-06 16:07:31 +00:00
Konstantin Shcheglov 7110872d91 Support offsets of tokens in constants in informative data.
I plan to work some more on this in subsequent CLs.
More tests, probably more details element models dumps, more nodes.

It somewhat helps for the following.
We miss ListLiteral support though.
https://buganizer.corp.google.com/issues/180549869

Change-Id: I5f92ffc01129417c3f539432d1791de350fe2773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-05 22:23:28 +00:00
Alexander Aprelev 3cd209692c [io/android] Enable file watching on Android.
Fixes https://github.com/dart-lang/sdk/issues/46261
File watching was partially disabled on android despite working as expected with
minor detail that [read] from inotify returns -1 at the end of the stream.

TEST=file_system_watcher_large_set

Change-Id: I4ce7a89ab1e531d91b62d0363ebc36f919d5b8a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202500
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-06-05 01:33:27 +00:00
Brian Wilkerson 18446a6560 References to synthetic fields in enums should navigate to the declaration of the enum
Closes: https://github.com/dart-lang/sdk/issues/46253
Change-Id: Id38f63cb8e32c22d4fe70a5aba675c7c0067bbd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202560
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-04 23:14:07 +00:00
Kevin Moore 063d0ef286 pkg:wasm moved to GitHub
Remove code from SDK

See https://github.com/dart-lang/wasm

Change-Id: Ie5a68216f67605b20b8288793de752bac1f1b396
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202542
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2021-06-04 22:35:17 +00:00
Brian Wilkerson 75c9f63da0 Fix completion for redirecting constructors
Change-Id: Ia082b04ab90a9541b1eeec12c6c5f7f8379d3af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-04 20:16:47 +00:00
Kevin Moore 666f1ab898 pkg:wasm - more cleanup
- Added documentation to many members. Cleaned up existing documentation to
  follow standards.
- Made many more fields final.
- Hide (made private) constructors that a user cannot reasonably invoke.
  - WasmFunction, WasmInstance, WasmExportDescriptor, WasmImportDescriptor
- Added, exported, and use new WasmError class.
- Remove the fluent API in builder
  See https://dart.dev/guides/language/effective-dart/design#avoid-returning-this-from-methods-just-to-enable-a-fluent-interface

Change-Id: I4222f7a95a9b20e89728d71de56b02ec91601e25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202360
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2021-06-04 19:21:51 +00:00
Anna Gringauze 9b56b4b858 Initial symbols format version and tests
Towards: https://github.com/dart-lang/sdk/issues/40273
Change-Id: Id784e1341ed2d41111a71aaafd849325335a9e21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202303
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-06-04 18:21:27 +00:00
Joshua Litt 2ad8d3d23e [dart2js] Add test for empty holders in an output unit.
Change-Id: I364366c2a5e9ce5895dbc4096d17ad04374b69d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202310
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-04 17:55:17 +00:00
Konstantin Shcheglov 037aa5ee93 Generalize to allow workspaces to contribute to resolution salt.
Change-Id: I5465721b01dde5193a988220c6f3a14020c740e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202460
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-04 17:51:57 +00:00
Martin Kustermann 0228f2ce02 [vm] Lower smi value used for setting identity hash codes
In 64-bit with compressed pointers enabled, we still store identity
hashes in the object header, but the Smi range is reduced.

The 0xffffffff is a Smi in 64-bit architectures, but not if
compressed-pointers are enabled.

This updates the test to use the same maximum value as the corelibraries
could use when setting the identity hash code.

TEST=Fixes vm/cc/AsmIntrinsifier_SetHashIfNotSetYet in compressed-pointers mode

Change-Id: I285a28127767a6a0b606354f3e3f994a15b372b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-04 17:40:57 +00:00
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