Commit Graph

102551 Commits

Author SHA1 Message Date
Alexander Markov 8fbca8ba67 [vm] Initial implementation of dynamic modules in the VM/AOT
TEST=Manually tested dynamic modules

Change-Id: Icb2616e414167bd1fbd10f01dea64c57dbdeeac7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380281
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-15 14:09:52 +00:00
Ömer Sinan Ağacan a09fbf8468 [dart2wasm] Improve container type in dart:convert
Use `GrowableList` instead of `List` for the container type in
`_JsonListener`.

Eliminates virtual calls in `_populateUnsafe`.

Improves bytes/second in an internal JSON decoding benchmark from
206,257,553 to 222,982,950 (8%).

Change-Id: I02e467e5353cc348493b52be1fb9ef2e6599381b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380702
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-08-15 13:03:19 +00:00
Martin Kustermann 05ee4e463f [dart2wasm] Optimize JS<->Dart string/byte data transfer more
V8 has very limited support for inlining calls to Wasm functions
into JS. For the string/byte copy implementation it failed to inline
functions due to needing to do type conversions of parameters
in JS wrappers (e.g. to check that value is `anyref`).

=> We change wasm signatures to requires `WasmExternRef`
=> We do the type cast inside the wasm
=> This makes V8 inline the accessors

This results in roughly 3-10x faster JS<->Wasm data transfer:

  WasmDataTransfer.ToBrowserString.10: -60%
  WasmDataTransfer.ToBrowserBytes.10: -72%
  WasmDataTransfer.FromBrowserString.1KB: -70%
  WasmDataTransfer.ToBrowserBytes.1KB: -74%
  WasmDataTransfer.FromBrowserString.1MB: -70%
  WasmDataTransfer.ToBrowserString.1MB: -86%
  WasmDataTransfer.ToBrowserBytes.1MB: -91%

(There's still plenty of room for improvement, especially on the V8 side).

Change-Id: I1e0c3843a5c5e2bcd10a616b71f49ea3338ae280
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380700
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-15 12:08:58 +00:00
Chloe Stefantsova 15b467f94e [cfe] Use exhaustiveness in the implementation of UP
Using exhaustive switch over type pairs ensures all combinations are
handled.

This is a follow-up to:
https://dart-review.googlesource.com/c/sdk/+/379800

Change-Id: Ia6c4279a42590b439388d9fdd8ec5a8c36dbe23a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380560
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-08-15 10:52:13 +00:00
Jens Johansen ac9b6d1672 [CFE] Increase test coverage 04
Change-Id: I38d3e1f1405d2ca47af55f20c129a5e747fb651c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379621
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-08-15 08:21:42 +00:00
Nate Biggs 2f97501551 [js_interop] Fix JsInteropChecks not recursing into constructor's AST children.
The JS interop transformer assumes the entire AST has been checked and ends up trying to cast to FunctionType. If there is malformed, unvisited interop code this results opaque failure (failed type cast) rather than the useful error message from the check.

Bug: https://github.com/dart-lang/sdk/issues/56443
Change-Id: I5b911d0da7a839e3045dce61121496d464b79af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380381
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-08-15 01:47:34 +00:00
Sam Rawlins f60b5bd855 DAS: Add digit separator tests for highlighting
Work towards https://github.com/dart-lang/sdk/issues/56188

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I852c9fe2301c297b8e5ae5b3157153774eaca740
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-08-15 01:00:16 +00:00
pq a8b661f4a7 [wildcards] extension type parameter scopes
Fixes:

CompileTimeError -> Pass (expected Pass)
co19/LanguageFeatures/Wildcards/binding_A02_t08

See: https://github.com/dart-lang/sdk/issues/55680

Change-Id: I5fffc47b52a2fa5d86e6be0b8a780bc3abcff1c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380206
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-15 00:27:10 +00:00
pq b140970238 [wildcards] optimize initializer scope checking; test cleanup
Follow-up from: https://dart-review.googlesource.com/c/sdk/+/380160

Change-Id: I3268ba1a519ef295019679b87f773fd008379c75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380582
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-14 23:22:18 +00:00
Halil Durmus 840729a90a [analysis_server] Show library documentation when hovering over unnamed
library directives

Closes: https://github.com/dart-lang/sdk/issues/53476
Change-Id: I33a8e0ebd3ed7999eba71985fabb90c17444bde6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-14 21:53:52 +00:00
Sam Rawlins 9d61a359d4 DAS: add some tests for digit separators in DocumentColor feature
Work towards https://github.com/dart-lang/sdk/issues/56188

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Id3d56ad5870208e15e89ad014a668a1e659b7d75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-08-14 21:38:48 +00:00
Nicholas Shahan 570ed43611 [ddc] Turning down unsound testing on canary (6)
Stop running co19 suite on the ddc-canary-linux-chrome bot.
Cleanup temporary skips from status file.

These changes are staged across multiple CLs to avoid crashing
the infra when too many tests status changes need to be uploaded
at the same time.

Change-Id: I378954fc0cbb47c0f54edf158b3b7c38744bf0b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379525
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-08-14 21:31:30 +00:00
Konstantin Shcheglov 2b435a9822 Parts. Simplify MacroApplicationOrderTest.
Change-Id: I732518ee67f8991969eae0f17ef42d3dbb09d935
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380641
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-14 21:22:28 +00:00
Sam Rawlins 5a7b16ba4c DAS: introduce some assists that add digit separators to number literals
Work towards https://github.com/dart-lang/sdk/issues/56467

Thw two assists do the following:

* Add a digit separators every 3 digits in a decimal int, a decimal
  double, and a scientific notation double.
* Add a digit separators every 2 digits in a hexadecimal int.

No assists are introduced which remove digit separators.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I0920fb279285963c33a78d9288317213739ae83b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380601
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-14 20:22:47 +00:00
Paul Berry 95cbc6a497 Remove unnecessary break from analyzer
I'm currently working on a fix for
https://github.com/dart-lang/linter/issues/5061 (unnecessary_breaks
fails to report an unnecessary break inside a default clause). To
avoid a trybot failure once the lint is fixed, we need to fix all
instances of unnecessary breaks that the fixed lint would catch.

Bug: https://github.com/dart-lang/linter/issues/5061
Change-Id: Ied3d5f5f548972fd03cb7b6330fe3491459ab658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380620
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-08-14 20:11:59 +00:00
Konstantin Shcheglov 2c77c6749d Parts. Use macro generated parts, not library augmentations.
Change-Id: Id661f8bfc884f24056d49af048b5cb5c3c742812
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380211
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-08-14 20:04:21 +00:00
Devon Carew 2ae7eac031 [deps] update package:lints to capture invalid_runtime_check_with_js_interop_types
Change-Id: I3cf6c0abbb254c1830386e702678e0461fcbdb6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380600
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-08-14 18:44:19 +00:00
Brian Quinlan f753fe4144 Throw RedirectException when a redirect is missing a Location header
Bug:https://github.com/dart-lang/sdk/issues/53618,https://github.com/dart-lang/sdk/issues/53158
Change-Id: Ib7ea9503dd58c0d1c233a85d92d4feb0648a9022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380380
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-08-14 18:17:59 +00:00
Alexander Markov bf2fba78e0 [vm] Fix ObjectPtr::IsSmi and other ObjectPtr::Is* methods to account for Smis
Arbitrary ObjectPtr can be a non-heap object (Smi), so methods
ObjectPtr::Is* which test class id should account for Smi.

Changed ObjectPtr::GetClassId to account for Smi similarly to
Object::GetClassId. Added unsafe ObjectPtr::GetClassIdOfHeapObject
which can be used when caller knows the heap nature of the object.

This change also fixes Integer::GetInt64Value which was relying on ObjectPtr::IsSmi.

TEST=vm/cc/Smi, vm/cc/Mint

Change-Id: I1391600e2acedc7b2a8f35c814df113ec9ba8698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380280
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-14 17:09:07 +00:00
Erik Ernst eaabb3f8ab Add toString and hashCode as obvious, make int non-obvious
Change-Id: I5a83ba3e8d53972d00a16922cd681c0f330855f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380500
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-14 15:56:18 +00:00
Jonny Wang ea3cac1e65 [fuchsia] Use Fuchsia API level 22
Change-Id: I9c8ba5bb16bc07288384ed5a3b29c4ca07e678a5
Fixes: b/359664492
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380580
Auto-Submit: Jonny Wang <jonnywang@google.com>
Commit-Queue: Jonny Wang <jonnywang@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-08-14 14:49:54 +00:00
Ömer Sinan Ağacan 5b702c33b5 [dart2wasm] Port VM convert improvements in CL 374564
Optimize building of Maps in JSON decoder.

Instead of gradually adding key-value pairs into the Map as JSON
is being parsed collect all key values first and then allocate
the map with appropriate capacity.

Original CL: https://dart-review.googlesource.com/c/sdk/+/374564

Change-Id: I4276c649e5509f63e9d7603da15b9b931717905f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380480
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-08-14 11:26:40 +00:00
Martin Kustermann 07da83d321 [dart2wasm] Simplify source map flag code in dart compile wasm
After [0] lands we can remove a workaround in `dart compile wasm` that
checks for `--extra-compiler-option=--no-source-maps`.

[0] https://github.com/flutter/flutter/pull/153417

Change-Id: I19f4da96e198d73e2309652aa2aa08d5e2c72d48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380461
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-08-14 10:00:49 +00:00
Martin Kustermann b888da751e Revert "analyzer: separate unused_element_parameter from unused_element"
This reverts commit c1976b097d.

Reason for revert: It seems this change caused failures on Flutter
HHH bot. Example log can be found at [0]:
```
| lib/src/super_reader/super_reader.dart:615:14: Error: Final field 'showDebugLeaderBounds' is not initialized.
| Try to initialize the field in the declaration or in every constructor.
|   final bool showDebugLeaderBounds;
|              ^^^^^^^^^^^^^^^^^^^^^

```
Looking at the sources it seems that may be related to the
`// ignore: unused_element` analyzer directive:

```
   602	/// A [SuperReaderDocumentLayerBuilder] that builds a [SelectionLeadersDocumentLayer], which positions
   603	/// leader widgets at the base and extent of the user's selection, so that other widgets
   604	/// can position themselves relative to the user's selection.
   605	class _SelectionLeadersDocumentLayerBuilder implements SuperReaderDocumentLayerBuilder {
   606	  const _SelectionLeadersDocumentLayerBuilder({
   607	    required this.links,
   608	    // ignore: unused_element
   609	    this.showDebugLeaderBounds = false,
   610	  });
   611
   612	  /// Collections of [LayerLink]s, which are given to leader widgets that are
   613	  /// positioned at the selection bounds, and around the full selection.
   614	  final SelectionLayerLinks links;
   615
   616	  /// Whether to paint colorful bounds around the leader widgets, for debugging purposes.
   617	  final bool showDebugLeaderBounds;
```

So tentatively reverting this CL.

[0] https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8739650477551803313/+/u/Run_customer_testing_tests/stdout

Original change's description:
> analyzer: separate unused_element_parameter from unused_element
>
> Fixes https://github.com/dart-lang/sdk/issues/49025
>
> This allows users to blanket ignore unused_element_parameter without
> ignoring unused_element. They are reported in distinct situations so it
> is valid to separate them.
>
> Tested: Presubmit CI
> Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
> Change-Id: I4844a6a0e0a67cd5e37ed8735b1526e174deb950
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378500
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Phil Quitslund <pquitslund@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Change-Id: Ibbba75fe56601c7c4b5535c9142cf94c2dd80b91
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380460
Commit-Queue: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-08-14 08:05:37 +00:00
Halil Durmus 3d083d2720 [vm/ffi] Allow getters/setters in structs with variable-length inline arrays
Closes: https://github.com/dart-lang/sdk/issues/56399
Change-Id: Ia5da1d950c3b08e0a4b099930ef3ad84f3116601
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379622
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Halil Durmus <durmushalil@proton.me>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-14 06:50:43 +00:00
Graciliano Monteiro Passos ba041fd6b5 StringTokenImpl: optimize lexeme resolution.
Closes https://github.com/dart-lang/sdk/pull/56453

GitOrigin-RevId: a8c4bb7114a93d15701aba22e5a16ed857df6199
Change-Id: I98aca99d59fefbd6e6a547114773ba274faa0615
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380049
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-14 06:08:02 +00:00
Brian Wilkerson 89ebe93a63 Implemement extensions and extension types
Change-Id: I641c9f87ce7eafcf1b34aded43bdf2fdd8fba80f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380207
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-08-14 04:16:48 +00:00
Sigmund Cherem b6565dad99 [dart2wasm] Reduce cost of building recursion groups.
Dart classes that are structurally equivalent are currently
merged into the same recursive group to allow binaryen to distinguish
them and ptimize them independently.

This change reduces the cost of checking for structurally equivalence:
* We skip it during the discovery of available types
* We skip trivial comparisons (self, reverse, irrelevant types)

This recovers the compile-time regression mentioned in
https://dart-review.googlesource.com/c/sdk/+/378764/comment/f7990317_f4b34810/

Change-Id: I5c97b1498f261c8549b70fd3622c0762499eda21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379754
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-14 00:18:22 +00:00
Ryan Macnak 365985eab7 [vm, gc] Scale new-gen size with number of mutators.
unit_test_suites.dart --skipTestsThatRequireGit -j8
10:51 -> 7:23 (-32%)

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/55713
Change-Id: I98c3dfd4227d335c4b5096036fb717badb9f4f5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378380
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-08-13 21:13:39 +00:00
Nate Biggs 63622f03ee [ddc] Update DDC debugger instance 'length' lookup.
The DDC runtime invokes the 'length' getter on every object for which debug info is requested. This includes objects where the 'length' getter may be present but not intended to be called. (e.g. a Stream object).

The vm_service outlines specific guidelines for the 'length' value of a debug instance ref:
https://github.com/dart-lang/sdk/blob/main/pkg/vm_service/lib/src/vm_service.dart#L4621

This updates the runtime debugger logic to align with the vm_service expectations.

Bug: https://github.com/dart-lang/webdev/issues/2446
Change-Id: Ia567cdc7df12957834b61a8fe1ac54e02a180f13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380220
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-08-13 18:55:57 +00:00
Sam Rawlins 51eb1888d8 linter: move 3 rule tests:
* avoid_shadowing_type_parameters
* avoid_type_to_string
* avoid_types_as_parameter_names

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Id2ddef557475a76244cf4c75f5720c469b34cf3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380142
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-13 18:48:08 +00:00
Devon Carew 94bc29c2fa [deps] rev ecosystem, http, package_config, sync_http, test, tools, web
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ecosystem (https://github.com/dart-lang/ecosystem/compare/f977423..2719d0c):
  2719d0c  2024-08-08  Devon Carew  add invalid_runtime_check_with_js_interop_types, unintended_html_in_doc_comment (dart-lang/ecosystem#285)

http (https://github.com/dart-lang/http/compare/73fce77..76512c4):
  76512c4  2024-08-07  Kate  test(http_client_conformance_tests): Remove old skips (dart-lang/http#1284)
  d7ae256  2024-08-08  Anikate De  [docs] sort pkg list in ascending order (dart-lang/http#1287)
  b82d88c  2024-08-06  Anikate De  [docs] Add ok_http entry to readme (dart-lang/http#1285)

package_config (https://github.com/dart-lang/package_config/compare/f0b7256..76934c2):
  76934c2  2024-08-06  Kevin Moore  Latest lints, require Dart 3.4 (dart-lang/package_config#157)

sync_http (https://github.com/dart-lang/sync_http/compare/ab8377e..91c0dd5):
  91c0dd5  2024-08-12  dependabot[bot]  Bump actions/checkout from 4.1.6 to 4.1.7 (dart-lang/sync_http#49)

test (https://github.com/dart-lang/test/compare/9fbbfdb..8be3c94):
  8be3c948  2024-08-12  Ömer Sinan Ağacan  Run dart2wasm integration test on Windows (dart-lang/test#2265)
  e656e5a9  2024-08-12  Yaroslav Vorobev  fix: use `toFilePath` in package config Uri (dart-lang/test#2262)
  6bfe0d62  2024-08-12  Ömer Sinan Ağacan  Fix documentation rendering issues (dart-lang/test#2264)

tools (https://github.com/dart-lang/tools/compare/55dbd6e..d563c38):
  d563c38  2024-08-13  Moritz  Add health workflow (dart-lang/tools#292)
  8ac5509  2024-08-12  Devon Carew  Update CODEOWNERS for package:unified_analytics (dart-lang/tools#289)

web (https://github.com/dart-lang/web/compare/e89fe49..4996dc2):
  4996dc2  2024-08-12  Srujan Gaddam  Ignore unintended_html_in_doc_comment (dart-lang/web#278)

Change-Id: I808778af5fb9a1f6885ae847614ffb660fcb8662
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380204
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-08-13 18:41:32 +00:00
Ryan Macnak aa0a5da4b8 [infra] Fix tools/bots/find_base_commit.dart.
Broken in dd5b9cd7d7.

Change-Id: I2b3fd26c22d6e8d4266611809da84a2726346446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377726
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-08-13 18:37:33 +00:00
MarkZ f6028e821a Reland "[ddc] Overhauling DDC's generic class representation."
This is a reland of commit e7658520bb

Fixes in the reland + context:
Type parameters emitted in implicit type checks on covariant mixin forwarding stubs may reference type arguments in anonymous classes. We reduce this to their mixin's implementing subclass to avoid generating RTI rules for anonymous classes.

Previous implementations would 'translate' type parameters to that of their mixed in type, but that strategy fails if the implementing subtype  shuffles the order of type arguments relative to its mixed in type (demonstrated in the test - though not actually relevant in the Flutter break).

Original change's description:
> [ddc] Overhauling DDC's generic class representation.
>
> Prior to this change, DDC represented generic classes as closures over type parameters (with type arguments provided at runtime), which tightly coupled generic class definitions with their types and concrete instantiation.
>
> This rewrite decouples this representation, letting us 1) bind type information late and 2) separate generic class definitions from their instantiation.
>
> Notable changes:
> - Generic classes are now declared at top level (rather than within in closures).
> - RTIs are now passed to generic class constructors at runtime (except for JS Interop classes). Only the instantiated class's RTI is required (and it's retained up the type hierarchy).
> - Type signature resolvers are now lambdas that accept a type environment RTI at runtime. While signatures are still attached early, their instances' RTIs are now needed at runtime.
> - Generic classes, constructors, and factories are now evaluated in a 'Class' type environment.
> - An `RtiTypeEnvironment` is introduced to represent lookups on an RTI type environment bound to a parameter. These are used when evaluating type signatures and at constructor/factory bodies.
> - Type recipes now emit Class type parameters with names - but continue to emit method type parameters with de Bruijn indices. This is because indices aren't stable across subtypes.
> - Certain debugger functions now require instances (e.g.,`getClassMetadata`).
> - Adds a special flag for non-external JS interop factory constructors to emit 'true' types (versus 'any').
>
> Change-Id: I7cbeaaf666dd4f9bd5e3ef22a1163a659fc0ee48
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365863
> Reviewed-by: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Kallen Tu <kallentu@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Nate Biggs <natebiggs@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

Change-Id: I9b6f69b7150631f28442675c4230e093e3b821d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379511
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-08-13 18:15:38 +00:00
Kallen Tu 519247e470 [analyzer] Add tests for behaviour between wildcards and constant evaluation.
Fixes https://github.com/dart-lang/sdk/issues/56244
Change-Id: Ie5f615bf8956aff33d4015c355bb90e125084c63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-08-13 18:09:45 +00:00
Hzj_jie 99da8ce289 [fuchsia] reduce the standalone commands in fuchsia integration
multiple processes are now aggregated by one test_env_setup call.

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Bug: http://crbug.com/356463343
Change-Id: Ib41bd2b36eb5d06ceeb6b834f1024365650e0ca0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379560
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2024-08-13 18:04:17 +00:00
Nicholas Shahan 213150c745 [ddc] Turning down unsound testing on canary (5)
Stop running co19/LibTest suite on the ddc-canary-linux-chrome bot.

These changes are staged across multiple CLs to avoid crashing
the infra when too many tests status changes need to be uploaded
at the same time.

Change-Id: Id696dd4e7b655ac797fd52409fc07d12c76ec2bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379524
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-08-13 18:01:41 +00:00
Brian Wilkerson b6f11666f6 Implement enums and mixins for the new element model
Change-Id: Ia4fc8068b25e390f78b99dfc3ded528098da885b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380047
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-08-13 17:53:38 +00:00
Kallen Tu 64969c74b0 [linter] Add tests and make regex static for unintended_html lint.
Follow up to https://dart-review.googlesource.com/c/sdk/+/379519
Adding a few more tests and making sure the regex isn't instantiated every time
we check.
Added some tests from https://github.com/dart-lang/sdk/issues/56450 as well.

Change-Id: Ief895cdfb5fa1049ce4599e2241577e91bc5701a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-08-13 17:32:58 +00:00
Derek Xu baa9a043d2 [VM/Service] Fix documentation of ObjectIdRing
TEST=only a comment was changed

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: I42485e2108d2619ba9ae8cef89728e312b29b8b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379542
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-08-13 17:09:59 +00:00
Derek Xu 004fbe9119 [VM/Service] Improve documentation of JSONStream::Setup
TEST=CI

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: Ib839ca76b1aa9ab0de0b8b3afd02a708a3e8b0a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379541
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-13 17:09:59 +00:00
Devon Carew 89532d54ed [deps] rev package:lints to capture the unnecessary_library_name addition
Change-Id: I6ca4b0cef189248eac4d0898e8549424f2d889bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380180
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-08-13 17:04:13 +00:00
Graciliano Monteiro Passos 3ccadc5c27 SimpleToken.matchesAny: avoid multiple accesses to getter type
Closes https://github.com/dart-lang/sdk/pull/56452

GitOrigin-RevId: 90f22a3ee3fe6263746e121577da23bf3139b0f5
Change-Id: I36eda6b2b6959b4fd79ba7bb6b8aae75c7cb2d9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380048
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-13 14:18:39 +00:00
Sam Rawlins c1976b097d analyzer: separate unused_element_parameter from unused_element
Fixes https://github.com/dart-lang/sdk/issues/49025

This allows users to blanket ignore unused_element_parameter without
ignoring unused_element. They are reported in distinct situations so it
is valid to separate them.

Tested: Presubmit CI
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I4844a6a0e0a67cd5e37ed8735b1526e174deb950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-08-13 12:12:13 +00:00
Vyacheslav Egorov d916799879 [vm/corelib] Optimize building of Maps in JSON decoder.
Instead of gradually adding key-value pairs into the Map as JSON
is being parsed collect all key values first and then allocate
the map with appropriate capacity.

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

TEST=ci

Change-Id: Ic3032323143c35c38469d4f5f289daabdf56ecc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374564
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-08-13 12:00:48 +00:00
dependabot[bot] 0c9886138f Bump actions/upload-artifact from 4.3.5 to 4.3.6
Closes https://github.com/dart-lang/sdk/pull/56437

GitOrigin-RevId: a04773e171872dbe372fbb43cf497cfd89dac954
Change-Id: Ie8c340ad9cabd02b5267fdc746075c39a2b14e21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379981
Reviewed-by: Alexander Thomas <athom@google.com>
2024-08-13 11:09:04 +00:00
dependabot[bot] 5f27d991d5 Bump github/codeql-action from 3.25.15 to 3.26.0
Closes https://github.com/dart-lang/sdk/pull/56438

GitOrigin-RevId: 1d1babb4484ba7354ae8a7e4a69c0d415f43c4b4
Change-Id: I6f186b904dd0cb1bab68b53e8ebe2f04cacd3cfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380020
Reviewed-by: Alexander Thomas <athom@google.com>
2024-08-13 11:08:46 +00:00
Erik Ernst 5b7c600d8b Implement the lint 'specify_nonobvious_local_variable_types'
This lint is the complement of 'omit_obvious_local_variable_types'
in that it flags every declaration that does _not_ specify the type
of a local variable, when it has an initializing expression whose type
is not obvious (defined as in 'omit_obvious_local_variable_types').

Change-Id: If80a961e47fed0412d0ea0bac5ac010e26fea7bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-08-13 09:43:49 +00:00
Vyacheslav Egorov 196f6c90c2 [vm] Create dart:_compact_hash library.
This opens possibility for other core libraries to access implementation
details of compact hash maps/sets and call special "core-library-only"
methods.

TEST=ci

CoreLibraryReviewExempt: VM only library change
Change-Id: I1d7524932c34e6fbe2428853dd547d58bef2d061
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379840
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-08-13 09:20:05 +00:00
Sam Rawlins c008c159ee Enable feature digit-separators
This CL  makes the `digit-separators` feature enabled by default in
Dart Language Version 3.6.

Tested: Presubmit bots
Change-Id: If0776e96066ecaad3baa7f92fce167317fb976f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379660
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-08-13 04:09:39 +00:00