Commit graph

99712 commits

Author SHA1 Message Date
Derek Xu 60833d9cd9 [VM/Service] Update dart:io service extension spec
The main purpose of these changes is to make sure that the types in
package:http_profile are compatible with the interfaces in the spec.

See runtime/vm/service/service_extension.md and
pkg/vm_service/CHANGELOG.md for the full list of changes.

TEST=pkg/vm_service/test/get_http_profile_test.dart, DevTools tests

CoreLibraryReviewExempt: Only touches sdk/lib/io/network_profiling.dart
to update the version returned by the getVersion dart:io service
extension.
Change-Id: I1b9d0b7d43defbc857a2a8fde003012effd1ee15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341120
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-02-06 19:26:06 +00:00
Modestas Valauskas e8b20f66b2 Add DSP.
Closes https://github.com/dart-lang/sdk/pull/54781

GitOrigin-RevId: 10439cd7c0da0bc3803cd6f2cfc3133ddb75f087
Change-Id: I6e569b65509dd333daf5c3bb515709f0be03fa89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349408
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2024-02-06 19:07:13 +00:00
pq ba02dd9e2c remove deprecated resolve2
Internal references have been migrated.

Change-Id: I7db908c69127fea58f213a057b873b7b52a5e1f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-06 18:57:29 +00:00
Konstantin Shcheglov 8672f63387 Macro. Code optimizer. Update import directives.
Change-Id: I5599f243fd4ddcda046934b1584612b209d69815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350406
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-06 18:13:59 +00:00
Devon Carew f5da84570f [deps] rev args, async, bazel_worker, benchmark_harness, boolean_selector, browser_launcher, cli_util, clock, collection, convert, crypto, csslib, dartdoc, ecosystem, file, fixnum, glob, html, http_multi_server, http_parser, json_rpc_2, lints, logging, markdown, matcher, mime, mockito, native, package_config, path, pool, pub_semver, shelf, source_map_stack_trace, source_maps, source_span, sse, stack_trace, stream_channel, string_scanner, sync_http, term_glyph, test, test_descriptor, test_process, test_reflective_loader, tools, typed_data, usage, watcher, webkit_inspection_protocol, yaml, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (03386ba..7dc7fe0):
  7dc7fe0  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/args#263)

async (e83d054..24266ca):
  24266ca  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/async#266)

bazel_worker (3d9cd58..372b8b5):
  372b8b5  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/bazel_worker#85)

benchmark_harness (a62e416..c8a0c8b):
  c8a0c8b  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/benchmark_harness#99)

boolean_selector (caea8d4..be88351):
  be88351  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/boolean_selector#56)

browser_launcher (c68ec25..74a0efe):
  74a0efe  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/browser_launcher#54)

cli_util (e5b38ac..ffeb5d2):
  ffeb5d2  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/cli_util#97)

clock (f975668..daf0fad):
  daf0fad  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/clock#60)

collection (2d57a82..fc616ff):
  fc616ff  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/collection#334)
  1aff3be  2024-02-01  Kevin Moore  Test on dart2wasm (dart-lang/collection#333)

convert (f8a72d6..d4d6368):
  d4d6368  2024-02-01  Kevin Moore  Test dart2wasm (dart-lang/convert#101)
  48642c5  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/convert#100)

crypto (f2efb98..c954015):
  c954015  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/crypto#161)

csslib (ec86ee5..62ae85e):
  62ae85e  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/csslib#196)

dartdoc (5cac62b..457c34e):
  457c34ec  2024-02-05  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.1 to 1.6.2 (dart-lang/dartdoc#3646)
  2665e44b  2024-02-05  Parker Lougheed  A few minor documentation updates (dart-lang/dartdoc#3641)
  69ca6a80  2024-01-31  Daco Harkes  Roll analyzer and release 8.0.5 (dart-lang/dartdoc#3644)

ecosystem (9ee08a4..7d8ec47):
  7d8ec47  2024-02-02  Moritz  Checkout submodules for auto-publishing (dart-lang/ecosystem#236)
  878fee1  2024-02-01  dependabot[bot]  Bump actions/download-artifact from 4.1.0 to 4.1.1 (dart-lang/ecosystem#233)
  1be1df3  2024-02-01  dependabot[bot]  Bump actions/cache from 3.3.2 to 4.0.0 (dart-lang/ecosystem#231)
  c2731dc  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/ecosystem#234)
  f347760  2024-02-01  dependabot[bot]  Bump peter-evans/create-or-update-comment (dart-lang/ecosystem#235)
  da68dbc  2024-02-01  dependabot[bot]  Bump peter-evans/find-comment (dart-lang/ecosystem#232)

file (cd3a932..3aa0649):
  3aa0649  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (google/file.dart#235)

fixnum (3e08c0d..570b28a):
  570b28a  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/fixnum#124)

glob (7c9a121..ef5f065):
  ef5f065  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/glob#87)

html (910f6d7..327e37a):
  327e37a  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.1 to 1.6.2 (dart-lang/html#237)

http_multi_server (491f7c6..ba9d07f):
  ba9d07f  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.1 to 1.6.2 (dart-lang/http_multi_server#64)

http_parser (224c1a9..84db8b0):
  84db8b0  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/http_parser#86)
  fea0cf2  2024-02-01  Kevin Moore  Test dart2wasm (dart-lang/http_parser#85)

json_rpc_2 (ac1fabd..639857b):
  639857b  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/json_rpc_2#109)

lints (3810f8b..90a61e4):
  90a61e4  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/lints#176)

logging (e04942d..cbaf4ee):
  cbaf4ee  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.1 to 1.6.2 (dart-lang/logging#157)

markdown (a8288ca..c2b8429):
  c2b8429  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/markdown#580)

matcher (d9cf4f6..d954c8d):
  d954c8d  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/matcher#241)

mime (99fbdcc..9a16871):
  9a16871  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/mime#115)

mockito (0422551..7d6632f):
  7d6632f  2024-02-05  Oleh Prypin  Sort `import` directives in all *.dart code

native (0eafd54..876f9a1):
  876f9a19  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/native#958)

package_config (5a0bc19..4a7042b):
  4a7042b  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/package_config#146)

path (57a049c..a7b6960):
  a7b6960  2024-02-01  Kevin Moore  Test on dart2wasm (dart-lang/path#159)
  7e74cc9  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/path#158)

pool (4c49000..782da82):
  782da82  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/pool#80)

pub_semver (4572181..3175ba0):
  3175ba0  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/pub_semver#98)

shelf (823966f..b432620):
  b432620  2024-02-01  dependabot[bot]  Bump actions/cache from 3.3.2 to 4.0.0 (dart-lang/shelf#406)
  0f88f26  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/shelf#405)

source_map_stack_trace (2209626..c756496):
  c756496  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/source_map_stack_trace#46)

source_maps (87dc587..55e92a4):
  55e92a4  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/source_maps#86)

source_span (9398e24..21a403a):
  21a403a  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/source_span#107)

sse (8d2e2f0..e483b14):
  e483b14  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/sse#101)

stack_trace (0f4710c..155f12c):
  155f12c  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/stack_trace#149)

stream_channel (178104d..851336f):
  851336f  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/stream_channel#99)

string_scanner (ebc30a3..a2bcdb5):
  a2bcdb5  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/string_scanner#68)

sync_http (f96db95..b849559):
  b849559  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/sync_http#43)

term_glyph (4c5a496..85a4aa6):
  85a4aa6  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/term_glyph#47)

test (6700049..a3f05ec):
  a3f05ec8  2024-02-01  dependabot[bot]  Bump actions/cache from 3.3.2 to 4.0.0 (dart-lang/test#2181)
  dadf801e  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/test#2182)
  0d1c20c6  2024-02-01  dependabot[bot]  Bump actions/upload-artifact from 4.0.0 to 4.3.0 (dart-lang/test#2179)
  aa296b33  2024-02-01  dependabot[bot]  Bump github/codeql-action from 3.22.12 to 3.23.2 (dart-lang/test#2180)

test_descriptor (59ce97f..35f97af):
  35f97af  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/test_descriptor#61)

test_process (d68de5b..7fe39af):
  7fe39af  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/test_process#53)

test_reflective_loader (6edf535..9862703):
  9862703  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/test_reflective_loader#57)

tools (f6e67f2..2ef7673):
  2ef7673  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/tools#231)

typed_data (6f6d81d..375efaa):
  375efaa  2024-02-01  Kevin Moore  Test dart2wasm (dart-lang/typed_data#80)
  c6bb459  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/typed_data#79)

usage (e99690a..67ecd7d):
  67ecd7d  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/usage#202)

watcher (66cd694..21858a4):
  21858a4  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/watcher#162)

webkit_inspection_protocol (667c55e..07295b9):
  07295b9  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (google/webkit_inspection_protocol.dart#119)
  39d264b  2024-02-01  dependabot[bot]  Bump nanasess/setup-chromedriver (google/webkit_inspection_protocol.dart#118)

yaml (509fd72..e598443):
  e598443  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/yaml#157)

yaml_edit (47eb20e..2a9a11b):
  2a9a11b  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/yaml_edit#64)

Change-Id: I9dd87b6d8d77e99a2a6f66f6ef6d8582da18368b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-02-06 17:41:18 +00:00
David Morgan f367d1e107 [macros] Add DiagnosticException that macro implementations can throw to report a diagnostic.
R=jakemac@google.com

Change-Id: I7546aa84f3e0b8423465dcb49d90a89df9231b84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-02-06 17:32:14 +00:00
Ben Konyi f4b1d59461 [ Gardening ] Fix pkg/vm_service/test/get_supported_protocols_with_dds on AOT
Fixes https://github.com/dart-lang/sdk/issues/54835

Change-Id: I1dc0c585214e8001dfb6f2f0d8f3f07252bf56f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350660
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-06 17:23:32 +00:00
Konstantin Shcheglov 6d4204e3f5 Legacy. Remove toLegacyElement()
Change-Id: Ic9bad044fd72b5d43fa67a3a727b91edef708fda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350348
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-06 17:17:10 +00:00
pq b7e1eaafc6 remove unneeded FeatureSetProvider field
Change-Id: I61aa0136b5ef8e14b1b9ab1eac661219ad79a2cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350346
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-06 17:07:28 +00:00
Konstantin Shcheglov 0d3910fca3 Macro. Code optimizer. Consider library declarations, pass ScannerConfiguration.
Change-Id: Ibe9ef926d6c2527493e7f3729c1e29e4cc6b3f3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350405
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-06 17:03:18 +00:00
Polina Cherkasova 166c796179 Implement toChunks and allow optimization.
1. Implement HeapSnapshotGraph.toChunks
2. Add parameter calculateReferrers, to allow to skip calculation of referrers, when they are not needed.

Change-Id: I312f01f1527e6b2bf4c8ddce6017ca6c53c8dd3a
CoreLibraryReviewExempt: minor dart:io documentation change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348802
Commit-Queue: Polina Cherkasova <polinach@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-02-06 16:55:20 +00:00
Sigurd Meldgaard 80bec68bf9 Bump pub to 4ab2e3663f0a98be40427e004e789caebf3ea72e
Changes:
```
> git log --format="%C(auto) %h %s" a3689f0..4ab2e36
 https://dart.googlesource.com/pub.git/+/4ab2e366 Allow publishing to and from a .tar.gz archive (4119)
 https://dart.googlesource.com/pub.git/+/a2aff995 Remove nullability of parameter (4129)
 https://dart.googlesource.com/pub.git/+/a0e89c67 Remove unused files (4126)
 https://dart.googlesource.com/pub.git/+/5a8cd05e Allow ignoring advisory with id specified in the 'aliases' list (4125)
 https://dart.googlesource.com/pub.git/+/0f336198 Move packageConfigFile() to entrypoint.dart (4124)
 https://dart.googlesource.com/pub.git/+/267eff5d Tighten dependency constraints (4114)
 https://dart.googlesource.com/pub.git/+/11a94ef5 Small fixes to repository-spec-v2.md (4123)
 https://dart.googlesource.com/pub.git/+/6bcd7e8e Remove unnecessary imports of 'package:collection' `IterableExtension` (4121)
 https://dart.googlesource.com/pub.git/+/7ce24743 Use atomic moves when cloning git repos (4120)
 https://dart.googlesource.com/pub.git/+/1ec6fd5e Don't touch package_config.json when not needed (4107)
 https://dart.googlesource.com/pub.git/+/e9727d91 Fix path-matching expression in validators (4116)
 https://dart.googlesource.com/pub.git/+/dce232ec Read flutter version from new location (4113)
 https://dart.googlesource.com/pub.git/+/23edb452 Small cleanup in versionListing handling (4105)
 https://dart.googlesource.com/pub.git/+/d0178042 Add security advisory test (4106)

```

Diff: https://dart.googlesource.com/pub.git/+/a3689f03168c896dd1cb0db8a60c568b38ee16bf..4ab2e3663f0a98be40427e004e789caebf3ea72e/
Change-Id: I92f9e6d50d18ee12d106cf5c48118caf6c1f988e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349740
Reviewed-by: Sarah Zakarias <zarah@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2024-02-06 14:49:38 +00:00
Jake Macdonald d5830c1a68 [macros] check that fromJson and toJson methods are valid
I also formatted this file, since you can do that now :)

Change-Id: I7e7ad586cb4ba31f42a873a362d8099d1576e608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350480
Commit-Queue: Morgan :) <davidmorgan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
2024-02-06 11:09:46 +00:00
Chloe Stefantsova 72860d3569 [cfe] Use declaredNullability to carry over in type substitutions
Previously we would use the value of the `nullability` getter as
the carry over nullablity for the substituted type. This CL changes
that to `declaredNullability`. The change is observable in
substituted extension types: their `nullability` is a combination
of the representation type nullability and the declared nullability,
and its value range includes `Nullability.undetermined`, which should
not be available for `ExtensionType.declaredNullability`.

The unexpected value for `ExtensionType.declaredNullability` was
detected by the assert in
`_NullabilityMarkerDetector.visitExtensionType`.

Change-Id: I38f81df57db18ec94f2f6422134c02efe6649be6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350323
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-02-06 10:22:50 +00:00
David Morgan 402f85662d [macros] Report MacroException thrown during macro execution separately from diagnostics.
Change-Id: I2abf846e98479cf4d5d317127bbfe387393b142a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349482
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-02-06 09:55:28 +00:00
Parker Lougheed c11af25403 [vm] Update @ResourceIdentifier check to account for source library
As otherwise another class used as an annotation could be mistakenly accounted for here.

TEST=pkg/vm/testcases/transformations/resource_identifier/different.dart
Change-Id: I39f6dd60f8bb4077b40ef5e999a7c9f28f70eb82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350361
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-02-06 09:41:20 +00:00
Konstantin Shcheglov fe0e0775c2 Legacy. Deprecate LibraryElement.isNonNullableByDefault
Change-Id: I1b15c59960aa7eb4d27c221febc857a974bae738
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-06 01:19:09 +00:00
Keerti Parthasarathy df52948967 [data driven fix] Add more information to matcher for property
accessors.

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

Change-Id: Ia8bf540b157594a3400bb5c567b5a4c4886520ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350400
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-05 23:32:50 +00:00
Konstantin Shcheglov 00be96e511 Macro. Add comments for macro diagnostics.
Change-Id: Ib01e2c43c4fe374cfe3aa38ff2b0c029c0d9adb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350403
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 23:04:19 +00:00
Konstantin Shcheglov 4dfb2056c0 Legacy. Stop using isNonNullableByDefault in analysis_server/
Change-Id: I10592f99d48877e93fababba2149c39a38f75cc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350460
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-05 22:46:26 +00:00
Konstantin Shcheglov 05d7c407cf Macro. Code optimizer. Verify the stack, handle more shadowing or not.
Change-Id: Idd8447ca5f42c7fbb55f20eb4d75c3f0159be09d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350401
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 22:41:01 +00:00
Martin Kustermann 1c5e12c212 [dart2wasm] Fix int.parse(<str>) for when <str> is a JSString
The `int.parse()` function would - if radix is provided and not 10 - use
functions that `unsafeCast<StringBase>()`.

=> The string can be a JSString.

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

CoreLibraryReviewExempt: Adding test that should pass on all backends.
Change-Id: Ie6efa5bc545cadce5ea946e2c1d732b2cf94e306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350303
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-05 22:38:18 +00:00
Danny Tuppeny 7e8ba2a708 [analysis_server] Fix "Move Top Level" when multi-selection includes an unnamed extension
Fixes https://github.com/dart-lang/sdk/issues/53888

Change-Id: I034473d3a37b835c5dd81b76950b4b46d2cbc59d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332428
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-05 22:32:58 +00:00
Konstantin Shcheglov 8473e65472 Legacy. Update TypePropertyResolver.
Change-Id: Ia35e1c388102d34874e429afac7ad1720871e429
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350402
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 22:19:57 +00:00
Ben Konyi 8338fc2eac [ package:vm_service ] Migrate some more tests from service/
Change-Id: I009b9ae97fb5eaeebc4bddb3813d83562302d0ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349560
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-05 22:17:27 +00:00
Konstantin Shcheglov 83aca6c5c2 Legacy. Remove 'typeProvider' from Member.
Change-Id: Ic6dbadc6d3ce93e4dc57490dd5b921f81875a648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350345
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 22:09:41 +00:00
pq 624a7b742c make SharedOptionsOptionsMap private
Change-Id: I21bf7f48af568626ded1aa0b885c02b92c514a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-05 22:08:31 +00:00
Konstantin Shcheglov 9008b2575d Print 'docImports' in AnalyzerStatePrinter, tweaks for namings.
Change-Id: I3459009c6dcfd5daa308ab3aa5352d43036d936b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350164
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
2024-02-05 22:01:39 +00:00
Konstantin Shcheglov baf84040e1 [CMSR] Initial support for super formal parameters.
There are still holes for already `super.positional` in the target
constructor, and constructors that invoke it.

Change-Id: I5bd7d93947b1792c05a41c7b51426a8f7b589bca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 22:00:27 +00:00
Konstantin Shcheglov 90d41f4f2f Macro. Report MACRO_INTERNAL_EXCEPTION.
Change-Id: Id6bd284f67ef7b24bf234451713eb57646b8332b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-05 21:45:38 +00:00
Martin Kustermann cca3ffd278 [dart2wasm] Ensure we convert Dart string *once* to JS string in regexp matching
Improves the third_party/pkg/crypto/test/sha1_test.dart by 100x

Change-Id: I16f0d75a43acd15642b4a62c9bba97f3479efb03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350322
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-02-05 21:32:29 +00:00
Chingjun Lau bb94c1265c Update comment about debugSdkLibraries and debugExternalPackageLibraries.
According to
https://dart.googlesource.com/sdk/+/7512050101f25530824db6200f4770ed8f083251/pkg/dds/lib/src/dap/adapters/dart.dart#2527,
these two fields are `true` by default.

Change-Id: I085649e45bbf4a0837353674e179a376485cf665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349626
Auto-Submit: Chingjun Lau <chingjun@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
2024-02-05 21:10:49 +00:00
Vyacheslav Egorov 0ea5013250 [vm] Respect catchError attached to the last async frame.
Our async unwinding code used to only respect `catchError`
which occured between async frames and ignored trailing
`catchError` like in the code below

    Future(...).catchError((_) { /* handle error */ });

This CL also simplifies how we communicate the presence of the
exception handler to the debugger: the code in the debugger did
not actually care about which frame catches the error (for async
handlers), so we don't need to precisely mark async gaps with
`has_catch_error` flag. Instead we have a single boolean
produced by unwinding which signals whether there we encountered
an asynchronous error handler or not.

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

TEST=service/pause_on_unhandled_async_exceptions5

Change-Id: Id6f6a97ee5444c197b2c621f68d1e47082fc8997
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350320
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-02-05 21:09:38 +00:00
Konstantin Shcheglov 13bc0f57d6 Legacy. Remove Member.isLegacy
Change-Id: I28a63110b7b2895f55f7dd93dc0950c743b95648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350141
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 21:02:45 +00:00
Konstantin Shcheglov 648e43e34e Legacy. Deprecate LibraryElement.toLegacyElementIfOptOut
Change-Id: I2dceca5c2f0a5771a8f6aff79db3e32a7fa8993c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349984
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 20:55:49 +00:00
Konstantin Shcheglov e933cf570d Legacy. Remove NeverTypeImpl.instanceLegacy
Change-Id: I34629572aad2b0bb2f1d2a36e9bda50160c5089f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350140
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 20:54:42 +00:00
Kallen Tu a8b6f23906 [test_runner] Add readable-type-strings to requirements features.
Adds `readableTypeStrings` feature.
Configurations where `Type.toString` is expected to show the original type name and original names in function type named parameters will have this feature.

Exceptions are dart2js-prod, dart2js-minified, and vm-obfuscated configurations.

Change-Id: I5423bc31afd586733c6249519f030f7152ac4fc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349460
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-02-05 20:47:14 +00:00
Konstantin Shcheglov 51a1c29f40 Legacy. Remove TypeSystemImpl.nonNullifyLegacy, simplify the visitor, clients.
Change-Id: I8a284aff4264fd9d6b0eb6283c59540476c54148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349983
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-05 20:46:39 +00:00
Konstantin Shcheglov fe16f0ed0c Legacy. Remove most '_isNonNullableByDefault' and their uses.
Change-Id: I299944248dabc356b0668684c09cc7a8ad53011b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350100
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-05 20:37:48 +00:00
Danny Tuppeny 2bf9fefa90 [analyzer] Move convertPath from MemoryResourceProvider to an extension
+ make the implementation of ResourceProviderMixin methods not depend on MemoryResourceProvider.

This is a step towards being able to share more code between tests that use different kinds of ResourceProviders. Although ResourceProviderMixin  currently still has a MemoryResourceProvider, all of the methods themselves can work against any ResourceProvider.

convertPath was moved to an extension in test_utilities (rather than to the base ResourceProvider) because it seems quite test-specific (it assumes any absolute paths are relative to drive C - something we'll need to update to use for non-memory tests.

Change-Id: Ibb3cfb31ebbdac6410868f0395bd19f9ce7b0e18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-05 19:16:23 +00:00
Ben Konyi 3495a21fc8 [ CLI ] Don't strip specific flags from argument list
Arguments matching the following patterns were being removed from the
argument list before being processed by DartDev's argument parser:

 --observe
 --enable-vm-service
 --devtools

This was due to these arguments having non-standard formats that caused
parsing issues in the past. However, these arguments are now completely
parsed by the VM and not actually decoded in the CLI, so there's no need
to blindly remove them. This was causing issues when passing arguments
to user processes (e.g., `dart run foo.dart --devtools-port` would drop
the `--devtools-port` argument due to this logic).

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

Change-Id: I09358d7f5004483ad3b457ba74229c940d9a0d75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350360
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-05 19:12:50 +00:00
Konstantin Shcheglov 8d1a8ada6b Macro. Code optimizer, 0-th version.
I don't try to be even close to be correct here, but this is the base
on top of which I'd like to build the full implementation.

The idea is that we scan, and implement parser listener that builds
prefixed name in scopes. We fill scope with declarations as we find them. Using these scopes we can decide which import prefixes can be removed.

As usually for shared code, clients will implement abstract methods in the client specific way.

We might get a hierarchy of `Edit` objects, such as `RemoveImportPrefix` and `RemoveImportDirective` because at least in the analyzer we might need to apply some changes to the element models (metadata, constants).

Change-Id: I153259d87a09ab070f37192ae64ccd8da36e2d41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350260
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 18:50:10 +00:00
pq bfc6198245 limit displayed options to ones for current context root
Fixes: https://github.com/dart-lang/sdk/issues/54816

Change-Id: I49c12b3aae14d6770da9700e52ac93804622f5d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-05 18:01:41 +00:00
Danny Tuppeny 0390b7d0e0 [dds/dap] Remove unwanted non-null assertion + add some TODOs
This non-null assertion is an error. If any URIs are returned from the VM that are not `file://` URIs and also return `false` from `isResolvableUri` then this would fail, even though the return values allow `null`s and should be used.

I can't currently write a test for this because in theory there aren't any cases where would actually happen, but I triggered it due to another bug (https://github.com/dart-lang/sdk/issues/54824) and think it's better removed.

Also added some TODOs about some behaviour that may need to change as macro support progresses (it's not far enough for me to make these changes yet).

Change-Id: I4108963b6b88bbbff4bb47f69909391900b5d3ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350300
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-05 17:51:30 +00:00
Konstantin Shcheglov 6723dad825 Macro. De-duplicate walking augmentations.
Change-Id: I09f209b2d52ca31e9486d1701690285888d04cbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350181
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 17:41:13 +00:00
Konstantin Shcheglov a10b584b68 Macro. Report MACRO_APPLICATION_ARGUMENT_ERROR.
Change-Id: I81a65a0f9d5f40c4c630674e0957f01fa9c2c44d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350162
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-05 17:40:39 +00:00
Keerti Parthasarathy 11e4f4574f Reland Workspace changes.
Fix lints that were showing up in flutter code.

Change-Id: Id5e2cbae347fd2c5d73418ce5af6ce579b62e1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349629
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-02-05 17:33:09 +00:00
Konstantin Shcheglov 43a60fe0a1 Extension type. Issue 54802. Use extensionTypeErasure to decide if use super default value.
Bug: https://github.com/dart-lang/sdk/issues/54802
Change-Id: I01984f6db0ff61d5b24a1363feeb4185e64d31ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350160
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 17:32:23 +00:00
Konstantin Shcheglov 9cca4a1c5e ErrorReporter. Use 'contextMessages' name.
This parameter used to be positional, so name did not matter.
But now it dos.

Change-Id: I1c76c2a3958523299ff9361d299fa449eace9441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350161
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-05 17:24:28 +00:00
Konstantin Shcheglov 82d5f07d59 Use writeEnum/readEnum instead of raw constants.
Change-Id: I77ef3e7182d319b0b2bf7f3dd91c77a2ec1926c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350120
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-05 17:24:20 +00:00