Commit graph

101718 commits

Author SHA1 Message Date
Stephen Adams 3a91bcb39e [dart2js] SSA - pre-assign variable to reduce phi assignments
Introducing a partial redundancy with a variable with a longer
live-range can reduce the size of the emitted code.

Flute.complex (-O4): -0.377%
cm_shell (-O4): -0.029%

Change-Id: I0d03119b17f4b58d61f277bf8bb0e57d8e7c47c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360360
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2024-06-17 22:47:57 +00:00
Alexander Markov 4d3689138e [vm] Remove obsolete --[no-]unbox_doubles flag
All our target platforms support unboxed doubles and this obsolete
option is no longer used.

TEST=ci

Change-Id: I1d9214b49e875bc52e4f25650dacf8446a2e40a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371980
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-06-17 22:45:59 +00:00
Ryan Macnak 6226568fa5 [vm, gc] Separate marking stack by generation.
Allows the scavenger to avoid pruning work, which can be significant if the marking stack becomes very deep.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/55713
Change-Id: Icb6c15d07034bc79573af1bf30f31cbf30c59717
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369123
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-06-17 21:43:32 +00:00
Kallen Tu 3d42eb5308 [cfe] Change wildcard tests to not use main().
Change main() to test() so we don't need an entry in the status file.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I41e6a70ce486279389e4d613f52e9ceb62c8e792
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371783
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-06-17 20:22:46 +00:00
Stephen Adams 77496338dc [dart2js] Constant-fold const record accesses
I noticed that dart2js generated poor code for `(a, b) = (1, 2)`.
This is due to an oversight in not constant-folding record field loads.

Change-Id: Iac110d8c3373d7673c21494fc467f7fcb400de1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371505
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2024-06-17 19:47:34 +00:00
Sam Rawlins 8c918ffda3 analyzer: Fix resolution of private extension members
Fixes https://github.com/dart-lang/sdk/issues/45240

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Idc054d968c5884dcf6bc876d996c741e8300cab0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371760
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
2024-06-17 18:28:21 +00:00
Devon Carew 334aede0d6 [deps] rev ecosystem, vector_math
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ecosystem (b2b045f..8ada2ee):
  8ada2ee  2024-06-14  Devon Carew  cosmetic updates to the triage bot's github comment (dart-lang/ecosystem#272)

vector_math (3c03ac3..e7b11a2):
  e7b11a2  2024-06-16  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (google/vector_math.dart#322)
  4fecc69  2024-06-17  nadaabdelkhalik  fix(typo): correct 'third' to 'fourth' in  quad.dart (google/vector_math.dart#326)

Change-Id: Ie59e0cd4b8b4d3e6bf74ba8d018e3e1b21788539
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-06-17 18:11:29 +00:00
Stephen Adams 26c5de8e96 [wasm] Fix regression in removing Unmodifiable classes
Bug: #56014
Change-Id: I5f9d3e1cb6c123ce50315fdccb90cd9ba4b12761
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371743
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2024-06-17 17:55:14 +00:00
Srujan Gaddam 7a94b5d9a6 [dart:js_interop] Remove unnecessary casts in patch files
In theory, such casts should be optimized out, but in some
cases, they might not be (DDC or lower optimization flags).
Instead, we should use the primary constructor and
representation field to go between the representation type
and the JS type. Similarly, we do unnecessary casts in
dart2wasm to convert JSValue to the right JS type. We can
avoid those by directly calling the primary constructor.

Change-Id: I8fdac18f6d634b379e70951fe5d3a1ed7ad4bf15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371423
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-06-17 17:30:25 +00:00
Brian Wilkerson dc5954c394 Improve the wording of an error message
Fixes: #43180
Change-Id: Ib8b17e156b81811af4144b54a483f43db1e84771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371741
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-17 15:31:03 +00:00
Brian Wilkerson a01d45ce82 Improve highlight range for some ffi diagnostics
Fixes: #54181
Change-Id: Ia1e3f5e121fc961bb8cf34cf83827125f4a3e5a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371782
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-17 15:25:06 +00:00
Parker Lougheed 041d4ffd6a [analysis_server] Disallow construction/extension of namespaced enumerations
Change-Id: Ic4279ed0c29649b7ad7ece1e190606fe04f2778f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371504
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-17 15:23:00 +00:00
Danny Tuppeny d209ea9333 [dtd] Allow passing an explicit port to DTD
Removes the port from `startService()` (which as far as I can see is unused) and parses it from `args` instead.

I had to add support for "options" in the argument classes and switched from a bool flag `isFlag` to an enum to be a bit more descriptive (and be easier to support multi-options in future if required).

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

Change-Id: Ib08513139f58e8845a7c2cbbeeea06787dbc2df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371840
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-06-17 14:58:19 +00:00
Parker Lougheed 91254e4064 [analyzer/linter] Surface links to available lint diagnostic messages
Dependent on https://github.com/dart-lang/site-www/pull/5914 landing first.

Bug: https://github.com/dart-lang/site-www/issues/4498
Change-Id: I378debd5d484e17f18d59c49173a5d010f05b6df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371785
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
2024-06-17 14:51:31 +00:00
Ben Konyi 56416078a0 [ DDS ] Remove extra stderr.close()
Change-Id: Ice61586e2a60d039987b1e3b5f5f328cc46fb41e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371880
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
2024-06-17 14:44:22 +00:00
Sigurd Meldgaard f187195224 Bump pub to ddc1c2fd2e2a7cd94a0b92ea033961a25f4ad517
Changes:
```
> git log --format="%C(auto) %h %s" 9ab905a..ddc1c2f
 https://dart.googlesource.com/pub.git/+/ddc1c2fd Bump tar from 1.0.5 to 2.0.0 (4307)
 https://dart.googlesource.com/pub.git/+/3f11cfc2 Fix deprecations (4309)

```

Diff: https://dart.googlesource.com/pub.git/+/9ab905a24e36ef339c99f73bfb6683874feed8ce..ddc1c2fd2e2a7cd94a0b92ea033961a25f4ad517/
Change-Id: I737802583ef189ba4767120b0185acd49aa26b80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371860
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2024-06-17 13:41:02 +00:00
Johnni Winther 194f076bd5 [cfe] Process imports/exports separately
Since the addition of the OffsetMap, imports and exports no longer
need to be processed by offsets, simplifying their handling.

Change-Id: I98698bf1d8f287046147d2f8ebfb005c5fae4d0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371403
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-17 12:43:51 +00:00
Jens Johansen b28b49b537 [CFE] Update coverage expect file after VM coverage fix
After VM fix (856139bfc3) the coverage
should be stable.
This CL updates the coverage "expect" file.

Change-Id: Icfcb4e0869ea97232b985f985a79754da3832ebc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371820
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-17 11:50:39 +00:00
Jens Johansen 856139bfc3 [VM] Add RecordCoverage to InstanceCall and StaticCall
Before this CL, becase of optimizations, coverage of some of these goes
away, making coverage unreliable.

I believe this fixes the issues for "regular" runs (at least it seems to
be stable on the CFE coverage tests).

If setting `--optimization-counter-threshold=-1` there'll still be
trouble though and we would have to also insert these calls in the start
of FunctionBody and the start of FieldInitializer for it to produce the
same results.

TEST=pkg/vm_service/test/coverage_instance_call_after_optimization_test.dart,pkg/vm_service/test/coverage_static_call_after_optimization_test.dart

Bug: https://github.com/dart-lang/sdk/issues/42061
Bug: https://github.com/dart-lang/sdk/issues/55959
Bug: https://github.com/dart-lang/sdk/issues/56018

Change-Id: I34947f0d4b123e52ce67b71a195782d31e4bda16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370501
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-06-17 10:47:58 +00:00
Johnni Winther 47a69d9db6 [cfe] Move SourceLibraryBuilder.parts to SourceCompilationUnitImpl
Change-Id: Id3f4ec4bb107169c8a95b9cc6b8bf8032545c360
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371687
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-17 08:26:10 +00:00
Devon Carew 17af09ff47 Bump tar to 552a49d7595e444184d4f91e9afd533aa253a31d
Changes:
```
> git log --format="%C(auto) %h %s" b62573f..552a49d
 https://dart.googlesource.com/external/github.com/simolus3/tar.git/+/552a49d Make `mode` required

```

Diff: b62573f39a..552a49d759/
Change-Id: Ifc9c5ab12a8dd718f47b8cc318a78028784f1225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371601
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2024-06-17 08:03:18 +00:00
Konstantin Shcheglov 51ecf21356 Prepare to publish analyzer 6.7.0 and _fe_analyzer_shared 72.0.0
Change-Id: Idfac92660bac987a6e0576ef6418a5eadee3a98a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371800
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-16 17:51:49 +00:00
Keerti Parthasarathy 627cd3047d Hide nonVirtual elements in override completions.
Fixes https://github.com/dart-lang/sdk/issues/55628

Change-Id: I70dcf5b47dae2faef30a47a4e3f811e735a1eeec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371742
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-06-14 23:45:19 +00:00
Alexander Aprelev 4138277ee6 [vm/shared] Introduce 'vm:shared' pragma.
Decorating a field with 'vm:shared' pragma makes values in this field accessible to all isolates in an isolate group.

Introduce `channel` to the `Version` class so that the pragma can only be enabled on main and dev channels.

TEST=shared_test, shared_fail_without_flag_test
BUG=https://github.com/dart-lang/sdk/issues/55991

Change-Id: I843c9f0d2ffc9f2ced7ddc4006bb6f9ca4e2ddf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370064
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-06-14 23:24:19 +00:00
Kallen Tu 9ead08f053 [cfe] Local functions named _ are not in scope.
Local functions named `_` are treated the same as local wildcard variables.
They cannot be referred to.
This CL changes that behaviour.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: Idbbe2a4f5b406d4499602e808f6541af6451fb31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371480
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-06-14 22:31:48 +00:00
Srujan Gaddam 5ff1e59378 Add expectation tests for Function.toJS lowerings
Adds cases for 0-6 arg functions. Currently, all of these
lower to allowInterop, but will move to a arity-dependent
lowering in a future CL.

Change-Id: I6fcb3110e16b8701444ebb98496bcdb47ffb0a32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368063
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-14 22:28:40 +00:00
Kallen Tu f141c97651 [cfe] Record type fields can be wildcards.
Positional record type fields named `_` are wildcards. They are non-binding and will not collide with other wildcard fields.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: Ic6985da5bdb32564402d084a3282fa448ff28cbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371040
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-06-14 22:22:39 +00:00
Kallen Tu d15a3963e7 [cfe] Allow unnamed optional wildcard parameters to have no default value.
Wildcard optional parameters aren't used anyways, so it doesn't matter if they have a default value.
This CL removes the error that's typically there.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: Ie7286e1c3650fa347b1c28f1cc4ebd657cca33de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371560
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-14 21:30:05 +00:00
Konstantin Shcheglov 9d642f43fe Macro. Issue 55931. Failing test for adding 'extends' and then new type.
Bug: https://github.com/dart-lang/sdk/issues/55931
Change-Id: Iaf7f147b1d710d55f70ecaa2d26a8c2f88fd4afe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371781
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 21:11:59 +00:00
pq 2e9bd8a967 quick fixes for EXTENSION_{TYPE_}DECLARES_MEMBER_OF_OBJECT
Quick fixes for:

* `EXTENSION_DECLARES_MEMBER_OF_OBJECT`
* `EXTENSION_TYPE_DECLARES_MEMBER_OF_OBJECT

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


Change-Id: I4a3576f7e78c58a4cf7dd6d659b576f2c7f11279
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371686
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-14 20:47:02 +00:00
Srujan Gaddam 25a9fc0aab [ddc] Move null check to JS foreign function in isDartClass and isDartFunction
The Dart != check lowers to !== in JS. The RTI property doesn't
exist in the JS function, so the result is undefined. However,
undefined !== null returns true, so JS functions are accidentally
treated as Dart functions. This fixes that.

Change-Id: I4c4e0018768c0ac29f4b5ee228c504b7cb0b7232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369200
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-06-14 20:46:20 +00:00
Parker Lougheed 2cd388617e [analyzer] Fix spelling of new workspace diagnostics
Change-Id: I94c0fce250845faf2fbc5ecb0d0865393600a636
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371503
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
2024-06-14 20:32:27 +00:00
pq de63980b40 quick fixes for SUBTYPE_OF_{BASE,FINAL}_IS_NOT_BASE_FINAL_OR_SEALED
Quick fixes for:

* `SUBTYPE_OF_BASE_IS_NOT_BASE_FINAL_OR_SEALED`
* `SUBTYPE_OF_FINAL_IS_NOT_BASE_FINAL_OR_SEALED`

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

Change-Id: I1ee373fb030a1570f93e3a7bee694aa0ecc974f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371683
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-14 20:16:46 +00:00
Konstantin Shcheglov 8fcba75132 CQ. Use more precise source types in FileState.
Change-Id: I04bf81ec07089b09109ca91a087e5080a30ee44f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371562
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-14 19:51:38 +00:00
Sam Rawlins 3c65563735 linter: Fix issue with extension type methods as possibly const arguments
Fixes https://github.com/dart-lang/linter/issues/4978

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I532f491355bc34028b19d323102f038dff861445
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371780
Auto-Submit: Sam Rawlins <srawlins@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-14 19:42:24 +00:00
Srujan Gaddam 7ec9514093 [benchmarks] Add Function.toJS benchmark
Adds a benchmark to test converting Dart functions to and
from JS as well as calling them.

Specifically, tests some combinations of the following:
- Converting vs calling functions
- JS vs Dart functions
- Calling instance methods vs static methods vs closure vs
  closures stored in fields

Change-Id: I8f5b63781201042c4068437fe84c3043d6dfb446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368064
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-06-14 19:42:10 +00:00
Srujan Gaddam 06ec78851b [dart:js_interop] Add static error for converted functions that contain named params
Like type parameters, these parameters can't be passed from JS and
such functions already do not work as intended as there is no way
to pass named args to a JS function. These named parameters were
being silently ignored in dart2wasm when creating the function
trampoline.

Change-Id: Iebb890de05f8b242e0542c1ec8f2c0582c5232df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368062
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-06-14 19:42:10 +00:00
Nate Biggs b9b4d616a4 [dart2js] Fix record field get receiver type serialization.
Internal users reported a compiler crash when using sequential compilation. Their change involved adding a class hierarchy in which the constructor of a superclass included a RecordIndexGet. When analyzing the constructor of the subclass we also analyze the body of the super constructors.

In this rare case the member being analyzed does not match the member containing the receiver node. Usually calls act as a layer of indirection that we do not analyze across.

When we then save the type of the receiver, we do so in the context of the wrong member (the subclass constructor rather than the superclass constructor). We just have to be more careful to use the correct context member.

The added test fails prior to this change.

Change-Id: I8b9a3b8a7692b8604d5c37c59b94bb8d46afff75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371580
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2024-06-14 19:17:14 +00:00
pq 5d3578a2a9 quick fix for WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER
(`error_fix_status.yaml` to be updated when pending quick fixes are landed.)

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

Change-Id: I042f6dc2171a37d008c6c2c4d1f843e0bcffc46c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371662
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 19:03:50 +00:00
Devon Carew ff733cc81a [deps] rev collection, http, http_parser
Revisions updated by `dart tools/rev_sdk_deps.dart`.

collection (c90b19f..9354f38):
  9354f38  2024-06-13  Kevin Moore  Require Dart 3.4, test wasm on 3.4, prepare release (dart-lang/collection#349)

http (e2e2170..8c325b9):
  8c325b9  2024-06-14  Anikate De  pkgs/ok_http: Stream response bodies. (dart-lang/http#1233)

http_parser (53d4041..71b4c2c):
  71b4c2c  2024-06-13  Graciliano Monteiro Passos  `CaseInsensitiveMap`: added constructor `fromEntries`. (dart-lang/http_parser#99)

Change-Id: I0f848975241261f42e0759d00188fef12731a085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371740
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-14 18:14:10 +00:00
Sam Rawlins 800d824d97 analyzer: Fix typo in property_access_test test name
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I26eef316b7bf711edb6e2e3285752244d0da2e82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Sam Rawlins <srawlins@google.com>
2024-06-14 18:04:12 +00:00
Konstantin Shcheglov ad54e9b224 Macro. Issue 55696. If no/wrong number of type arguments, get them from actual DartType.
Bug: https://github.com/dart-lang/sdk/issues/55696
Change-Id: I6798ab5b262b6961edc2640342b9c39568cc7af2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 17:55:29 +00:00
Keerti Parthasarathy 205ad1c492 [dart-fix] Output pubspec error code in lower case, similar to other error codes.
Fixes https://github.com/dart-lang/sdk/issues/55945

Change-Id: I3e03148222e215ea1afd53377f83e86e0983bca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371502
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-06-14 15:52:23 +00:00
Danny Tuppeny 1b302b8df0 Move tests for switch enum cases for >= 2.19 from AddMissingEnumCaseClausesTest to AddMissingSwitchCasesTest_SwitchStatement
The tests in this class were duplicated when pattern support was added, one set
of tests for <= 2.19 and one for > 2.19. The> 2.19 tests were marked as Failing
because this functionality didn't work.

This functionality has now been implemented, but because the error code and fix
are different, these tests continued to fail. This change moves the tests to
the equivalent pattern-enabled fixes tests and removes `@FailingTest` for
those that can now pass.

There are still a few marked `@FailingTest` because of differences in the new
implementation.

See https://github.com/dart-lang/sdk/issues/52180#issuecomment-2166814402

Change-Id: Ie1dfa5bc5c608d38a191507f5f0403d20ba2ef31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371684
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 15:48:51 +00:00
pq 24156d0b67 [wildcards] code folding tests
Fixes: https://github.com/dart-lang/sdk/issues/56009

Change-Id: Iad1f197388d0b89e9bd9b31cc82a496cf578380b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371663
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-14 15:44:19 +00:00
Ben Konyi fa89a0183e [ package:vm_service ] Prepare for 14.2.4 release
Change-Id: Ibee954dcbac5f7ac592686440e3d6a7fdc83b522
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371581
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-14 14:01:58 +00:00
Ömer Sinan Ağacan 76f6a32432 [dart2wasm] StringBuffer improvements
Use `U16List` instead of `Uint16List` as the character buffer type.
Access the Wasm array directly when writing characters and converting
the final buffer to a String. This avoids bounds checks and uses
`array.copy` when allocating the final string.

Change-Id: I570494e8349adc7a268544544516c9947abc8604
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371681
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-14 13:03:41 +00:00
Martin Kustermann 7078310249 [dart2wasm] Specialize string interpolation expressions for 1/2/3/4 arguments
This affects very common string interpolation expressions where we now
avoid creating arrays and looping over arrays and casting references
when getting things out of arrays.

e.g. `StringBuffer.write()` uses "$obj" in it's implementation
which will benefit from this.

Change-Id: Ie6615e5f76a4a8ccb4ff9aa85c05c7e39eab6f00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371660
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-14 12:33:51 +00:00
Johnni Winther 4b704b8f0b [cfe] Use SourceCompilationUnit in SourceLoader.tokenize
This moves a lot of the methods needed for tokenization and
outline parsing from SourceLibraryBuilder to SourceCompilationUnitImpl.

Parts that are still used elsewhere remains in SourceLibraryBuilder
but accessed through SourceCompilationUnitImpl.

Change-Id: I0df431eee4c187e5447850961d2c27be14cb0ba3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371682
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-14 10:49:48 +00:00
Martin Kustermann 689852e3f0 [dart2wasm] Fix new web/wasm/allow_import_export_pragmas_test test: Add --extra-compiler-option= before the flag name
This wasn't caught by default CI builders, because
default configurations use `pkg/dart2wasm/tool/compile_benchmark`
which passes all unknown flags to the compiler (for convenience
of local development) but `dart compile wasm` doesn't

Change-Id: I6a92d3f04848e027c92b1feee3d54e7efba9fd27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371661
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-14 10:18:23 +00:00