Commit graph

101951 commits

Author SHA1 Message Date
DEPS Autoroller 000149860f Roll Fuchsia SDK from 20.20240530.3.16 to 22.20240701.2.1
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-sdk-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@grotations.appspotmail.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Fuchsia SDK: https://bugs.fuchsia.dev/p/fuchsia/issues/list
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try;luci.dart.try:vm-fuchsia-release-arm64-try
Change-Id: Iddb2e89ff26fcdbb3aca7f76c98b65823773c1a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373822
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-07-02 23:40:07 +00:00
Kallen Tu 2f80ad6359 [cfe] Turn wildcard locals into ExpressionStatements or EmptyStatements.
This CL converts VariableDeclarations to ExpressionStatements or EmptyStatements.
If the declaration has an initializer, it will be converted to an ExpressionStatement, otherwise, an EmptyStatement.

This will help the VM and potentially other backends, avoid allocating space for a variable declaration that will never be used.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I845b7e5e61fbb0340623ec0dee7269491bc09513
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373640
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-07-02 22:56:49 +00:00
asiva 27cbf50a26 [VM/FFI] Add a test case for issue dartbug.com/56064
Adding a test case for issue dartbug.com/56064 which needs to be cherry
picked into the stable release. The fix was done in
https://dart-review.googlesource.com/c/sdk/+/368341

TEST=new test being added

Change-Id: I4e58ef5a33c335ba91b639ce4fcebd052969e07d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374143
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-07-02 22:09:59 +00:00
Ryan Macnak b82383953d [build] Link with lld on Windows when using Clang.
- Make the build deterministic

Bug: https://github.com/dart-lang/sdk/issues/55995
Change-Id: Ic800dd66f23bc402dfede09db3f67f01aa82d29d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373360
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-07-02 21:16:39 +00:00
Konstantin Shcheglov 4c1e63a3c0 Augment. Report DUPLICATE_DEFINITION for enum/extension.
Change-Id: I54dfd33a9d0c630d868b05e9d5403e02cd7cff34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-07-02 20:21:00 +00:00
Vyacheslav Egorov 4d57de82e2 [vm/reload] Update is_implemented after reload
When doing fine grained invalidation and reload we might end up losing
`is_implemented` bit and some other class-hierarchy related bits
on a class if we only reload the library where class is declared
but not transitive closure which depends on that library.

Consider:

    library a;
    class A {}

    library b;
    class B implements A {}

If we do a change to library `a` which does not impact the outline
then we do not need to reload `b`. This will cause class A to
be replaced with a new `Class` object in the class table - and lead
to us losing various CHA related bits.

This CL update ProgramReloadContext::RebuildDirectSubclasses to
handle this correctly, we also rename it to
RestoreClassHierarchyInvariants and make it share implementation
with ClassFinalizer (which contained almost identical function).

Fixes https://github.com/flutter/flutter/issues/151032

TEST=vm/cc/IsolateReload_IsImplementedBit

Change-Id: Ie620592befecb89897d6e8d46175ef07348bf11d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374040
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-07-02 18:53:08 +00:00
Ann Marie Mossman 1c0c5f355f Issue 54063: fixed formatting issues
Issue 54063: Adding in file quick fix support for missing semicolons and associated test

R=srawlins@google.com

Bug: https://github.com/dart-lang/sdk/issues/54063
Change-Id: Ia1a20129e3c630d977ab3d40bf8e79b0ed852936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373326
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Ann Mossman <mossman@google.com>
Auto-Submit: Ann Mossman <mossman@google.com>
2024-07-02 17:30:49 +00:00
Ryan Macnak f8979c3592 [build] Make bin_to_coff.py compatible with lld-link.exe.
- Add missing memory permissions
 - Add missing alignment directive
 - Add missing compatible-with-SafeSEH flag

Bug: https://github.com/dart-lang/sdk/issues/55995
Change-Id: Iad5aeb2af29511d079a8b8fa113d9c09e764a3f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373881
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-07-02 16:33:37 +00:00
Brian Wilkerson 8b8a15059c Improve completion at the beginning of an index expression
This is almost identical to the fix for completing at the beginning of a
method invocation. There's probably a more consistent way to do this,
but I'm not sure what that is at the moment. (I think we used to do this
in `completionNode` but were skipping some nodes we shouldn't have been.)

Change-Id: I3f220e0e79a91721b0c1235fdfc0f511ee7400a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373902
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-07-02 16:32:40 +00:00
Sam Rawlins 85f9e45434 linter: Mark 'errors'-related rules with finer-grained categories
Work towards https://github.com/dart-lang/linter/issues/4991

Here I just take all of the existing rules marked with
`Category.errors` (which are not removed or deprecated), and re-examine
what category or categories they fall into.

I add new categories:

* "binary size" (not super accurate for JS-compile apps, but "binary"
  is still a common industry term for the JS app that is delivered to
  the browser)
* "documentation comment maintenance"
* "error-prone"
* "language feature usage"
* "memory leaks" (note, different from "binary size"; mostly
   memory-leak related but may contain other things?)
* "non-performant"
* "unintentional"
* "unused code"

For multiple rules, I considered adding a "best practices" category
too, but this also seems tragically vague. But for rules like
"control_flow_in_finally", "avoid_catches_without_on_clauses", etc.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I043a509120e7347283d6ab10e8eb73859830abc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371921
Reviewed-by: Marya Belanger <mbelanger@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-07-02 15:22:28 +00:00
Parker Lougheed aedaede1eb [linter] Add docs for avoid_as removal
Also updates `tool/machine.dart` for recent `LintRule` and category changes.

Change-Id: I58200e465e7c372881d0c0af406e606b09b0a844
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373885
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-07-02 15:06:03 +00:00
Stephen Adams b3ce1647a8 [js_runtime/js_dev_runtime] Handle fractional timezone offset
Change-Id: I7ed62ecd6fec06aba167fcf44df486674a36918a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373904
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-07-02 15:00:19 +00:00
Konstantin Shcheglov d631c45b08 Augment. GetterMethodConflict is always present, even if there is a member in the merge declaration.
Make co19/LanguageFeatures/Augmentation-libraries/augmenting_types_A09_t05
less broken.

Change-Id: I267041b0c567dd84fd81fed7d530c1522e9fa062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373883
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-07-02 14:40:12 +00:00
Danny Tuppeny 916272331b [analysis_server] Remove the singleton uriConverter and pass explicitly to all toJson/fromJson methods
This avoids accidentally using the converter when talking to plugins, (at least for now) URIs are never expected, and file paths should always be used regardless of which mode the server is in.

This unfortunately touches a _lot_ of code, so I've pushed in many separate patch sets to Gerrit.

Fixes https://github.com/Dart-Code/Dart-Code/issues/5156

Change-Id: I312c3e2cbc35a05a078aaa0138aec7288b3c7dd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373745
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-07-02 14:15:11 +00:00
Ömer Sinan Ağacan bffd31cdb7 [dart2wasm] Add copyright header to generate_wasm.dart
Change-Id: I0344d990286b26434f4c6c6ca8b7f7e8e01b4ffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374041
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-07-02 13:59:45 +00:00
Ömer Sinan Ağacan 6535a017ae [dart2wasm] Simplify type test function names
Instead of

    <obj> is Class(JSUint16ArrayImpl)

generate

    <obj> is JSUint16ArrayImpl

in type test functions.

Change-Id: I98e294291f91d3a117052e42b774a907c95ad6b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374001
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-07-02 10:23:18 +00:00
Ömer Sinan Ağacan 586c5f3b54 Reland "[dart2wasm] Use single unsigned cmp instead of two cmps when possible"
This is a reland of commit 8b1aa1860f

This relands the commit with the following changes to avoid regressions
and some random changes:

- Add inline annotations to `IntToWasmInt` extensions.

  These methods are 3 instructions long and often become just one
  instruction when inlined, but wasm-opt still doesn't inline them,
  turning a single `i64.lt_u` and similar into a function call.

- Revert changes from `length.leU(index)` to `index.geU(length)`.

  I had done this change because I find `if (index >= length) throw`
  easier to read than `if (length <= index) throw`, but the change
  introduced some larger changes in the wasm-opt output. These changes
  are probably harmless, but to minimize unintentional changes I
  reverted these changes for now.

Original change's description:
> [dart2wasm] Use single unsigned cmp instead of two cmps when possible
>
> wasm-opt doesn't optimize `0 < x || x > y` when y is known to be
> positive (e.g. a positive integer constant), so we do it manually.
>
> We also do it in a few places where `y` is not known to be positive in
> the Wasm code, but we know it's always positive, for example when it's a
> length.
>
> Example improvement in the wasm-opt output:
>
> ```
>    (func $_newArrayLengthCheck (;426;) (param $var0 i64) (result i64)
>      local.get $var0
>      i64.const 2147483647
> -    i64.le_s
> -    local.get $var0
> -    i64.const 0
> -    i64.ge_s
> -    i32.and
> -    i32.eqz
> +    i64.gt_u
>      if
>        i32.const 46
>        i32.const 0
> @@ -19190,13 +19172,8 @@
>                i64.const 97
>                i64.sub
>                local.tee $var3
> -              i64.const 0
> -              i64.ge_s
> -              local.get $var3
>                i64.const 5
> -              i64.le_s
> -              i32.and
> -              i32.eqz
> +              i64.gt_u
>                if
>                  local.get $var0
>                  local.get $var6
> @@ -19810,10 +19787,10 @@
>      global.get $global4
>      array.new_fixed $Array<_Type> 2
>    )
> ```
>
> Closes #56083.
>
> Change-Id: Idb1dd0d0809b26be8aec3d082aa341c59e1a353d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373663
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Ömer Ağacan <omersa@google.com>

Change-Id: I822ca612e5c8d5d33ba443107b72e9f1021c5c4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374000
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-07-02 08:54:00 +00:00
MarkZ 72ee2943fd [dartdevc] Moving DDC Set implementations into DDC's private runtime.
This allows internal Set classes to be referenced by our runtime.

Context: incoming changes to our generic types (required for hot reload) requires that RTIs be passed to generic classes on instantiation. Moving our Set implementation into our private runtime and making their classes public allows us to directly reference them without clobbering names externally.
Change-Id: Ie47b3263ebbf2650d314b5285a2d50f3abd1a664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373327
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-07-02 07:27:12 +00:00
Ömer Ağacan 59add4f01e Revert "[dart2wasm] Use single unsigned cmp instead of two cmps when possible"
This reverts commit 8b1aa1860f.

Reason for revert:

This caused at least two issues:

(1) wasm-opt doesn't inline the simple helpers introduced in this CL,
for example:

```
  (func $IntToWasmInt|geU (;217;) (param $var0 i64) (param $var1 i64) (result i32)
    local.get $var0
    local.get $var1
    i64.ge_u
  )
```

Even though when inlined this becomes just one instruction.

This causes diffs like:

```
               i64.const 1
               i64.add
               local.set $var1
+              local.get $var2
               local.get $var10
               struct.get $JSArrayBufferImpl_80 $field2
               call $wasm:js-string.length (import)
               i64.extend_i32_u
               local.tee $var3
-              local.get $var2
-              i64.le_u
+              call $IntToWasmInt|geU
               if
```

(2) Changing `length.leU(index)` to `index.geU(length)` causes missing
some optimizations like the following:

```
     local.get $var0
     ref.cast $JSArrayBufferImpl_80
     local.tee $var3
     struct.get $JSArrayBufferImpl_80 $field2
     call $wasm:js-string.length (import)
-    drop
+    i64.extend_i32_u
+    local.tee $var4
+    i64.const 0
+    i64.lt_u
+    if
+      i64.const 0
+      i64.const 0
+      local.get $var4
+      ref.null none
+      ref.null none
+      call $RangeError.range
+      call $Error._throwWithCurrentStackTrace
+      unreachable
+    end
```

Here the `i64.const 0; i64.lt_u` always produces `0`, but wasm-opt
doesn't do this optimization.

The Dart changes that caused this diff:

```
-    if (WasmI64.fromInt(length).leU(WasmI64.fromInt(index))) {
+    if (index.geU(length)) {
```

Original change's description:
> [dart2wasm] Use single unsigned cmp instead of two cmps when possible
>
> wasm-opt doesn't optimize `0 < x || x > y` when y is known to be
> positive (e.g. a positive integer constant), so we do it manually.
>
> We also do it in a few places where `y` is not known to be positive in
> the Wasm code, but we know it's always positive, for example when it's a
> length.
>
> Example improvement in the wasm-opt output:
>
> ```
>    (func $_newArrayLengthCheck (;426;) (param $var0 i64) (result i64)
>      local.get $var0
>      i64.const 2147483647
> -    i64.le_s
> -    local.get $var0
> -    i64.const 0
> -    i64.ge_s
> -    i32.and
> -    i32.eqz
> +    i64.gt_u
>      if
>        i32.const 46
>        i32.const 0
> @@ -19190,13 +19172,8 @@
>                i64.const 97
>                i64.sub
>                local.tee $var3
> -              i64.const 0
> -              i64.ge_s
> -              local.get $var3
>                i64.const 5
> -              i64.le_s
> -              i32.and
> -              i32.eqz
> +              i64.gt_u
>                if
>                  local.get $var0
>                  local.get $var6
> @@ -19810,10 +19787,10 @@
>      global.get $global4
>      array.new_fixed $Array<_Type> 2
>    )
> ```
>
> Closes #56083.
>
> Change-Id: Idb1dd0d0809b26be8aec3d082aa341c59e1a353d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373663
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Ömer Ağacan <omersa@google.com>

Change-Id: Iac5428037b0c19d76e4c841a1b6623b7305ff702
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373800
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-07-02 01:32:55 +00:00
Matan Lurey 15f666c3eb Fixed @doNotSubmit to prohibit same-library, allow nested functions.
Bug: https://github.com/dart-lang/sdk/issues/55558
Change-Id: Ib0aa786e81e6fc9fecc8af7a3edbbd541cabcaad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364382
Commit-Queue: Matan Lurey <matanl@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
2024-07-02 00:10:23 +00:00
Matan Lurey b41ef7c6b2 Update the pinned Dart SDK for workspace support.
Without this, I can't use `workspace` in the Flutter engine:
https://github.com/flutter/engine/pull/53539

Change-Id: I3b68f14b94f91deda329efd98042dcf63ddb80ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373903
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-07-02 00:05:41 +00:00
Jake Macdonald 87b790b6d0 Bump version to 3.6
Change-Id: I1d096140adb8c01914e0b9d1c7cb2017204e7f0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373940
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
2024-07-02 00:02:19 +00:00
Sam Rawlins 2f9539c164 analyzer: Simplify ScopeResolverVisitor, taking care of some TODOs
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ia050f1da6fe2899e01d1653e8cb3f60c12692cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-07-01 23:35:48 +00:00
Brian Quinlan c6cb0e2458 Make SecurityContext final.
Bug:https://github.com/dart-lang/sdk/issues/55786
Change-Id: I351ddb7f39d2ac9ee032bdf88ef6d524c97f8402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370703
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2024-07-01 22:46:48 +00:00
Brian Quinlan dd699142b9 Make the ConnectionTask constructor public.
Bug: https://github.com/dart-lang/sdk/issues/55562
Change-Id: I38a2cbf87e48ac44bd762ff2583190d476e38db8
Tested: New test in http_connection_factory_test.dart
CoreLibraryReviewExempt: dart:io-only - I probably shouldn't have collected reviewers for this so it doesn't apply to the wasm/web
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367820
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-07-01 21:54:27 +00:00
Konstantin Shcheglov efd2356e6c Augment. Report CONFLICTING_METHOD_AND_FIELD only in the fragment.
Change-Id: Icb57cda60c3d21421884aec581e8bedef8ddbe01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-07-01 21:45:39 +00:00
Brian Quinlan 496b3e65f3 Support setting the minimum acceptable TLS version.
Change-Id: I24775461fb690abdd0a47c5b4e23776c9fe5bfe0
Bug: https://github.com/dart-lang/sdk/issues/54901
Tested: TLS traffic verified in Wireshark, exception behavior verified with a Python test server, property changes verified by unit test
CoreLibraryReviewExempt: dart:io only
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365664
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-07-01 21:00:00 +00:00
Konstantin Shcheglov b963976009 Augment. Use AugmentedMixinElement to report MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE.
Change-Id: I4347d9403f8c1089388b34d7908a2cf848c72fda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-07-01 20:22:17 +00:00
Konstantin Shcheglov 924c3de2eb Augment. Report RECURSIVE_INTERFACE_INHERITANCE using 'augmented'
See also https://github.com/dart-lang/co19/issues/2741
And https://github.com/dart-lang/co19/issues/2740 in general.

Change-Id: Ief005dd8bb1c33263a5faf04dda5380af20e8353
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-07-01 20:12:48 +00:00
Konstantin Shcheglov 1d3b115430 Augment. A few tests added during investigation of a co19/ failing test.
Change-Id: Ie52049196fb2382ee1aa539adfce2c7ccc90f0a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373728
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-07-01 18:42:20 +00:00
Devon Carew 466cee4011 [deps] rev async, boolean_selector, browser_launcher, cli_util, clock, convert, crypto, csslib, dartdoc, fixnum, html, http, lints, logging, markdown, matcher, mime, mockito, path, pool, pub_semver, shelf, source_map_stack_trace, sse, stack_trace, stream_channel, string_scanner, term_glyph, test, test_descriptor, test_process, test_reflective_loader, tools, typed_data, vector_math, watcher, web, web_socket_channel, webdriver, webkit_inspection_protocol, yaml, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (d7c0cd5..c0d81f8):
  c0d81f8  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/async#280)

boolean_selector (62f82f6..c5468f4):
  c5468f4  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/boolean_selector#63)

browser_launcher (7348cea..6012690):
  6012690  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/browser_launcher#61)

cli_util (c37d5e1..6419270):
  6419270  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/cli_util#105)

clock (7cbf08e..ad428ea):
  ad428ea  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/clock#66)

convert (0c9eab7..9035caf):
  9035caf  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/convert#108)

crypto (813e35e..1216790):
  1216790  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/crypto#175)

csslib (b70fef2..192d720):
  192d720  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/csslib#205)

dartdoc (7e5da60..e7f3694):
  e7f36946  2024-07-01  Sam Rawlins  Start using docImport resolution when resolving references (dart-lang/dartdoc#3805)
  9d756dc3  2024-06-30  Sam Rawlins  Bump to 8.0.10 (dart-lang/dartdoc#3806)
  4259b0b1  2024-06-28  Sam Rawlins  Parse and remove doc-imports from comment text (dart-lang/dartdoc#3803)
  31833c34  2024-06-28  Sam Rawlins  Correctly show extension type ctors and hide enum ctors (dart-lang/dartdoc#3804)
  2a39376a  2024-06-27  Sam Rawlins  Add the 8.0.9+1 changelog entry (dart-lang/dartdoc#3801)

fixnum (a8157d8..6c19e60):
  6c19e60  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/fixnum#132)
  57b41c2  2024-06-27  Kevin Moore  update lints (dart-lang/fixnum#131)

html (f6c2c71..0da420c):
  0da420c  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/html#250)

http (bf96551..8d89385):
  8d89385  2024-06-28  Brian Quinlan  Make it more clear to using use runWithClient in the Dart SDK. (dart-lang/http#1250)
  321362a  2024-06-27  Brian Quinlan  Document that runWithClient should not be used with flutter (dart-lang/http#1249)

lints (baaaa56..f6b5d36):
  f6b5d36  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.4 to 1.6.5 (dart-lang/lints#194)
  09a9c88  2024-07-01  dependabot[bot]  Bump actions/checkout from 4.1.6 to 4.1.7 (dart-lang/lints#193)

logging (240ec33..6c3fb37):
  6c3fb37  2024-07-01  dependabot[bot]  Bump actions/checkout from 4.1.6 to 4.1.7 (dart-lang/logging#168)

markdown (3d8d7a8..6242437):
  6242437  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/markdown#617)

matcher (0abd405..d6d573d):
  d6d573d  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/matcher#250)

mime (fd7010b..11fec7d):
  11fec7d  2024-07-01  Kevin Moore  blast_repo fixes (dart-lang/mime#131)
  ffdcde3  2024-07-01  dependabot[bot]  Bump actions/checkout from 4.1.6 to 4.1.7 (dart-lang/mime#129)

mockito (9deddcf..a7fdf71):
  a7fdf71  2024-06-27  Sam Rawlins  Use curly braces in if statement, in accordance with upcoming lint rule change.

path (04807b6..e969f42):
  e969f42  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/path#169)

pool (832c5ab..924fb04):
  924fb04  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart in the github-actions group (dart-lang/pool#90)

pub_semver (dfcad38..d9e5ee6):
  d9e5ee6  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/pub_semver#106)

shelf (2536c15..9f2dffe):
  9f2dffe  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/shelf#438)

source_map_stack_trace (96a8213..741b6ce):
  741b6ce  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/source_map_stack_trace#56)

sse (7dcde16..52d042f):
  52d042f  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/sse#112)

stack_trace (ab09060..4fd3e2a):
  4fd3e2a  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/stack_trace#156)

stream_channel (dc620d2..28a6533):
  28a6533  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/stream_channel#109)

string_scanner (e1cab8f..0de03b5):
  0de03b5  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/string_scanner#77)

term_glyph (6c2a977..38a158f):
  38a158f  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/term_glyph#55)

test (329c6df..3256c23):
  3256c23c  2024-07-01  dependabot[bot]  Bump the github-actions group with 3 updates (dart-lang/test#2247)
  4da62ac6  2024-06-27  Nate Bosch  Add package config URI into VM test entrypoints (dart-lang/test#2245)

test_descriptor (2f19400..90743bc):
  90743bc  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/test_descriptor#69)

test_process (a7ca20b..6223572):
  6223572  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/test_process#61)

test_reflective_loader (816942e..6e64886):
  6e64886  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/test_reflective_loader#64)

tools (4c60686..43a8582):
  43a8582  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/tools#283)

typed_data (8529929..365468a):
  365468a  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart in the github-actions group (dart-lang/typed_data#91)

vector_math (a4304d1..2cfbe2c):
  2cfbe2c  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart in the github-actions group (google/vector_math.dart#329)

watcher (f312f1f..0484625):
  0484625  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/watcher#170)

web (2ae509e..e4c4d81):
  e4c4d81  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/web#269)

web_socket_channel (bf69990..8e95ea7):
  8e95ea7  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/web_socket_channel#376)

webdriver (f85779e..718e4c3):
  718e4c3  2024-07-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.7 (google/webdriver.dart#301)

webkit_inspection_protocol (5740cc9..32fffa5):
  32fffa5  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.2 to 1.6.5 (google/webkit_inspection_protocol.dart#126)
  73ab344  2024-07-01  dependabot[bot]  Bump actions/checkout from 4.1.4 to 4.1.7 (google/webkit_inspection_protocol.dart#125)

yaml (4cf24ca..30fd9e0):
  30fd9e0  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart in the github-actions group (dart-lang/yaml#168)

yaml_edit (ad3292c..57a28da):
  57a28da  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/yaml_edit#92)

Change-Id: Ifaff2db977be0b38b631e8a177bbff47c3d24c12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373880
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-07-01 18:35:40 +00:00
Ivan Inozemtsev 3370a4e393 Revert "Reapply "[ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer""
This reverts commit 44d4451476.

Reason for revert: b/350443042

Original change's description:
> Reapply "[ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer"
>
> In the previous version of this change, if the user had 'dart' on their
> PATH and invoked 'dart compile js' (which spawns the VM service after
> compilation completes), the VM service would attempt to spawn DDS using
> './dart' as the executable path instead of 'dart'. This would result in
> DDS failing to start, causing the VM to print an error and hang.
>
> This updated change checks to see if the parent directory of
> `Platform.executable` is '.' and then verifies if './dart' exists or
> not. If it doesn't, 'dart' is likely on the user's PATH and should be
> used directly as the executable path.
>
> See https://github.com/dart-lang/sdk/issues/56087 for details.
>
> This reverts commit 4b88698e48.
>
> TEST=pkg/dds/test/control_web_server_starts_dds_with_dart_on_path_test.dart
>
> Change-Id: Id0f1dadd01d9202cbf7717f31393b43171cf3968
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373561
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Derek Xu <derekx@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

Change-Id: I424c4b91b0b108ae4c9dffa0059ed90c918897e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373744
Reviewed-by: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
2024-07-01 18:30:28 +00:00
Keerti Parthasarathy 9f27bdeaf6 Use completionLocation from SuggestionCollector when computing relevance
Change-Id: I2446b8596ce35f53f6370b3a3590e7fd2a2b4974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373767
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-07-01 16:51:27 +00:00
Elijah Luckey 5ea7c0fb86 docs: Iterable.reduce throws when empty
Closes https://github.com/dart-lang/sdk/pull/56105

GitOrigin-RevId: af9ffc2b010fb0ffe9a1e34dee2709eb184ea721
Change-Id: Ifda2f5b931e48bfe2c7d3475e11955ea3b832148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373764
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-07-01 15:33:20 +00:00
Sigurd Meldgaard da01d02ef0 Bump pub to ea4a1c854690d3abceb92c8cc2c6454470f9d5a7
Changes:
```
> git log --format="%C(auto) %h %s" ddc1c2f..ea4a1c8
 https://dart.googlesource.com/pub.git/+/ea4a1c85 Use forward slashes in paths when using path dependencies from git dependencies (4315)
 https://dart.googlesource.com/pub.git/+/4a3e9a44 Fix ordering of listed files in test. (4321)

```

Diff: https://dart.googlesource.com/pub.git/+/ddc1c2fd2e2a7cd94a0b92ea033961a25f4ad517..ea4a1c854690d3abceb92c8cc2c6454470f9d5a7/
Change-Id: I1bcd5287bdf3903ebc4773c042f638058414d0ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373860
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2024-07-01 15:01:17 +00:00
Brian Wilkerson 29d2913e2d Code complete before a method invocation
While the completion scenario is valid, it's probably an unlikely case.
I discovered the issue because it's one of the cases that was frequently
reporting failures in the completion metrics tool. With this change,
the failure count is now down to 249 (1.96% of attempted completions).

Change-Id: I1c9104352c14eb758040e3e0e3a2d2fafc4f909d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373780
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-07-01 14:44:56 +00:00
Vyacheslav Egorov 408568049f [vm/compiler] Improve ConstantPoolTrait::Hash
It was using class id as a hash for non-primitive values which led to
quadratic behavior on functions with large number of non-primitive
constants.

Instead start using the same hash which is used for canonicalization
of constants.

Fixes https://github.com/flutter/flutter/issues/150182

TEST=ci
R=alexmarkov@google.com

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-release-arm64-try
Change-Id: I7ea19edd63b5b7698fda02adccf4fa7e2ebb4b13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373661
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-06-30 22:49:32 +00:00
Ömer Sinan Ağacan 8b1aa1860f [dart2wasm] Use single unsigned cmp instead of two cmps when possible
wasm-opt doesn't optimize `0 < x || x > y` when y is known to be
positive (e.g. a positive integer constant), so we do it manually.

We also do it in a few places where `y` is not known to be positive in
the Wasm code, but we know it's always positive, for example when it's a
length.

Example improvement in the wasm-opt output:

```
   (func $_newArrayLengthCheck (;426;) (param $var0 i64) (result i64)
     local.get $var0
     i64.const 2147483647
-    i64.le_s
-    local.get $var0
-    i64.const 0
-    i64.ge_s
-    i32.and
-    i32.eqz
+    i64.gt_u
     if
       i32.const 46
       i32.const 0
@@ -19190,13 +19172,8 @@
               i64.const 97
               i64.sub
               local.tee $var3
-              i64.const 0
-              i64.ge_s
-              local.get $var3
               i64.const 5
-              i64.le_s
-              i32.and
-              i32.eqz
+              i64.gt_u
               if
                 local.get $var0
                 local.get $var6
@@ -19810,10 +19787,10 @@
     global.get $global4
     array.new_fixed $Array<_Type> 2
   )
```

Closes #56083.

Change-Id: Idb1dd0d0809b26be8aec3d082aa341c59e1a353d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373663
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-29 08:12:50 +00:00
Srujan Gaddam e5999393c9 Update web rev to 2ae509e
Includes the following commits:

- Rename members when they collide with return/parameter type names
- Update Web IDL to 3.49.0
- Add MAC_FF_META to KeyCode constants
- Account for static members in MDN docs
- Update doc comments, bump version to 1.0.0-wip

Change-Id: I0b87aa845af0ea093782d09a9a52abc09824d24a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373723
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-06-28 22:15:42 +00:00
Konstantin Shcheglov 9933ca5a53 CQ. Switch to flattenedToList/ToSet from package:collection
Change-Id: I2cd0d4f1653ddc2701961d3b26990d1b1c5cfdc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-28 22:10:41 +00:00
Konstantin Shcheglov 3867c8d945 CQ. Remove unused InheritanceOverrideVerifier(strictCasts)
Change-Id: I5efbce7edfecfa6a77592542e29495dcff51a589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373603
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-28 21:46:38 +00:00
Konstantin Shcheglov aa8ea803cf Augment. Report INVALID_OVERRIDE using merged interfaces.
Change-Id: Id515aaf813b60ccbfc3d5fece1b728f1e909a261
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373762
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-28 21:00:50 +00:00
Elliott Brooks b792a0c914 Update DevTools rev to 70375f6c6d81faa8f3069aa6dcf2a98c69445455
Change-Id: I7afa1bd8a365d973ed715c4d801135695202b0e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373602
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-06-28 20:45:00 +00:00
Konstantin Shcheglov dbb7a78f75 Augment. Add INCONSISTENT_INHERITANCE for enum.
Change-Id: I98a58f66ab505055e1926ec2161476813d51ba74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373722
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-28 20:30:08 +00:00
Konstantin Shcheglov 5b00f3651c CQ. Remove deprecated methods from ResourceProviderMixin.
Change-Id: Ib6b4a942bb7f599c4a7e9b576c710d155baf6ba3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-28 18:47:34 +00:00
Sam Rawlins 0083eadca5 analyzer: Fix angle brackets in a doc comment.
The angled brackets are rendered as HTML.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Id7afcd4f3825b9643ed50c48ad98c1201ba2405f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Sam Rawlins <srawlins@google.com>
2024-06-28 18:45:49 +00:00
Sam Rawlins 3ee22c02a9 analyzer: Use docImport scope in field and top-level variable declarations
Fixes https://github.com/dart-lang/sdk/issues/56100

Also privatize and inline some code.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ie9fea09cd719a62d2ef58373deaeb1fd43fa9cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373601
Commit-Queue: Sam Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-06-28 18:39:30 +00:00
Stephen Adams 644823b762 [wasm/typed_data] Fix immutable flag
Bug: #56014
Change-Id: I79a31e489cde668c520857eb80f1e27f488a767a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373720
Auto-Submit: Stephen Adams <sra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-06-28 18:06:30 +00:00
Konstantin Shcheglov d33240f33f Augment. Report IMPLEMENTS_REPEATED and ON_REPEATED.
Change-Id: Ib3ccad6ea7e67b7512dc2f428f39229fb1d9c971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-28 17:17:49 +00:00
Brian Wilkerson b22b78d481 Enhance CandidateSuggestions to have more data for relevance computations
I believe that we're computing the same values as we were before, but
the tests won't prove that. I couldn't think of any way to test this.
If you have any concerns and/or can think of a way to test it, do let me
know.

Change-Id: I489a2642b9b0345ad40fdc4afa9283eba5f65b3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373581
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-28 17:14:29 +00:00