Commit Graph

107612 Commits

Author SHA1 Message Date
Nate Biggs e3e82c95cb [dart2wasm] Skip constructor entrypoints of dynamic callable anonymous mixins constructors.
These mixin constructors are now marked callable by the dynamic interface annotator: https://dart-review.googlesource.com/c/sdk/+/430002

However, they are not directly invokeable and trying to compile the constructor entrypoints causes dart2wasm to crash. So we explicitly skip them when considering dynamic callable constructors.

Note: This is blocking internal rolls as code patterns like this show up in our internal codebase.

Change-Id: I76383aec07bc53a0dbd1581c0577cba370d956f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430801
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Auto-Submit: Nate Biggs <natebiggs@google.com>
2025-05-23 15:37:33 -07:00
Devon Carew 3938cf634c Bump protobuf to d940c8de905439e292770ccf6c546477ae566462
Changes:
```
> git log --format="%C(auto) %h %s" deda288..d940c8d
 https://dart.googlesource.com/protobuf.git/+/d940c8d Update the generated code to improve readability and to better follow common Dart patterns. (1003)
 https://dart.googlesource.com/protobuf.git/+/ce05559 no longer generate empty enum or server files (1006)
 https://dart.googlesource.com/protobuf.git/+/976ebb8 add a script to update the vendored protos (1004)
 https://dart.googlesource.com/protobuf.git/+/c8954ea Refactor the vendored protos (1000)

```

Diff: https://dart.googlesource.com/protobuf.git/+/deda2883eb3c8437a89bdae524b732fffef6150c..d940c8de905439e292770ccf6c546477ae566462/
Change-Id: Ice01632fd6d2e1bfa9b0b175a2d26252f28fb833
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2025-05-23 14:59:41 -07:00
Keerti Parthasarathy eb9cc6f5c9 Remove duplicate logic in KeywordHelper
Change-Id: I32e7643f785228b99961e50bc2380bdcdffca1d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430881
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-23 13:32:00 -07:00
Roy c9ba43db45 [vm] Adding static_field_offset to Field objects.
This adds the offset of static fields within their field table.

TEST=vm/dart/analyze_snapshot_binary_test

Change-Id: I90b13760fa3203ca2e3c5611e3fd890a74c97728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429880
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-05-23 12:45:41 -07:00
Alexander Aprelev 0f34fdde1d [gardening] Skip isolate_group_shared_callback_test on hot reload bots.
The test in reload is very slow in "--shared_slow_path_triggers_gc" configuration.

Fixes https://github.com/dart-lang/sdk/issues/60758
TEST=ci

Change-Id: I16e9ff1de273464a866db6db8fa839b7aa03dca8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430882
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-05-23 11:14:31 -07:00
Sam Rawlins b0b74b2810 Rename some loose ends w.r.t. "errorSeverity"
Change-Id: Id68fcd8bbbe45a95a294fd557ee4556c2af5c4c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430548
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-23 10:36:28 -07:00
Jake Macdonald 611d5a8a7c Bump tools to be0bd20c803377063c45904512f272fdda94e8c3
Changes:
```
> git log --format="%C(auto) %h %s" 36f5c9f..be0bd20
 https://dart.googlesource.com/tools.git/+/be0bd20c8 add an issue template for package:process (2099)
 https://dart.googlesource.com/tools.git/+/30ba94606 have package:lints use package:lints/recommended (2098)
 https://dart.googlesource.com/tools.git/+/694e25e0c Add package:process (2097)
 https://dart.googlesource.com/tools.git/+/55054d644 [benchmark_harness]: add a bench command (2091)
 https://dart.googlesource.com/tools.git/+/8f81c82a6 [benchmark_harness] Move Measure into its on lib (2092)

```

Diff: https://dart.googlesource.com/tools.git/+/36f5c9f9989e06e79323499914c50e78ab1a6621..be0bd20c803377063c45904512f272fdda94e8c3/
Change-Id: I23b90cc93240b84495d264568311471068405ede
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430460
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2025-05-23 10:30:21 -07:00
Konstantin Shcheglov 19e911349f Fine. Fix for requirements on instance/interface elements with missing names.
Change-Id: Ide320ccc1bd146aba60a0d2bced405fc2612a027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-05-23 10:28:24 -07:00
Brian Wilkerson 2545c3eb31 Remove three more uses of NodeLocator2
Change-Id: I3e8fba0516bb0988ca0794991e980157dacb7231
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430860
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-05-23 10:22:17 -07:00
Konstantin Shcheglov d5e914ad09 Elements. Fix InstanceElementImpl2.name3, return firstFragment.name2, nullable.
Change-Id: Idd7239c1be692219f1f1ba735f475fe0141c0c6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430821
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-23 10:20:20 -07:00
Sam Rawlins 823b6668f6 analyzer: Rename ErrorSeverityTest to DiagnosticSeverityTest
Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: I1361a28834cb95a8b7ad9f131132b7b77e888483
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430547
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-05-23 10:14:14 -07:00
Sam Rawlins 43e01310a4 analyzer_testing: Rename PubPackageResolutionTest.ignoredErrorCodes to ignoredDiagnosticCodes
Change-Id: I0a951ecbf8aa74d1c00df99e0f5bdab84bb00dde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430542
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-05-23 10:12:18 -07:00
Nate Biggs 9585877f18 Update Chrome and Firefox versions.
Chrome: 137.0.7151.40
Firefox: 138.0.4
Change-Id: I9251c10255fa86da8ad710757de324fb1e6cd678
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430840
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2025-05-23 09:45:24 -07:00
Kallen Tu 448c8aed6a [analyzer] Dot shorthands: Additional unit test for AMBIGUOUS_IMPORT.
Added a small unit test to make sure AMBIGUOUS_IMPORT with dot shorthands still produces the expected errors.

Bug: https://github.com/dart-lang/sdk/issues/59835
Change-Id: Ife115bfb1fd34f396c5b3d00cb4f4d75e933e963
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430562
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-05-23 09:32:50 -07:00
Alexander Aprelev 24211892c8 [gardening] Mark pkg/test_runner/test/update_error_cmdline_test Slow.
Fixes https://github.com/dart-lang/sdk/issues/60534
TEST=ci

Change-Id: Ia6786e83111250c627d95e901902a045cc548fe1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430820
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-05-23 09:16:26 -07:00
Daco Harkes dad805d596 [deps] Roll dart-lang/native
Change-Id: I3c6dfc3ca5a2b2059a3bb0805e16cdeee93d19fa
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430780
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-05-23 08:46:50 -07:00
Nate Biggs cd3f2fb270 [dart2wasm] Add dynamic modules subtyping test.
Tests that types defined fully with dynamic modules type check correctly.

In WASM this ensures that the class ID ranges used for the type checks are correct.

Change-Id: I22aa528599eb918062e198b878ba2b4cdc901a06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430620
Auto-Submit: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2025-05-23 08:28:51 -07:00
Konstantin Shcheglov 88e2419b0f Elements. Convert FunctionTypeImpl.parameters to List<FormalParameterElementMixin>.
Change-Id: Idfba32254b458c68f75618d276b824ad734e13ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430601
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-23 08:15:11 -07:00
Alexander Aprelev 6497b412e2 [vm/shared] Ensure dart mutator thread stack is walked during gc.
Fix asynchronous aspect of the test.

Fixes https://github.com/dart-lang/sdk/issues/60756
TEST=ci

Change-Id: Ife311d5663665e7fa6e8dd3977fc31f5ed22cc17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430580
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2025-05-23 07:23:22 -07:00
Tess Strickland 9a2234461a [vm] Use a non-native definition of the runtime function structure.
Attempting to use the native definition when available causes problems
when cross-compiling, and the original attempts to avoid this broke in
subtle ways. Instead, just make a non-native definition that mimics
the native definition and use that with reinterpret_casts when sending
uses of the non-native definition to Windows API calls that expect
a value of the native definition.

TEST=windows ci

Fixes: https://github.com/dart-lang/sdk/issues/60771
Change-Id: I347fcaf8cccd809a3d8e6f041cc7e360b0b8226e
Cq-Include-Trybots: luci.dart.try:vm-aot-win-release-arm64-try,vm-aot-win-release-x64-try,vm-win-release-arm64-try,vm-win-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,pkg-win-release-try,pkg-win-release-arm64-try,dart-sdk-win-try,dart-sdk-win-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430400
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-05-23 06:19:16 -07:00
Martin Kustermann 94a36d59ff [dart2wasm] Mark Closure.context as final
We also use the same variable to represent the type of the
context slot instead of repeating that type in several places.

Change-Id: Ia4d10db4781dfd78617d40279d37335eedeb7408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430760
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-05-23 06:02:14 -07:00
Martin Kustermann 26da655ddf [dart2wasm] Remove duplicate code to call references
Change-Id: I304729f6ed19a75de16ddced15b3f47f894e9c49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430740
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-05-23 05:38:08 -07:00
Jens Johansen 3deffabce1 [CFE] Update flutter_gallery_leak_tester to use flutter/dev/integration_tests/new_gallery
For a few months the "original" flutter gallery has had compile errors
and the weekly bot has been a lot slower (and doesn't really test the
default "advanced invalidation").

This updates the compile target to the one in
flutter/dev/integration_tests/new_gallery which doesn't have compile
time errors.

Change-Id: I59aa701700bc6b3530d73d9c0474dbff525288c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430700
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-05-23 04:50:30 -07:00
Ömer Ağacan 91374ffb12 [dart2wasm] Minify more errors
Transform front-end generated `throw` expressions (as indicated by the
kernel node's `forErrorHandling` flag) to error throwing functions that,
in minify mode, throw without details.

ACX demo sizes: (`-O2 --minify`)

- Before: 12,841,863 bytes
- After: 12,396,399 bytes
- Diff: -445,464 bytes, -3.46%

Issue: https://github.com/dart-lang/sdk/issues/60432
Change-Id: I3c0bfebd5a9cb460af312dafb63b5a0c9aeda22e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430380
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-05-23 03:31:36 -07:00
Chloe Stefantsova 561f2a3cff [model] Update DEPS to use new benchmark data for CFE subtype checks
Change-Id: Id428e294952f810ece7f83e8afad23db1c0f0d5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429981
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2025-05-23 01:57:10 -07:00
Chloe Stefantsova 00acecdfbe [model] Upate bench maker and parser for recent type system changes
This CL includes changes to BenchMaker and test type parser that
include recent developments in the DartType system, such as extension
types and record types, outstanding existing features, such as
typedefs, and recent changes in the CFE type model, such as structural
parameters.

Change-Id: I16ca13273e83de7942abad67b8a2b67146fb24bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430661
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-05-23 01:57:10 -07:00
Sergey G. Grekhov 0ecaf302b9 [co19] Roll co19 to fb20d2b17e35c8fda50ca367c8efc4fb3dab040b
2025-05-23 sgrekhov22@gmail.com dart-lang/co19#3182. Update augmenting_declarations_A04_*.dart (dart-lang/co19#3197)
2025-05-22 sgrekhov22@gmail.com dart-lang/co19#3182. Add application order tests (dart-lang/co19#3196)
2025-05-22 sgrekhov22@gmail.com dart-lang/co19#3182. Update augmenting_declarations_A01/02_*.dart tests (dart-lang/co19#3195)
2025-05-22 sgrekhov22@gmail.com dart-lang/co19#3182. Update type_inheritance_A04/5_t*.dart (dart-lang/co19#3194)
2025-05-22 sgrekhov22@gmail.com dart-lang/co19#3182. Update type_inheritance_A02/3_t*.dart (dart-lang/co19#3193)
2025-05-22 sgrekhov22@gmail.com dart-lang/co19#3057. Add "diamond" inheritance case to promotion via assignment tests (dart-lang/co19#3179)
2025-05-20 sgrekhov22@gmail.com dart-lang/co19#3182. Update type_inheritance_A01_* tests (dart-lang/co19#3191)
2025-05-20 sgrekhov22@gmail.com dart-lang/co19#3182. Update scoping tests (dart-lang/co19#3190)
2025-05-20 sgrekhov22@gmail.com dart-lang/co19#3182. Add enums and extensions tests (dart-lang/co19#3189)
2025-05-19 sgrekhov22@gmail.com dart-lang/co19#3182. Remove `augmented` expression tests (dart-lang/co19#3188)
2025-05-16 sgrekhov22@gmail.com dart-lang/co19#3057. Add promotion via type test tests. Check top and bottom types and Null (dart-lang/co19#3165)

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Change-Id: I0720274d910fb4e1385efeb038080995b35656f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430660
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2025-05-23 01:27:16 -07:00
Johnni Winther 27354572b4 [cfe] Add _createPropertyBuilder
This combines the creation SourcePropertyBuilder for fields, getters,
setters, enum elements and primary constructor fields through the same
method.

This prepares for combining getter/setter and final field/setter
pairs in the same SourcePropertyBuilder.

Change-Id: I664ccded46c79235281cbd0799f9567bfb451eb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430440
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-05-23 01:26:42 -07:00
Martin Kustermann 226a667ef9 [dart2wasm] Add const bool.fromEnvironment('dart.tool.dart2wasm.minify')
We add the `dart.tool.dart2wasm.minify` environment define (analogous to
how dart2js exposes `dart.tool.dart2js.minify`).

We make `package:expect/variations.dart` then expose to tests what
guarantees they can assume, namely

   * `readableTypeStrings`
   * `preciseErrorsWithDetails`

Change-Id: I43da09ed924ca9137721f4d70b7a494e01bf36e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430680
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-05-23 01:26:38 -07:00
なつき 4fb584d1ad [docs] Fix build documentation for Android
Closes https://github.com/dart-lang/sdk/pull/60766

GitOrigin-RevId: 0e5b924cc62ecdaa01f671dc1c3a92a5ba156567
Change-Id: I5b63b7b764ffd39b990367ff68dcd013c64203c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429842
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-05-23 00:49:40 -07:00
Stephen Adams 29d5395c49 [dart2js] Fix side-effects bugs
Make the `HInstruction.sideEffects` field final.  The instruction owns
the mutable SideEffects objects so it would be dangerous to make the
field reference a shared SideEffects object.

Update the side effects of an interface call when the target becomes
known. We were essentially missing any benefit of inferred
side-effects for instance members.

Change-Id: I46da1d87e166864cd7fa4cee01f209bcc19986af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430546
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-05-22 19:49:10 -07:00
Brian Wilkerson 816b974c15 Report the number and sizes of library cycles
Reported in the report created by the diagnostic pages.

Change-Id: I44de39b8388101d8ef5c5d0ecd5d50c1a1f559cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-05-22 17:27:20 -07:00
Sam Rawlins 2dc94ee84a analyzer: Rename DiagnosticCode.errorSeverity to DiagnosticCode.severity
Change-Id: I244a96a940f82902a20e817fd13fe32026607ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-22 17:25:01 -07:00
Nate Biggs 7d199f2171 [dart2wasm] Enable compiler asserts for dynamic module tests.
Fixes several asserts that were throwing when running with dynamic modules enabled.

Bug: https://github.com/dart-lang/sdk/issues/60743
Change-Id: I6bcd3723ecdee784b3d1603e1c87a47e3703a7f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423261
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2025-05-22 16:48:22 -07:00
Nate Biggs 63ee73a2ed [dart2wasm] Fix dynamic modules bugs.
- For direct calls in selector branch, ensure 'if' branches have correct inputs.

- For overrideable selectors, the receiver type cannot be known in the main module so use 'top' type. Technically we could do better if selectors tracked interfaces they targeted. Then we could take the LUB of all those classes. But this would be a significant refactor for a small benefit.

- Type checks on classes defined in the main module should use the class ID ranges from the main module rather than those from the dynamic submodule. This only applies to non-dynamic module extendable types (otherwise we'd use the RTT checks). So we know the class can only exist in one of the range sets, not both.

I discovered (1) from running Flutter which led me to create this test which uncovered (2) and (3).

Change-Id: I80f39835f66aa7cf0cff527341e3f4a948a7a0cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430360
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2025-05-22 16:15:58 -07:00
Daco Harkes 09cdebdd59 [deps] Roll dart-lang/native
Change-Id: I9d879a328bf1a741ba3b23d282aefa6e670c9ca5
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430500
Reviewed-by: Liam Appelbe <liama@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2025-05-22 15:33:11 -07:00
Konstantin Shcheglov 4e2569294e Fine. Rename recording methods in RequirementsManifest.
Change-Id: I3402e9b641978cd3004cc5d2be4b8b303fddf8a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430541
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-22 14:55:02 -07:00
Brian Wilkerson b55b2bb092 Refactor the performance reporting support
This CL contains no functional differences; it just reorganizes the code.

I expect to be adding data to the collected report, and I decided that
it would be better to break the massive method up before doing so in
order to improve overall readability.

I also wondered whether we might want to structure the data in a similar
way. For example, the top-level map could have entries corresponding to
each of these methods, each of which has a value that is a map
containing the data collected by that method. I don't know whether this
would make the output easier to read or whether the current form is
depended on anywhere, but it's something to consider for the future.

Change-Id: Id0ef3c2f64b00ea58069c496e7c485c7b3f163c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430560
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-05-22 14:06:00 -07:00
Kenzie Davisson 10dd59c039 Add a DTD method to get all registered services.
This CL contains breaking changes for package:dtd and prepares both package:dart_service_protocol_shared and package:dtd for publish.

This CL also fixes https://github.com/dart-lang/sdk/issues/60757 so that DTD-registered services are sent over the `Service` stream upon initial subscription like what is done for client-registered services.

Change-Id: I619af816e64af01864c7ed9b98743c6691bf7e0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429161
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2025-05-22 13:52:54 -07:00
Nicholas Shahan f4c87f2ae8 [ddc] Add hot reload checks to instance getter accesses
Checks the compile and current hot reload generations. If they are not
equal the value is checked to have a getter of the expected name and
if so it gets called. If not, `.noSuchMethod` is invoked instead.

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

Change-Id: Ib80582b45f87f2ab41b943e0f263167b38601e0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429066
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-05-22 13:27:31 -07:00
Sam Rawlins ef300f558c analyzer: allow LintCode instances to set their own severity
Work towards https://github.com/dart-lang/sdk/issues/53402

Letting plugin authors set the default severity of a lint code is a
top request. Users can still customize severities with analysis
options.

Change-Id: Id0a360f4a96ca9627f00d63d3487bfde554b74e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-05-22 12:51:30 -07:00
Konstantin Shcheglov b37171cf10 Fine. Support for type aliases.
Change-Id: I7907ba6b4041bd3723d37a652b883cea6dfc617f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-05-22 12:50:21 -07:00
Konstantin Shcheglov 24ebc7a125 Fine. Support for extensions.
Change-Id: I3ebae3c6228b1b2c95e224e2e6624e46212d3b2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-22 11:36:34 -07:00
Stephen Adams f14ce9eec0 [dart2js] Remove unused Map/Set literal helper functions
These functions have not been used since we switched to the new Rti.

In modern Dart it is not worth special-casing `<dynamic,dynamic>{}` and
`<dynamic>{}`.

Bug: #37715
Change-Id: I535bc67055a7dc02016b14d1a0ae43ca1f850e79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430320
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2025-05-22 11:31:14 -07:00
Sam Rawlins 612c9f6834 analyzer: rename AnalysisRule 'errorCode' parameters
Work towards https://github.com/dart-lang/sdk/issues/50986

Change-Id: I3d5a55f6638b18e2941a574a71c89fc142f0c206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-05-22 11:27:21 -07:00
Konstantin Shcheglov f637435eb6 Fine. Support for extension types.
Change-Id: I82bcaafd877b1192806343ea46e2c6a5594f131a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-05-22 11:14:23 -07:00
Sam Rawlins f2d416b866 analyzer: simplify PackageConfigFileBuilder.toContent
This API did not exist (was not public) in analyzer 7.4.x, so is safe
to change in 8.0.0.

Change-Id: Ib4a06008b1cdf1be4f33dcb9036ea87b6d258067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430041
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-05-22 10:58:49 -07:00
Konstantin Shcheglov 058641a563 Fine. Support for TypeLiteral.
Change-Id: I2ee92b0be99cbeea39cbd9d07166e073fc230846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430322
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-22 10:14:35 -07:00
Sam Rawlins 87f5185577 analyzer: Rename NodeLintRegistry to RuleVisitorRegistry, provide alias
Work towards https://github.com/dart-lang/sdk/issues/50986

Change-Id: Id0053b4721ca0517e315d5118ae48839dfaa3027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429465
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-05-22 10:03:19 -07:00
Daco Harkes 66a2833aa0 [native assets] Avoid library name clash
TEST=tests/lib/mirrors/bad_argument_types_test.dart

Closes: https://github.com/dart-lang/sdk/issues/60778
Change-Id: I9d3e7b0ea70c65489a6b6dd1263e4b2ca72c61d3
Cq-Include-Trybots: luci.dart.try:vm-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430480
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2025-05-22 09:56:25 -07:00