Commit Graph

102748 Commits

Author SHA1 Message Date
dependabot[bot] 6f87ecd91c Bump github/codeql-action from 3.26.0 to 3.26.5
Closes https://github.com/dart-lang/sdk/pull/56571

GitOrigin-RevId: 3bbe50a8b15d622c22172dacdcacec409835ba19
Change-Id: Ic4472561a9b3daee1cda7cf477278e2b266488df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382140
Reviewed-by: Alexander Thomas <athom@google.com>
2024-08-29 09:12:58 +00:00
Martin Kustermann 8bbccbee66 [dart2wasm] Move is/as checker generation from [Types] into their own [IsCheckers]/[AsCheckers] classes
This is analogous how we do it for [PolymorphicDispatchers]

Change-Id: I3b3187ebe11f50659cd89ed01d9fb4b29ab207c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382580
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-29 07:39:39 +00:00
Fedor Shcheglov ed53041597 Converted library augmentations into parts in analyzer/ tests.
Change-Id: I91ad3b6fb5fd4c785a1eb99e182c4e16525dd0b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-08-29 04:29:27 +00:00
Nate Biggs 04f3e7a740 [dart2wasm] Use brand types for wasm minimal recursion groups.
Brand types encode an integer as a struct type and allow us to break the equivalence relation between similar types in different rec groups.

We now compute equivalence classes at the rec group level reducing the number of brand types we have to assign.

We also improves the equivalence class computation by exiting earlier when a group/type is found to be part of an equivalence class. This is enough information to tell us which brand type it needs so we can exit the inner loop early.

Change-Id: I8c5e1cfc679f1fcb6b7f0e79bd71719f345784d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381960
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-08-28 23:44:04 +00:00
Martin Kustermann dba63c0ab1 [dart2wasm] Prefer inlining list iterator abstractions
This is analogous to how the Dart VM does it.

Change-Id: I0b7658b6bdcdbf72004a7dd85b85f0cad28c6f52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382603
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-28 23:00:32 +00:00
Danny Tuppeny bbe6f2340a [analyzer] Don't crash on certain types of invalid data in analysis_options linter config
Fixes https://github.com/dart-lang/sdk/issues/56577
Fixes https://github.com/dart-lang/sdk/issues/55594

Change-Id: I1e69937cd104e8101a7f87b7c9b8ce26b914b3a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382605
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-08-28 22:21:27 +00:00
Danny Tuppeny ddab694633 [analysis_server] Add failing test for auto-import extensions
See https://github.com/dart-lang/sdk/issues/56320

Change-Id: I6a21ef528d6d67a34e7f845c6cb279f246fe2762
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-08-28 21:39:47 +00:00
Martin Kustermann 6addfa0acb [dart2wasm] Loosen the recursive inlining guard
We can allow inlining constructor initializer & body calls
while compiling a constructor

Change-Id: I992de6c42c638ff6b8e78e8a3108900ff8206ad3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382601
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-28 21:21:01 +00:00
Keerti Parthasarathy c78b8a5cc2 [Code completion] Move suggesting field from SuggestionBuilder to DeclarationHelper.
Also deleted unused class MemberSuggestionBuilder.

Change-Id: Ibe64963e342e4b0be822fbd25826159276a3d41e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-08-28 21:11:16 +00:00
Derek Xu 8fa0f56f45 [VM/Service] Add private _deleteIdZone RPC
TEST=pkg/vm_service/test/id_zones_test.dart, CI

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: I0b951505edd98364373d5913b7a01f6d4775998e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380360
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Derek Xu daa8cbb29e [VM/Service] Add private _invalidateIdZone RPC
TEST=pkg/vm_service/test/id_zones_test.dart, CI

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: I02fcb2502b698066885b3f090435e43a34ed6fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379820
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Derek Xu 6b978a8339 [VM/Service] Add secret _idZoneId parameters to all Service methods
TEST=pkg/vm_service/test/id_zones_test.dart, CI

Issue: https://github.com/dart-lang/sdk/issues/55869
CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes in
sdk/lib/vmservice/running_isolates.dart.
Change-Id: Ib8af3f073f6db9172df90a5ea221269411f72156
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379545
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Derek Xu 8b9be74d23 [VM/Service] Add private _createIdZone RPC
TEST=pkg/vm_service/test/id_zones_test.dart,
runtime/vm/object_id_ring_test.cc, CI

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: I6b092ea6ba4c7787635671af26e09af496ad9a5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379544
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Danny Tuppeny 516b6b23a6 [dtd] Fix permission checks to handle differences in file URI escaping
Fixes https://github.com/Dart-Code/Dart-Code/issues/5210
Fixes https://github.com/dart-lang/sdk/issues/54917
Fixes https://github.com/dart-lang/sdk/issues/55476

Change-Id: I492a4f876ea75972e9971f61d67d2ecf84e7b4c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378461
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-08-28 15:30:07 +00:00
Kallen Tu 1243b9d2b2 [cfe] Lower all late wildcard variables to EmptyExpressions.
Late (wildcard) variables don't get evaluated until they're read, so when we lower them, we should be lowering all of them to EmptyExpressions regardless of if they have an initializer expression.

Bug: https://github.com/dart-lang/co19/issues/2833
Change-Id: Id89035a4e73c2395e7cf19e85bb98e7dbfe2d2a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382422
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-08-28 15:27:36 +00:00
Nate Biggs f00e9b1b29 [dart2wasm] Add --minimize-rec-groups to binaryen flags
This new flag uses a new algorithm to generate the module's type section. The new algorithm is able to produce smaller type sections reducing the overall size of the wasm binary.

For flute.complex at -O4 using this flag produced a wasm file 2.5% smaller.

Change-Id: Iaa7905174c496d637dc3d8d4533df6fd6f056597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382462
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-28 15:14:39 +00:00
Nate Biggs c50ce78283 [dart2wasm] Roll binaryen to g3 version
This version includes support for the new '--minimize-rec-groups' flag.

Change-Id: Ic1c6125cc65d32aa9f76bda215e8e9101f84829e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382461
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-28 15:14:39 +00:00
Daco Harkes 3f17f334f0 [deps] Roll dart-lang/native
Change-Id: I1e6ccb249353f1be9a5ec764eb71fc8b9e0299d1
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/+/381984
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-08-28 15:10:59 +00:00
Daco Harkes 1f6151d11d [test] Make more newer tool versions available for tests
Unsharded tests have access to the buildtools/ directory, but cannot
find it. This is used in the dart-lang/native tests which are rolled
in to the Dart SDK.

Before this CL we already had the c compiler, linker, and archiver
available in environment vars. This CL extends that pattern to also
provide the paths to common utilities that come with the c compiler.

Change-Id: Ie254da729211865e7a7e5c3c9c8a7e147fe71553
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-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382560
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-08-28 13:37:29 +00:00
Alexander Markov 2e63d3135a [dart2bytecode, vm/interpreter] Records
TEST=language tests in vm-aot-dyn-linux-debug-x64 configuration

Change-Id: I6dd7d5617f5c076c722304ab2a753159f22c0bf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382421
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-08-28 13:12:48 +00:00
Daco Harkes e65551b7ea [vm/ffi][test] Fix test on Fuchsia
Change-Id: I4db7ecda7196c4023ad7b2ee91d552edb5f6a114
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382541
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-08-28 10:40:21 +00:00
Daco Harkes 1b125fb337 [gardening] Fix concurrency_stress_sanity_test
Closes: https://github.com/dart-lang/sdk/issues/56585
Change-Id: Ib0cfb9772ac04f73c57ab0f5bbc10786c6db740d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382561
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-28 10:27:24 +00:00
Jens Johansen 0329ebfd99 [CFE et al] Lint for fields with StackTrace.current
This CL primarily adds a lint for fields with `StackTrace.current`
which is often useful for debugging, but shouldn't be left in.

* Add an ast visitor after the "explicit creation test",
  finding - for now - `StackTrace.current` calls in fields.
  This should have caught the left-in debug such in
  https://dart-review.googlesource.com/c/sdk/+/379281.
* Renamed explicit_creation to compile_and_lint
* Remove (for some time) unused "smoke_test_quick" files.
* Add kernel to the compile_and_lint suite, but ignore it for explicit
  creation (i.e. kernel will also be checked for fields
  with `StackTrace.current`).

Change-Id: Ib886d23a8945e7063dc673a7f99cbb3a6adc1139
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382361
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-08-28 09:46:08 +00:00
Martin Kustermann b327dae387 [dart2wasm] Make class id range normalization merge consecutive ranges
Lasse spotted this in [0]

[0] https://dart-review.googlesource.com/c/sdk/+/380780/

Change-Id: Ia66225f3e78a9714d4f9c9984ba3791d7595ae1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382402
Auto-Submit: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-28 09:18:36 +00:00
Tess Strickland 27e15ae053 [vm] Cleanup other BitField uses.
Also add a SignedBitField alias so that sign extended BitFields can
be declared with default positions and/or sizes.

TEST=ci

Change-Id: I46bf7f9e378e0f20e7f2e4b4e7ed3e242946d9bb
Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-win-release-arm64-try,vm-aot-win-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382404
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-08-28 08:52:19 +00:00
Aravind b5928642ff [vm/ffi] Supporting .address.cast() expression in ffi leaf calls
Closes https://github.com/dart-lang/sdk/pull/56357

GitOrigin-RevId: 605e7d3fa5f4c7ce367539a76402e2e51aa69422
Change-Id: I79524b443326a161afe221d0a2afb6bed5866e59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378221
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2024-08-28 06:34:09 +00:00
pq 77f9cbff13 [wildcards] clarify evaluation test expectation
See: https://github.com/dart-lang/sdk/issues/55719

Change-Id: I4e7bea8c571f3c52313a6f69af3837982a829207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382441
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-27 23:43:14 +00:00
Elliott Brooks 12c924a27e Update DevTools rev to 25053ae4af8f162188388c6f3786e03349652e51
Change-Id: Iae8d8435be84d3ee5a03e2c8f7ce4dac3aaf2f02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382520
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2024-08-27 23:11:44 +00:00
Sam Rawlins b1f6d153c9 linter: Add note to avoid_redundant_argument_values
Fixes https://github.com/dart-lang/linter/issues/3103

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ic721d6652928646131fec47148167f4595ddf021
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380077
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-08-27 22:10:11 +00:00
Ryan Macnak 6e04f11571 [vm, gc] Fix race installing a page's card table.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/56579
Change-Id: I057f898ec8d7cf3b6796c5ec1587b1399c5a8f9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382460
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-08-27 21:14:16 +00:00
Tess Strickland d3c165d7b5 Reland "[vm] Improvements in the BitField API."
This is a reland of commit bfc1a44527

Change how the partial specializations for AtomicBitFieldContainer
are written so that Visual Studio properly chooses them instead of
the base BitField template when appropriate.

TEST=Windows ARM64 CI trybots

Original change's description:
> [vm] Improvements in the BitField API.
>
> If no position is specified, then the bitfield starts at bit 0.
>
> The default size for bool BitFields is 1 instead of the remaining
> bits in the container.
>
> If the size of the value type is smaller than the remaining bits
> in the container, then the size of the value type is used as
> the default size instead.
>
> If a signed value is used in a non-sign-extended BitField, only
> the magnitude of the value is stored, not the sign bit. This means
> the actual size of the bitfield may be one less than the requested
> size in this case.
>
> If the requested size of the bitfield is larger than the size of the
> value type, a compile-time error is thrown. (For signed types, the
> requested size is allowed to be the size of the entire value, even if
> only the magnitude bits are stored.)
>
> Rework uses of BitFields to avoid using separate constants for
> bit positions/sizes except for macro-defined bitfields (which now
> are universally bool, and so size 1).
>
> TEST=vm/cc/BitFields_Defaults
>
> Change-Id: I40711c929d2e5165ce40823772beb49e8cfdb820
> Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-release-simarm_x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381644
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

Change-Id: I5e3a9e3e2a80d5689a23a0603f8f81fac1576cd3
Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-win-debug-x64c-try,vm-win-release-x64-try,vm-aot-win-release-x64-try,vm-win-release-arm64-try,vm-aot-win-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382383
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-08-27 19:03:02 +00:00
Ömer Sinan Ağacan 1c4a8f40cf [dart2wasm] Use a Wasm arrays instead of strings in dart:convert tables
Change-Id: I879511f3ab672b6203a0f860deb47d91cc4551c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382340
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-27 19:02:00 +00:00
Samuel Rawlins b3f31a0440 Revert "Reapply "analyzer: separate unused_element_parameter from unused_element""
This reverts commit b551690c56.

Reason for revert: flutter customer tests failing: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8738601049545714785/+/u/run_test.dart_for_customer_testing_shard_and_subshard_None/stdout

Original change's description:
> Reapply "analyzer: separate unused_element_parameter from unused_element"
>
> Fixes #49025. Fixes #48401
>
> This allows users to blanket ignore unused_element_parameter without
> ignoring unused_element. They are reported in distinct situations so it
> is valid to separate them.
>
> This reverts commit b888da751e.
>
> Change-Id: I8ea52fcdcb491c140c1283602d6911c939e78d50
> Tested: trybots
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381882
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

Change-Id: Ie0df2f4be45e5db2fa255dcf8c30ddf8408c155b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382420
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Matan Lurey <matanl@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-08-27 17:44:28 +00:00
Konstantin Shcheglov c5d0da620d Parts. Store PrefixScope directly into PrefixElement.
There is no actual need to go through Map.

Change-Id: I065ad3dce75eafe876d22cc070e86f9e55cd3f05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382440
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-08-27 17:14:38 +00:00
Danny Tuppeny 8ca61608d8 [analysis_server] Add an allow-list for LSP methods exposed over DTD
Before exposing existing LSP methods we need to provide a way for DTD clients to always get the same format responses regardless of the client capabilities provided by the original server. Until then, add an allow-list for LSP methods that we can use to selectively enable specific methods that are not affected by client capabilities.

Change-Id: Ia1c994a50c9b94a91f4085c09f9d9d94c0fad79e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-08-27 16:50:15 +00:00
Alexander Markov 365346f4a5 [vm, tfa] Handle all entry point and dynamic module pragmas on a node
Previously, TFA only handled the first pragma on a class/member
and ignored the rest.

TEST=language tests in vm-aot-dyn-linux-debug-x64 configuration

Change-Id: Ib5c7133cef653a7b60799a3205d5a182844ac40c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382200
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-08-27 15:57:00 +00:00
Lasse R.H. Nielsen 310d91aee8 Make async error injection set stack trace on errors.
Also removed a bunch of `CheckNotNullable`s that shouldn't be necessary any more. Any remaining non-sound-null-safety code runs today, and no more should be written. (And if it is, it'll mostly just err somewhere else, with a worse error message.)

Tested: New test added. Removed older tests checking for unsound null-safety.
Change-Id: I28626909cd8c1f91db6c61fc2b93042ed1b085dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380780
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-08-27 12:51:26 +00:00
Jens Johansen de4a69fea3 [CFE] Remove StackTrace.current left in by commit c1283a38a5
Commit c1283a38a5 made the CFE much slower
 --- compiling the CFE itself before took ~4.1 seconds and after ~5.5
seconds after.

This undoes most of that by removing a stray `StackTrace.current`:

```
msec task-clock:u: -24.3982% +/- 0.9517% (-1368.99 +/- 53.40)
page-faults:u: 0.1740% +/- 0.0819% (177.60 +/- 83.62)
cycles:u: -25.5062% +/- 0.9825% (-5992163614.40 +/- 230825004.20)
instructions:u: -34.2928% +/- 0.0009% (-11300688315.40 +/- 289786.74)
branch-misses:u: -17.9038% +/- 4.9793% (-14383703.20 +/- 4000297.83)
seconds time elapsed: -24.3875% +/- 0.9508% (-1.37 +/- 0.05)
seconds user: -25.5429% +/- 1.2609% (-1.38 +/- 0.07)
Scavenge(   new space) goes from 73 to 63
```

Change-Id: I0d822c2dd2d5aa28cbb18bd938ceeb086da2af96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-08-27 11:50:29 +00:00
Tess Strickland 66eca4abfd Revert "[vm] Improvements in the BitField API."
This reverts commit bfc1a44527.

Reason for revert: Broke Windows build.

Original change's description:
> [vm] Improvements in the BitField API.
>
> If no position is specified, then the bitfield starts at bit 0.
>
> The default size for bool BitFields is 1 instead of the remaining
> bits in the container.
>
> If the size of the value type is smaller than the remaining bits
> in the container, then the size of the value type is used as
> the default size instead.
>
> If a signed value is used in a non-sign-extended BitField, only
> the magnitude of the value is stored, not the sign bit. This means
> the actual size of the bitfield may be one less than the requested
> size in this case.
>
> If the requested size of the bitfield is larger than the size of the
> value type, a compile-time error is thrown. (For signed types, the
> requested size is allowed to be the size of the entire value, even if
> only the magnitude bits are stored.)
>
> Rework uses of BitFields to avoid using separate constants for
> bit positions/sizes except for macro-defined bitfields (which now
> are universally bool, and so size 1).
>
> TEST=vm/cc/BitFields_Defaults
>
> Change-Id: I40711c929d2e5165ce40823772beb49e8cfdb820
> Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-release-simarm_x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381644
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

Change-Id: I13bf2218ecc47a42f3a6091821037b51b56618fb
Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-release-simarm_x64-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382380
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2024-08-27 10:16:48 +00:00
Tess Strickland bfc1a44527 [vm] Improvements in the BitField API.
If no position is specified, then the bitfield starts at bit 0.

The default size for bool BitFields is 1 instead of the remaining
bits in the container.

If the size of the value type is smaller than the remaining bits
in the container, then the size of the value type is used as
the default size instead.

If a signed value is used in a non-sign-extended BitField, only
the magnitude of the value is stored, not the sign bit. This means
the actual size of the bitfield may be one less than the requested
size in this case.

If the requested size of the bitfield is larger than the size of the
value type, a compile-time error is thrown. (For signed types, the
requested size is allowed to be the size of the entire value, even if
only the magnitude bits are stored.)

Rework uses of BitFields to avoid using separate constants for
bit positions/sizes except for macro-defined bitfields (which now
are universally bool, and so size 1).

TEST=vm/cc/BitFields_Defaults

Change-Id: I40711c929d2e5165ce40823772beb49e8cfdb820
Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381644
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2024-08-27 09:28:51 +00:00
Chloe Stefantsova 56230ca6cd [analyzer][cfe] Provide single implementation for a shared method
Previously, performSubtypeConstraintGenerationForFutureOrLeftSchema
and performSubtypeConstraintGenerationForFutureOrRightSchema had
almost identical implementations. The purpose of those methods was to
provide two differently typed entry points to the same algorithm. This
CL reduces the code duplication by introducing
performSubtypeConstraintGenerationForFutureOrInternal that the two
entry points simply redirect to.

Part of https://github.com/dart-lang/sdk/issues/54902

Change-Id: Idd545eed3cba67882f81b68e9b69ccf1aecb4257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382164
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-08-27 06:23:19 +00:00
Konstantin Shcheglov 95e2a2d683 Parts. Migrate FileState special cases of augmentation tests to parts.
Change-Id: I17939b44fc655b1dcbe89fd947c819c05e3778ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-08-27 00:21:09 +00:00
Brian Wilkerson 702d5a4bd9 Implement fields, getters, and setters in the new element API
Change-Id: I2670e0c3bcb7f41d2177643849c115b071f8dede
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382240
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-08-27 00:18:59 +00:00
Brian Quinlan f8d7d3300c Do not close _HttpClientConnection when the HTTP parse stream ends, if it has already been closed.
Bug:https://github.com/dart-lang/sdk/issues/51068
Change-Id: If1387d06c8f4713194d6b0db1860ab0de3b8041b
Tested: reproduction attached to GitHub issue
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381821
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2024-08-26 23:27:55 +00:00
Brian Quinlan 00778c316d Fixes a bug where the timezone was not currectly reported on older android
versions.

Bug:https://github.com/dart-lang/sdk/issues/53276
Change-Id: I653298f9179b78a310574e66c4f4a6e73891d5b8
Tested: manual (performance with Google perfgate tool)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382260
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2024-08-26 23:25:24 +00:00
Konstantin Shcheglov c2b92853d4 Parts. Change using 'augmentation' to 'part' where applicable.
Change-Id: I61cb3e112d83ed20536e4018c50c568cae7fb902
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382300
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-08-26 23:19:51 +00:00
pq c371785d42 [wildcards] legacy navigation tests
See: https://github.com/dart-lang/sdk/issues/56567

Change-Id: I0abf861903e440f3bc6162e671c71d134786e8d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-26 23:05:57 +00:00
pq a4a146d3c4 [wildcards] legacy occurrences tests
See: https://github.com/dart-lang/sdk/issues/55681

Change-Id: I5426ef22d56f6c2ab92a2028969cebd867a676ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-26 22:59:09 +00:00
Ryan Macnak b61bde3ea8 Roll Clang to 0cfd03ac0d3f9713090a581bda07584754c73a49.
TEST=ci
Change-Id: I20dd9779e30716f9dbf521391c49096c85de2936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382241
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-08-26 22:14:39 +00:00
Konstantin Shcheglov bbe45a6f34 Parts. Fix for associating metadata with 'part' directives in parts.
Change-Id: I1bf3341f011ead6184915bc243538bd675ae7dc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382221
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-26 21:39:12 +00:00