Commit graph

97731 commits

Author SHA1 Message Date
Chloe Stefantsova b791861f75 [cfe] Make 'flatten' aware of extension types
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: Ic7175ebab22f7b9e956030616350e79d1837a1df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331942
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-10-25 07:41:38 +00:00
Chloe Stefantsova 255f260ede [cfe] Report error on await of extension type that is not a future
Closes https://github.com/dart-lang/sdk/issues/53207
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: Idad31c3286108aa3dc75b4b3d7f5364674641582
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331980
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-10-25 07:41:18 +00:00
Brian Wilkerson 3659b3e585 Recover from exension type declarations with no representation field
Change-Id: I2fdd0c281ba8a8458248d00b91a0cb1abfed02da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331749
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-24 23:27:59 +00:00
Nate Biggs 9542aa442a [dart2js] Add back private indices for entity maps.
After further review the slight increase in memory usage is minimal and worth the improvement in runtime for each phase.

The new indices follow the same format as before, we assign each entity an index when it is registered into the entity map. However these new indices are only used by the entity maps and not as part of the serialization format for those entities. The index only exists to make look ups faster in the "map". As such, I've made the field private to prevent/discourage outside use of it.

Change-Id: I7a7c20a2dd51b01d2390bb4401545821a1014832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331360
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-24 22:49:38 +00:00
Dan Chevalier c7f122ee9e Initial Implementation for Service Extension Router
This instance of service_extension_router has been hooked into DDS seperately. The vm_service and DDS tests still worked with the integration.

There will still be some iteration and discussion to be had, but I'd like to get this up as the initial version.

Bug: https://github.com/dart-lang/sdk/issues/53300
Change-Id: Ic72b770a61b2fc61fbd7c4b47ff8996a90f78665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-10-24 21:58:21 +00:00
Nate Biggs 1df418af1a [dart2js_info] Add 'main-only' option to info diff.
New option will only include diffs in the "main" output unit for the provided builds. Only sub-library entities have an output unit. Libraries do not have an output unit because there is no code associated with the library itself and a single library's contents can be spread across multiple output units.

Mutually exclusive with the 'package-only' flag because that one only prints libraries and 'main-only' includes no libraries.

Change-Id: I4d5abe54daa8e09d892dd2e2fc2b840f0705ad86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332120
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-24 21:38:42 +00:00
Devon Carew 540b3a899a [deps] rev dartdoc, lints, matcher, protobuf, tools, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (f7e9b17..53da3e1):
  53da3e1d  2023-10-23  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#3544)
  62d5469d  2023-10-23  Sam Rawlins  Support extension types in sidebars and categories (#3537)
  69abd0f0  2023-10-22  Sam Rawlins  Refactor file-gathering logic (#3539)
  e9c61d1d  2023-10-22  Sam Rawlins  Convert some late final fields to getters in Accessor, Annotation, Constructor (#3534)
  adcdc8b7  2023-10-20  Parker Lougheed  Update package:lints to v3 (#3542)
  41f02622  2023-10-19  Sam Rawlins  Greatly simplify ModelCommentReference (#3541)
  50e4b679  2023-10-19  Sam Rawlins  Remove use of NodeLocator2 (#3538)
  b2de813c  2023-10-19  Sam Rawlins  Remove support for deprecated leading new in comment references (#3529)
  b350c688  2023-10-19  Sam Rawlins  Bump to 7.0.1 (#3540)
  5256e2fb  2023-10-19  Sam Rawlins  Remove unused warnings (#3533)

lints (975c687..2cf8403):
  2cf8403  2023-10-23  Devon Carew  add no_wildcard_variable_uses; rev to a new major version (#165)
  7b0f556  2023-10-23  Parker Lougheed  Remove mention of no_wildcard_variable_uses from changelog (#164)

matcher (356e5f6..7512f80):
  7512f80  2023-10-23  Michael Goderbauer  Specify language in neverCalled docs for nicer formatting in docs (#230)

protobuf (050c162..3528fad):
  3528fad  2023-10-24  Ömer Sinan Ağacan  Use `setRange` when copying output chunks to the final buffer in `CodedBufferWriter` (#887)

tools (15cc9c7..da6bb18):
  da6bb18  2023-10-24  Elias Yishak  Enum + event constructors added for doctor events (#178)
  e3dd149  2023-10-24  Elias Yishak  Use futures list internally to manage send events (#184)

webdev (1bd434b..6e324af):
  6e324afb  2023-10-24  Ben Konyi  Add dependency on `package:vm_service_interface` (#2262)
  8429a79f  2023-10-20  Elliott Brooks  Only notify chatroom when daily stable testing fails (#2259)
  3463d169  2023-10-19  Elliott Brooks  Remove Chrome 115 extension error (#2258)
  fdebc06e  2023-10-19  Elliott Brooks  Reset Webdev to 3.2.0-wip after release (#2260)
  9cffb896  2023-10-19  Elliott Brooks  Reset DWDS to 22.1.0-wip after release (#2256)
  07c70c6c  2023-10-19  Elliott Brooks  Prepare Webdev for release to 3.1.0 (#2255)

Change-Id: Ieae3aadcc804a270867d7935b702987cf1f6d51c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332060
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-24 20:32:48 +00:00
Sam Rawlins a6edca6db7 Only report unnecessary_cast when the cast type is exactly the static type
Fixes https://github.com/dart-lang/sdk/issues/44411
Fixes https://github.com/dart-lang/sdk/issues/48984
Fixes https://github.com/dart-lang/sdk/issues/49269
Fixes https://github.com/dart-lang/sdk/issues/49550
Fixes https://github.com/dart-lang/sdk/issues/52086

The "prefer type annotations on local variables over upcasting" that this used to cover can be covered with a new lint rule: https://github.com/dart-lang/linter/issues/3786

Change-Id: I6a112732269e918a7faacc399bccebe13de8462d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-10-24 19:55:39 +00:00
Nate Bosch 7ba47c6040 Remove some now unnecessary casts
Flow analysis has improved and issue #40041 is resolved. These
`FutureOr<T>` conditionals are promoting to `Future<T>` or `T` and no
longer need an explicit cast.

R=lrn@google.com

Change-Id: I925db6d7f52aad54c88434ff02e1d0ae4e72278b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331206
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-10-24 19:09:22 +00:00
Ryan Macnak dbc43757d0 [vm] Fix Windows build.
TEST=build
Change-Id: If243f875127430e27dd2b8821be412ae71e430e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332001
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-24 18:35:04 +00:00
Ben Konyi d0df26e11e Update webdev to 6e324afb1802ce25428c72871beb9c8faa19d036
Change-Id: Ia41c8220bace69d020066bad91d064b0692a9e7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332020
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2023-10-24 18:10:13 +00:00
Danny Tuppeny 5e255e0110 [dds/dap] Switch to using isGetter isntead of checking _kind
Both VM and DWDS populate isGetter now so we don't need to check this internal field.

There are existing tests verifying this behaviour.

Change-Id: Ia0f0d74167c718ec66a692523c1f255d63eed654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330784
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-10-24 17:39:36 +00:00
Danny Tuppeny c5f60241a8 [dds/dap] Don't provide DAP sourceReferences for non-existing scripts
This adds a check that scripts exist before we create a sourceReference to assume we can download them.

I don't have a good way to test this (in the Dart SDK) because this never happens for Dart - we can always download the scripts. However this code is triggered in Flutter because of https://github.com/flutter/flutter/issues/128880 - we can't find the source so we will try to set it up for downloading.

Fixing that would avoid the need for this change (and make the behaviour more consistent with Dart), but in the meantime I think it's better that we don't produce sourceReferences for sources that don't exist.

Change-Id: I4de3f6e87fe3ff867a1ff7e6d3a5d79f7bf9fa1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330780
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-10-24 17:35:42 +00:00
Kenzie Schmoll 549c1eea11 Roll DevTools into SDK and bump to devtools_shared 5.0.0
Change-Id: I9c38d6be70816de14bb6b9818e6aa550b11c1a34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331748
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-10-24 17:09:20 +00:00
Keerti Parthasarathy 3c6ceb851a Add a pass to dart fix for pubspec changes
Fixes #48997

Change-Id: I543a550247920e121837f2bc6c75b5c1acecc670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331740
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-24 16:44:07 +00:00
Keerti Parthasarathy 0323445167 Add extension type support for create method fix
Bug:49741
Change-Id: I8687dbf3fe0532bd04163a42104bbdddd0d173fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331742
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-24 16:43:30 +00:00
Parker Lougheed cecb0cabd6 [bisect_dart] Enable further analysis for bisect_dart tool
I know this is just an unpublished tool, but enabling the expanded analysis at least makes the development experience consistent with other packages within `/pkg`.

Change-Id: Id4daf75cf37042662e3ab3c75dc4c4f856fd4099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329864
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-24 16:21:14 +00:00
Danny Tuppeny 0c91d4195e [analysis_server] Fix race condition in will_rename_files test
During this test, sometimes the refactor would complete before the overlay modification was processed, which means we don't get the expected failure response.

This isn't a server bug because the results are still consistent (and clients should discard any responses if a file was modified since the request was sent). This test was to ensure we handled the obvious cases of this in case the client did not handle it.

The fix is to artificially slow down the refactor to ensure the overlay change has time to execute before we check for consistency at the end.

Change-Id: I5697a73d7ca6dd7115dc6c0e87b8a93ba3cd533b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-24 16:13:02 +00:00
Konstantin Shcheglov 87e9a29d8d Macro. Introspect MethodDeclaration node.
Change-Id: I2d790cd82586db8686c92b30b7599c332b73a2be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-24 16:09:28 +00:00
Ryan Macnak 04f76e4601 [vm, ffi] Test for out-of-bounds access when marshalling structs by value.
TEST=ffi/function_struct_by_value_out_of_bounds_test
Bug: https://github.com/dart-lang/sdk/issues/53829
Change-Id: Ide6430f0daad6d5c8089439d2950c535c8f6497c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331745
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-24 15:50:18 +00:00
Ryan Macnak 378b9fcda4 [vm] More fixes for ARM64 MSVC.
TEST=--no-clang
Change-Id: I9e449ce5270adcf6254602c59a625ca9af3f1082
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331219
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-10-24 15:04:36 +00:00
Jonas Termansen f4f557345c [infra] Reland "Begin RBE Linux x64 support."
Bug: b/296994239
Change-Id: I179cc7729846885ee952d26082a1e615a46a30b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331923
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-24 14:36:19 +00:00
Chloe Stefantsova 439b79fb80 [cfe] Report contravariant type variable use in extension types
Closes https://github.com/dart-lang/sdk/issues/53803
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I348f6c84aa61eddae306faa96a560b4960724462
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331242
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-10-24 13:43:35 +00:00
Martin Kustermann f45815883e [gardening] Remove lib{,_2}/mirrors/typedef_test
This test has flaked on our CI but actually it's consistently failing
because we do not represent `typedef`s in a reflective way in the VM
since switching to kernel (because they used to be desguared on kernel
level).

So this has not been working for a long time, let's remove this test.

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

Change-Id: I36e8d8aee7a7736e8afc5741b01d10429ac0d7a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331941
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-10-24 12:17:03 +00:00
Ömer Sinan Ağacan 1b426ea6f8 [dart2wasm] Fix string array copy in UTF8 decoder
Bug introduced with [1] and broke the Flutter engine [2].

[1]: https://dart-review.googlesource.com/c/sdk/+/331187
[2]: https://github.com/flutter/flutter/issues/137120

Change-Id: I334db1bbf1440b53b7a7856f16a0e116d82efae5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331922
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-10-24 12:02:48 +00:00
Chloe Stefantsova 75920dd24b [cfe] Report error on trailing comma in extension type declarations
Part of https://github.com/dart-lang/sdk/issues/53625
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I793ef6329d99b1a4e829491f454f42c2ede941b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331185
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-10-24 11:59:22 +00:00
Chloe Stefantsova 67d45616c6 [cfe] Report error on bottom type used as representation type
Closes https://github.com/dart-lang/sdk/issues/53824
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I79776eb4f8b736f518898adff1078461895269f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-10-24 10:28:09 +00:00
Jens Johansen 216d98555c [CFE] Mark strong/extension_types/inherited_representation_field as semiFuzzFailureOnForceRebuildBodies
Closes https://github.com/dart-lang/sdk/issues/53805

Change-Id: I093d32a9b2a9fbf26fef475e18a1fb67d575758e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331880
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-10-24 10:01:58 +00:00
sgrekhov 5315b1dc6b [co19] Roll co19 to 5d40729f9d7e6c97d7449a7647e1aab6e76f1818
2023-10-23 sgrekhov22@gmail.com Fixes dart-lang/co19#2319. Fix roll failures (dart-lang/co19#2321)
2023-10-23 sgrekhov22@gmail.com dart-lang/co19#1400. [Extension types] Add more top types tests (dart-lang/co19#2322)
2023-10-18 sgrekhov22@gmail.com dart-lang/co19#1400. [Extension types] Add more superinterfaces tests (dart-lang/co19#2315)
2023-10-18 sgrekhov22@gmail.com dart-lang/co19#2291. Add more Link.createSync() tests. Part 2 (dart-lang/co19#2316)
2023-10-17 sgrekhov22@gmail.com Fixes dart-lang/co19#2304. Add more `Object` member tests (dart-lang/co19#2312)
2023-10-17 sgrekhov22@gmail.com dart-lang/co19#2313. Fix expected static type in upper_bound_A01_t05.dart (dart-lang/co19#2314)

Change-Id: Id5279b7bad5e45c7e8a5d2fa7cbffe49bd1b2093
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331860
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-24 09:24:32 +00:00
Chloe Stefantsova 9e36a864ee [cfe] Report errors on super formal parameters in extension types
Closes https://github.com/dart-lang/sdk/issues/53212
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I4f209ab220bb0a47328a60d91e66a891d8fc1362
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331048
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-10-24 08:43:39 +00:00
Devon Carew 4c59616508 [deps] rev package:protobuf
This brings in ~18 new commits:

c559fe5273..050c1620a9

Change-Id: I72fddb8feae2d794c890b4ada87b170f493738f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331743
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-23 21:21:30 +00:00
Paul Berry 6c9dbb35b5 Front end: fix promotion of fields accessed through mixin applications.
When a field is declared in a mixin, the front end creates a synthetic
getter in the mixin application class that gets the value of the mixed
in field. So if a piece of code accesses the mixed in field through
the mixin application class rather than through the mixin directly,
the resolved member is the synthetic getter rather than a field.

In order to ensure that the field remains promotable even if it is
accessed through the mixin application, the logic in
`OperationsCfe.isPropertyPromotable` needs to be changed so that it
doesn't treat these synthetic getters as non-promotable. The old logic
was essentially this:

1. If the property is not private, it's not promotable.

2. Otherwise, if the property is listed in
   `FieldNonPromotabilityInfo.fieldNameInfo`, it's not
   promotable. (This happens either if the property is not promotable
   for an intrinsic reason, such as being a non-final field or a
   concrete getter, or if it has the same name as a non-promotable
   property elsewhere in the library).

3. Otherwise, if the property is a getter that was lowered from an
   abstract field, it's promotable.

4. Otherwise, if the property is a getter that was lowered from a late
   field, it's promotable.

5. Otherwise, the property isn't promotable. (This was intended to
   cover the case where the property is an abstract getter
   declaration).

(Although conditions 3 and 4 were tested first, since they are more
efficient to test).

It turns out that once conditions 1-2 have been ruled out, the
property must have been declared as a method (which is being torn
off), a private abstract getter, or a (possibly abstract) non-external
private final field. Of these three possibilities, only the last is
promotable. So this can be simplified to:

(conditions 1-2 as above)

3. Otherwise, if the property is a method tear-off, it's not promotable.

4. Otherwise, if the property is an abstract getter, it's not promotable.

5. Otherwise, the property is promotable.

This makes the logic easier to follow, since conditions 1-4 are now
all reasons for non-promotability (rather than a mix of promotability
and non-promotability reasons). It also conveniently addresses the
problem with fields accessed through mixin applications, since they
aren't excluded by any of conditions 1-4.

(We still test conditions 3 and 4 first, since they are more efficient
to test.)

Fixes #53742.
Fixes #53617.
Fixes #53436.

Change-Id: I64df269c2a4a0714f9be239d832b61f4fb6a1a43
Bug: https://github.com/dart-lang/sdk/issues/53742
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330168
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-10-23 20:24:34 +00:00
Ben Konyi 51dde069b2 [ package:dds ] Prepare for 3.0.0 release
- Fixes typo in CHANGELOG.md
- Reverts vm_service version bump to ^12.0.0 as it's not needed for this
  breaking change

Change-Id: Ib9251dac0af4958d72fcb341490643bfe0f7a21a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331800
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-23 19:38:33 +00:00
Brian Quinlan 4122919684 Remove documentation that indicates that the maximum received datagram size is 64K.
Bug:https://github.com/dart-lang/sdk/issues/31733
CoreLibraryReviewExempt:documentation-only
Change-Id: Icde611deb9a0172a5caacf518e9ce01904baf8ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331422
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-10-23 19:37:40 +00:00
Sergey G. Grekhov 09fc3f9554 [io/doc] Improve Link.createSync() documentation
Change-Id: I70c593ca2b7f9ba6b7cc94886f622f4af5dd20fd
CoreLibraryReviewExempt: documentation update
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330620
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-10-23 19:15:57 +00:00
Konstantin Shcheglov 775500e9ac Macro. Refactor named vs other types.
Change-Id: Ia4b1d0be6d7299b4e06c8071d262e606b9d439c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331721
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-10-23 19:05:28 +00:00
Ömer Sinan Ağacan 405a03909c [dart2wasm] Optimize UTF8 decoder when decoding a native array
Intercept all `Utf8Decoder.convert` calls to check the input type and
call the right UTF8 decoder function.

This currently only optimizes `U8List` parsing, and only the fastest
path where the input is an ASCII string. Follow-up CLs will optimize JS
typed array parsing by calling browser's UTF8 decoder and the slow paths
of non-ASCII and malformed buffers.

Results from an internal benchmark extracted from a real use case:

Before:

    Parse(RunTime):     330,500 us.

After:

    Parse(RunTime):     90,310 us.  (-72%)

dart2js -O4 results of the same benchmark:

    Parse(RunTime):     234,250 us.

Change-Id: I470697a9eb516e1e031e9b865ddb29e8f25569bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331187
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
2023-10-23 18:36:52 +00:00
Stephen Adams 0a436b7005 Reapply "[typed_data] Deprecate UnmodifiableUint8ListView and friends"
This reverts commit 4918d3ef8c.

`@Deprecated` annotations have been commented out.

CoreLibraryReviewExempt: reviewed as https://dart-review.googlesource.com/c/sdk/+/321922
TEST=ci
Bug: #53785
Change-Id: I3239251c2aba5f188aa947f0ff0208271d6be5cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331741
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-10-23 18:14:33 +00:00
Ömer Sinan Ağacan fa7c42a84d [dart2wasm] Small optimizations and simplifications in string and convert patches
Change-Id: I3838f052cff13734cd5612785a5724454231be8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331183
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-10-23 18:08:22 +00:00
Danny Tuppeny 9e753794cb [analsysis_server] Fix missing types on record fields in LSP completion detail
Fixes https://github.com/Dart-Code/Dart-Code/issues/4788

Change-Id: Iaa57a5e486dac6c1978b8576b4855f8c3e8955f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330107
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-10-23 17:08:27 +00:00
Danny Tuppeny ae78a3d8e5 [analysis_server] Don't show private static members in completion outside of library
Fixes https://github.com/Dart-Code/Dart-Code/issues/4772

Change-Id: I5a033b7464c2325f4f5db309254392e0ec337d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329605
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-10-23 17:06:18 +00:00
Ben Konyi 08b4f49249 Split package:vm_service into package:vm_service and package:vm_service_interface
To reduce the headache associated with adding parameters to VM service
APIs, VmServiceInterface has been removed from package:vm_service and
pulled into its own dedicated package:vm_service_interface. This will
help reduce the need for major version bumps of package:vm_service,
which requires manual version bumps through >8 packages in order to make
the latest version available to flutter_tools and DevTools.

This separation of the VmService client from the interface will reduce
the frequency of major version bumps to `package:vm_service` as adding
optional parameters to existing APIs would cause implementers of the
interface to break.

package:vm_service continues to expose a copy of the contents of package:vm_service_interface to avoid breaking google3 rolls until package:dwds can migrate to package:vm_service_interface. package:vm_service will not be published until this copy is removed.

This change also includes:
 - some code cleanup and modernization to both the code generator and
   generated code
 - >=3.0.0 SDK version requirement to allow for new language features

Change-Id: Ib1859c1b4e153fef7ee1f91e67e881bbf42652c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330500
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-23 17:00:10 +00:00
Alexander Thomas d37620ed03 Revert "[infra] Begin RBE Linux x64 support."
This reverts commit 9a11fe517c.

Reason for revert: broke the build for some users.

Original change's description:
> [infra] Begin RBE Linux x64 support.
>
> Bug: b/296994239
> Change-Id: I0ddf9a1beb2996ac67b59779b8b8113432434786
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331282
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Jonas Termansen <sortie@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: b/296994239
Change-Id: Id70259b9357790581f11f105516ff0c6c63ab1ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331780
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-23 16:45:47 +00:00
Ryan Macnak 166ab61c4e [vm] Honor --disassemble_relative for adrp.
TEST=vm/dart/disassemble_determinism_test
Bug: https://github.com/dart-lang/sdk/issues/52967
Change-Id: Ibbe2a35d55fe4d97c57e1a73889a93a0a904a741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331580
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-23 16:45:39 +00:00
Derek Xu 4918d3ef8c Revert "[typed_data] Deprecate UnmodifiableUint8ListView and friends"
This reverts commit b657773d58.

Reason for revert: blocking Dart SDK -> Engine roll (https://github.com/flutter/flutter/issues/137054)

Original change's description:
> [typed_data] Deprecate UnmodifiableUint8ListView and friends
>
> This is the first of several steps to remove the unmodifiable views for typed data classes. The end goal is that dart2js has only one class implementing `Uint8List` so that `Uint8List` accesses can always be compiled down to JavaScript code that directly uses indexed property accesses (`a[i]`).
>
> This first step deprecates the unmodifiable view classes to help prevent their use in new code, and adds `asUnmodifiableView()` methods as a replacement for the small number of places that use the classes.
>
> The next steps (see #53785) are to remove uses of the unmodifiable view classes from the SDK. Once this is complete the classes themselves can be removed.
>
> TEST=ci
>
> Issue: #53218
> Issue: #53785
>
> Change-Id: I04d4feb0d9f1619e6eee65236e559f5e6adf2661
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321922
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Stephen Adams <sra@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Ömer Ağacan <omersa@google.com>

Issue: #53218
Issue: #53785
Change-Id: I0bb042269f9ff8e5cd69619cf97b60c79ea98cbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331680
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-10-23 15:03:25 +00:00
Danny Tuppeny 9f9d5045b4 [analysis_server] Don't send ranges on snippet completions if they're same as defaults
See https://github.com/dart-lang/sdk/issues/53501

Change-Id: Ia8956ab1477dcd5c4146cc3358477f43571defbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331280
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-23 15:01:37 +00:00
Jonas Termansen 9a11fe517c [infra] Begin RBE Linux x64 support.
Bug: b/296994239
Change-Id: I0ddf9a1beb2996ac67b59779b8b8113432434786
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331282
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-23 14:42:59 +00:00
Alexander Thomas c1bdc9bade [dartdev] Fix incorrect license header
Bug: b/286184681
Change-Id: Ia96e14d885a23e041a0bf96cb46976d90ec9228c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331285
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2023-10-23 13:58:20 +00:00
Vyacheslav Egorov 539ef1fe55 [vm] Fix synthetic line number program
This fixes off by one in the line number program
generation noticed when using perf-annotate.

We were not emitting the row covering last comments
and those rows were were emitting were slightly off.

TEST=profiled code and looked at perf-annotate output

Change-Id: Ia0fe2fa2c830a1be8f6a129c84af01755c19e59a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331284
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-23 13:54:04 +00:00
Alexander Thomas 565afe4237 [wasm_builder] Remove duplicate LICENSE file
The top level LICENSE file already covers wasm_builder and this is not
meant to be published separately from the Dart SDK right now.

Bug: b/286184681
Change-Id: Id11bdf5c4939a94e1074d94b803e3281f0d2c153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331049
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-10-23 12:16:14 +00:00