Commit Graph

104069 Commits

Author SHA1 Message Date
Srujan Gaddam e94de78d2b [ddc] Remove statements from the Fun returned by buildFunctionWithImports
This list of statements is intended to support additional
statements that need to be emitted to handle imports/exports.
For the incremental case, no non-import statements exist
and can be safely omitted from the body. We should be
intentional about including these if needed later to avoid
accidentally including unnecessary statements.

Change-Id: I726bb9e980d43c1edd1d0bda2d9be897586638ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393163
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-11-06 20:42:13 +00:00
Konstantin Shcheglov 09550b33fc Issue 57035. Fix for exception when asking class alias constructors.
Bug: https://github.com/dart-lang/sdk/issues/57035
Change-Id: I48aa20815b56c49f08e22509126f74891e694644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 20:24:39 +00:00
Alexander Markov a36dbc78ff [vm, dynamic_modules] Support loading of dynamic modules from unmodifiable view
TEST=pkg/dynamic_modules/test/data/load_unmodifiable_view
Fixes https://github.com/dart-lang/sdk/issues/57039

Change-Id: I5b04acd458da437b6ce4cf4b36e0c60c3d3458aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393920
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-11-06 20:23:58 +00:00
Ryan Macnak f972499915 [vm, compiler] Generate smaller far branches on RISC-V.
TEST=ci
Change-Id: I860596aafd8b11a36f0c1090759fe22e0beb81ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392462
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-11-06 19:44:04 +00:00
Sam Rawlins e66a8a4fa3 analyzer plugins: parse version and path keys in YAML
This enables plugin sources to be specified in one of three ways:

* as a YamlScalar, like `plugin_name: ^1.2.3`
* with a 'version' key, like `plugin_name:\n  version: ^1.2.3`, which
  allows diagnostic configurations to be alongside.
* with a 'path' key, like `plugin_name:\n  path: foo/bar`, which
  allows diagnostic configurations to be alongside.

We introduce a PluginSource with a `toYaml` method to convert the
values back into YAML for the generates pubspec. We update
PluginPackageGenerator to use PluginSource.toYaml.

Change-Id: Ic5f372f0339edd6aa638dd9b568a83f41a023b08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393900
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 19:41:00 +00:00
DEPS Autoroller 38541bd095 Roll Fuchsia Test Scripts from Itifj1g1iG3RWRIzM... to 6FgM4KTbxxmyYoiOs...
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-test-scripts-dart-sdk
Please CC chrome-fuchsia-engprod@google.com,dart-vm-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Fuchsia Test Scripts: https://bugs.fuchsia.dev/p/fuchsia/issues/list
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try;luci.dart.try:vm-fuchsia-release-arm64-try
Change-Id: Iaafa169eace484e463533ffe1df50c40c5a40c4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393820
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-11-06 19:36:01 +00:00
Robert Nystrom 732b07a42b Roll dart_style into the SDK.
I'm still chasing down a couple of google3 failures, but this is ready for review so that I can get it approved and land it once the last couple of failures are fixed. Here is who I think should review what:

athom@ for:

- DEPS

johnniwinther@ for:

- pkg/_fe_analyzer_shared
- pkg/front_end
- pkg/kernel

brianwilkerson@ for:

- pkg/analysis_server
- pkg/analyzer_plugin
- pkg/analyzer_utilities

kenzieschmoll@ for:

- pkg/dartdev

pquitslund@ for:

- pkg/linter/lib/src/lint_codes.g.dart

If you're not the right person, feel free to summon someone else.

Most of the changes here are re-running code generators that auto-format the code they generate. The changes are:

Roll in the latest dart_style commit:

- DEPS

Manually updated these test expectations to expect the new style:

- pkg/analysis_server/test/lsp/format_test.dart
- pkg/analysis_server/test/services/refactoring/agnostic/change_method_signature_test.dart
- pkg/analysis_server/test/src/domains/flutter/set_property_value_test.dart
- pkg/analysis_server/test/src/services/flutter/container_properties_test.dart
- pkg/analysis_server/test/src/services/flutter/widget_descriptions_test.dart
- pkg/analysis_server/test/src/services/refactoring/convert_selected_formal_parameters_to_named_test.dart
- pkg/analysis_server/test/src/services/refactoring/move_selected_formal_parameters_left_test.dart

This was auto-generated by something, but I'm not sure why it thinks there is a diff:

- pkg/analyzer_plugin/doc/api.html

Updated to require a version of dart_style that accepts a language version in DartFormatter():

- pkg/analyzer_plugin/pubspec.yaml

Updated to always use the latest language version (and thus new style) when invoking the formatter:

- pkg/analyzer_utilities/lib/tools.dart

Manually updated the formatting in the code templates so that they matched the formatting expected by the tests, which implicitly format using the latest language version:

- pkg/dartdev/lib/src/templates/...

The rest are all generated files that are formatted so re-generated using the new style:

- pkg/_fe_analyzer_shared/lib/src/experiments/flags.dart
- pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
- pkg/analysis_server_client/lib/handler/notification_handler.dart
- pkg/analysis_server_client/lib/src/protocol/...
- pkg/analysis_server/lib/protocol/protocol_generated.dart
- pkg/analysis_server/test/integration/support/integration_test_methods.dart
- pkg/analysis_server/test/integration/support/protocol_matchers.dart
- pkg/analyzer_plugin/lib/protocol/...
- pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart
- pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
- pkg/analyzer/lib/src/analysis_options/error/option_codes.g.dart
- pkg/analyzer/lib/src/dart/error/...
- pkg/analyzer/lib/src/error/codes.g.dart
- pkg/analyzer/lib/src/manifest/manifest_warning_code.g.dart
- pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart
- pkg/analyzer/lib/src/summary/format.dart
- pkg/analyzer/lib/src/wolf/ir/ir.g.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/less_simple/lib_000_1.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/less_simple/lib_001_0.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/less_simple/lib_010_0.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/less_simple/lib_100_0.dart
- pkg/compiler/test/tool/graph_isomorphizer/golden/simple/...
- pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart
- pkg/front_end/lib/src/codes/cfe_codes_generated.dart
- pkg/front_end/lib/src/util/parser_ast_helper.dart
- pkg/front_end/test/parser_test_listener.dart
- pkg/front_end/test/parser_test_parser.dart
- pkg/front_end/testcases/...
- pkg/kernel/lib/src/coverage.dart generated
- pkg/kernel/lib/src/equivalence.dart generated
- pkg/linter/lib/src/lint_codes.g.dart

Change-Id: Ice0141b763e63b84f54692cd19a442a0719673c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391263
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-11-06 18:42:25 +00:00
Ryan Macnak f6f8134ef2 [vm, compiler] Fix compressed instructions for larger shift values.
TEST=ci
Change-Id: I7b49c7479cce80f91c068cf6f82d8bb4d19d45e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393605
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-11-06 17:25:56 +00:00
Parker Lougheed 2de5bb15f1 [linter] Changelog and since updates for 3.6 and 3.7
Change-Id: Ic308308ee7590a3dc10d84b4b33fa78ae4135a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393587
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 17:10:52 +00:00
Konstantin Shcheglov 03ad365274 Elements. Use firstFragment in TypeParameterElementImpl2 instead of wrappedElement.
Change-Id: Idf049d7f76d2c197bb6a98063bb7dd2a13c806aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393763
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 17:04:39 +00:00
Konstantin Shcheglov 4f20171f69 Elements. Use more impl in impl and tests.
Change-Id: Ibef3504c701fa3f37eb9078058113d8e44f05f04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393585
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-06 16:51:02 +00:00
Alexander Markov 9645a7114c [vm/compiler] Simplify code generation of comparisons by moving constant operands to the right
TEST=ci

Change-Id: Ifa17f11ca297de9da733dffc132ade498c9e0f00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393604
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-11-06 13:58:40 +00:00
Ivan Inozemtsev 53ba9af361 Standalone Dart runtime library for embedders
For now we use a static library, but I am planning to add support for a shared library in a follow-up CL.

Tested: locally on macOS and Linux, also ci should at least build samples.
Change-Id: I277239359de226c56633884f350b22a030759ab6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392640
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-11-06 13:11:34 +00:00
Ömer Sinan Ağacan 76717f2930 [dart2wasm] Make int and double fields immutable
Make the `value` fields of `BoxedInt` and `BoxedDouble` `final`, to
generate immutable Wasm fields for them.

Immutable fields can potentially generate better code, as loads from the
same object will always generate the same value.

To allow making the `value` fields `final`, add a constructor.

To allow adding a constructor, "implement` base classes instead of
extending them. With `extends` the front-end wants us to call the
superclass constructors, even though they don't have any constructors.

This CL does not do the same to `BoxedBool`. We did that in a previous
iteration of the CL[1], but it caused regressions in post-TFA kernels.

[1]: https://dart-review.googlesource.com/c/sdk/+/393320

Change-Id: Ib44c25d09dcd84d999aa1d92dc9c38632454e443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393842
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-11-06 13:06:06 +00:00
Keerti Parthasarathy c30f961f13 Delete unused code - RuntimeCompletionComputer
Change-Id: I4fd027998ce4f9fa847df2ddd0773c3a476e766a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393701
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 12:59:00 +00:00
Keerti Parthasarathy da1930ab6c Add cancellation token for legacy requests in message scheduler
Change-Id: I6b0837edbf373d2b8b72b16ed47d157c097347d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-11-06 12:58:02 +00:00
Vyacheslav Egorov 3a895e28b4 [dart2native] Fix PE section injection
When writing out current PE contents only write data
up to `sectionTable.offsetEnd` because that is the
offset used to compute location of the snapshot
section and there might be a padding between
`offsetEnd` and the actual end of the file.

This was revealed when compiling AOT runtime
with ASAN enabled which slightly shifted
sections in the PE file and introduced
a gap.

TEST=manually internally

Change-Id: I532bc66fe5ac993c2214c22b50013e1a16c3f7f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393841
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-11-06 10:23:38 +00:00
Ömer Ağacan 95e7793b68 Revert "[dart2wasm] Make int, double, bool box fields immutable"
This reverts commit af2bea8162.

Reason for revert: Caused unexpected performance regressions.

Original change's description:
> [dart2wasm] Make int, double, bool box fields immutable
>
> Make the `value` fields of `BoxedInt`, `BoxedDouble` and `BoxedBool`
> `final`, to generate immutable Wasm fields for them.
>
> Immutable fields can potentially generate better code, as loads from the
> same object will always generate the same value.
>
> To allow making the `value` fields `final`, add a constructor.
>
> To allow adding a constructor, "implement` base classes instead of
> extending them. With `extends` the front-end wants us to call the
> superclass constructors, even though they don't have any constructors.
>
> Implementing `bool` (instead of extending) causes issues in TFA as it
> currently assumes bool literals are compiled as the `bool` class. Update
> TFA to treat bool literals the same way as `int` and `double` literals.
>
> Tested: existing tests
> Change-Id: I3282e188d784fa7a22421edc79ed47f9d85faf19
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393320
> Commit-Queue: Ömer Ağacan <omersa@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: I8bb49bcc4bd9cd01f3e8a692d7ba1bef889ab555
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393840
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Ömer Ağacan <omersa@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2024-11-06 09:30:00 +00:00
Siva Annamalai 74c5aa3a7a Revert ""[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory""
This reverts commit f81a402aa1.

Reason for revert: golem benchmarks are failing to run

TEST=ci

Original change's description:
> "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
>
> Fixed golem breakage by temporarily copying dartaotruntime to dart_precompiled_runtime
>
> This reverts commit 75e6a748f7.
>
> TEST=ci
>
> Original change's description:
> > Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
> >
> > This reverts commit 1b331d05c2.
> >
> > Reason for revert: golem builds are failing
> >
> > Original change's description:
> > > [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
> > >
> > > TEST=ci
> > >
>
> Change-Id: Id0f383eabb496c06c0acebc639c8e3b056ba82d0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393781
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Change-Id: Iec494940412aa31dbefdc5280e35ae99e8cecb26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393764
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-11-06 05:37:46 +00:00
asiva f81a402aa1 "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
Fixed golem breakage by temporarily copying dartaotruntime to dart_precompiled_runtime

This reverts commit 75e6a748f7.

TEST=ci

Original change's description:
> Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
>
> This reverts commit 1b331d05c2.
>
> Reason for revert: golem builds are failing
>
> Original change's description:
> > [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
> >
> > TEST=ci
> >

Change-Id: Id0f383eabb496c06c0acebc639c8e3b056ba82d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393781
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-11-06 03:10:31 +00:00
Srujan Gaddam 1d4c570dc5 Skip SDK library-level expression evaluation tests
These are no longer handled with the new module format,
so skip them when that's enabled. This is the last piece
to get expression evaluation tests working again with the
new format.

Change-Id: I92933363ea4e275f7a3f1c9cd62e24b0f7987f49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393162
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-11-05 23:51:42 +00:00
Ryan Macnak 4fa616b254 [vm] Fix code patcher assertions for RISC-V.
TEST=ci
Change-Id: I313d2bb7f03c9ce8fd9fe423e732b34a5a2420e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393584
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-11-05 22:16:59 +00:00
Siva Annamalai 75e6a748f7 Revert "[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory"
This reverts commit 1b331d05c2.

Reason for revert: golem builds are failing

Original change's description:
> [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
>
> TEST=ci
>
> Change-Id: I96ed52994e0d955300c18026032e68003504666d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389760
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: I5dc14973f4ee4e577b2c996839d5e497c97fb440
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393761
Commit-Queue: Siva Annamalai <asiva@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-11-05 21:58:09 +00:00
Sam Rawlins 1d947cedd2 Add new plugins to analysis options signature
Change-Id: Ia8600dfb33e8c65573d92b8643398488037ea63a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393602
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-11-05 21:02:59 +00:00
asiva 1b331d05c2 [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory
TEST=ci

Change-Id: I96ed52994e0d955300c18026032e68003504666d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389760
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-11-05 20:39:15 +00:00
Parker Lougheed b47128dd64 [analysis server] Fix links in implementation docs
Change-Id: Ie40111a6bfed4a6f088f1e7bd3f365aa060a1b0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393700
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-11-05 19:25:00 +00:00
Kallen Tu 53bad058b1 [flow] Add unit test for postIncDec().
Add Flow Analysis unit tests for FlowAnalysis.postIncDec() which should be used for postfix increment and decrement operations.

Bug: https://github.com/dart-lang/language/issues/3658
Change-Id: If77b6fbb5fc80d5f5d014ec0516d77578446dced
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393441
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-11-05 18:54:02 +00:00
Konstantin Shcheglov 53bf3ff846 Elements. Rename to ClassElementImpl2, etc.
Change-Id: I94119f60b5bf01e52cf348a7c67f2b4a5ba62900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-05 18:42:21 +00:00
FMorschel 9d340db3e6 Fixes import prefix hover text as code
R=srawlins@google.com

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

Change-Id: I37fa39f385dd26dfcf55c024b9ca331ec83381f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393382
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-11-05 18:10:19 +00:00
Kenzie Davisson 275f808911 Update DevTools rev to f7091d2c0d037f7daf91315ec3da00294d380a8d
Change-Id: Ib1c23d0e7e79140d5b9aa0b35d82ef1873762053
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393780
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2024-11-05 17:46:23 +00:00
Parker Lougheed 235a7157d5 [analysis_server] Don't repeatedly redetermine sort member order
Also complete some nearby cleanup. Mostly turning MemberKind into a normal enum.

Change-Id: I96f810c9f2197e5c748231f3d1fb5344e5ef528a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393680
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-05 17:29:29 +00:00
Devon Carew 2049a3045c [deps] remove obsolete dep references (now in dart-lang/tools); json_rpc_2, html, csslib, clock, cli_util, browser_launcher, benchmark_harness, bazel_worker
Change-Id: I581c3252d859f38f06c4c8e8045169434d462753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393620
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-11-05 16:36:43 +00:00
pq c37637c52d [element model] partially migrate ast utils
Change-Id: Ib4ad857a9828f798d44e549fde79303a446dfbc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393601
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-11-05 16:19:21 +00:00
Danny Tuppeny facc712ec8 [analysis_server] Migrate LSP colors to new element model
Change-Id: Ib31793e2cc5b52cde46b76dee9da7ddc9047eee3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393322
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-11-05 16:05:46 +00:00
FMorschel 6eda5e2019 [DAS] Fixes add const for final variables and lint
R=srawlins@google.com

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

Change-Id: I75dd2c0063ea5d3a6ebbf4afb734d2cb5d98c1d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392860
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-11-05 15:48:00 +00:00
Sigurd Meldgaard 11783f1643 Bump pub to 8c2e621c2403cb503cc9959be387d1061a16846a
Changes:
```
> git log --format="%C(auto) %h %s" 1d7b0d9..8c2e621
 https://dart.googlesource.com/pub.git/+/8c2e621c Special case global-run message for updated sdk (4419)
 https://dart.googlesource.com/pub.git/+/afdd62c5 Bump actions/checkout from 4.2.0 to 4.2.2 in the github-actions group (4420)
 https://dart.googlesource.com/pub.git/+/e0df88b0 blast_repo fixes (remove lint package_api_docs) (4416)
 https://dart.googlesource.com/pub.git/+/489d15c1 Remove stray files (4413)
 https://dart.googlesource.com/pub.git/+/776def48 Clean up duplicate lints (4407)

```

Diff: https://dart.googlesource.com/pub.git/+/1d7b0d9a35be9cff5d071f6cf17fcdcde2b7ecc5..8c2e621c2403cb503cc9959be387d1061a16846a/
Change-Id: Id782c431b64a95f1f9bc39492a66e32bc270afe6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393742
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2024-11-05 15:08:52 +00:00
Alexander Markov f09afbe719 [vm/compiler] Cleanup unused handling of stack slot locations in comparisons
Location summary for inputs of integer comparisons uses either
RequiresRegister or LocationRegisterOrConstant, so operand cannot be a
StackSlot.

TEST=ci

Change-Id: Idff0f09074be2055f0f9a46d8629c769155eb8ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393044
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-11-05 13:50:55 +00:00
Alexander Markov 52cb60b34e [vm/compiler] Rename Comparison to Condition, introduce proper Comparison
Previously, ComparisonInstr base class represented arbitrary conditions
used in Branch, IfThenElse and CheckCondition instructions and included
subclasses TestInt, TestCids, TestRange and unary DoubleTestOp which are
not comparisons. So this refactoring renames ComparisonInstr to
ConditionInstr.

In addition, a new Comparison instruction is added as a base class for
StrictCompare, EqualityCompare and RelationalOp.

TEST=ci (pure refactoring)

Change-Id: Ic8756ee5913ff2bc974c95cea8004370c9f5527f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393420
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-11-05 13:50:08 +00:00
Ömer Sinan Ağacan af2bea8162 [dart2wasm] Make int, double, bool box fields immutable
Make the `value` fields of `BoxedInt`, `BoxedDouble` and `BoxedBool`
`final`, to generate immutable Wasm fields for them.

Immutable fields can potentially generate better code, as loads from the
same object will always generate the same value.

To allow making the `value` fields `final`, add a constructor.

To allow adding a constructor, "implement` base classes instead of
extending them. With `extends` the front-end wants us to call the
superclass constructors, even though they don't have any constructors.

Implementing `bool` (instead of extending) causes issues in TFA as it
currently assumes bool literals are compiled as the `bool` class. Update
TFA to treat bool literals the same way as `int` and `double` literals.

Tested: existing tests
Change-Id: I3282e188d784fa7a22421edc79ed47f9d85faf19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393320
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-11-05 12:09:10 +00:00
Chloe Stefantsova 8a1c0203b4 [analyzer] Handle null-aware elements in code completion
Part of https://github.com/dart-lang/sdk/issues/56989

Change-Id: Id02c049d0afb5cb6c3f1d94ee5bebf7ca532e2e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392902
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-05 10:57:28 +00:00
Vyacheslav Egorov 729c1c01ce Fix Collect Report functionality
When language server is started through dartdev is gets
classified as a system isolate, but Collect Report
only looks at user isolates.

I have looked at various ways to fix this but it is
complicated because we are in the middle of rewiring
dartdev to work with AOT built tools.

I would like a trivial change that can be easily
cherry-picked into stable release. Thus I am opting in
to simply change data collection code to collect information
from both user and system isolates.

Change-Id: I00f9eb937153fc730feccf778e5cd2f69d222a18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-11-05 09:07:28 +00:00
Chloe Stefantsova 523ab95e64 [analyzer] Add call hierarchy tests for null-aware elements
Part of https://github.com/dart-lang/sdk/issues/56989

Change-Id: Ifd09b47fbb83519277fc6968a8edf8cdcdf76d6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393321
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-11-05 06:45:08 +00:00
Konstantin Shcheglov 7b9d11a6a4 Elements. Write mixins / interfaces / etc of InstanceElement2.
Change-Id: I402d76450bb06a74580292777dae4514c2685e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393580
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-05 02:36:18 +00:00
Ryan Macnak 6bb1b9c357 [vm] Fix RISC-V ClobberAndCall to actually call.
TEST=ci
Change-Id: I6729c1b9c76094d88363cf0cb79e92288c3aa4eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393600
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-11-05 02:31:43 +00:00
DEPS Autoroller 0b55c167bf Roll Clang from 3928edecfbd1 to e6549b803608
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/clang-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@grotations.appspotmail.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Clang: https://bugs.fuchsia.dev/p/fuchsia/issues/list?q=component%3AToolchain
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try;luci.dart.try:dart-sdk-mac-try;luci.dart.try:dart-sdk-mac-arm64-try;luci.dart.try:dart-sdk-win-try
Change-Id: I9bc70a60a286f131db6717d3d351c4ab2aa84155
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391340
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-11-05 02:08:53 +00:00
Alexander Aprelev 7829369956 [builders] Add simriscv32 builders.
This is follow-up to a6547c58f6cff5b608938d553d6fccdb59879ffc

Change-Id: I7d2c6584eb1cb5d694eda2c79ad323ffb7a7dffc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393520
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-11-05 01:43:01 +00:00
Hzj_jie 93b86358cf [fuchsia] Uprev fuchsia versions
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Bug: b/374820020
Change-Id: I206f45c3bbd4a63982a9bd8cc6e8532448cd0833
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393363
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2024-11-05 01:12:32 +00:00
Konstantin Shcheglov 19cac1c907 Elements. Remove 'normalParameterNames' and 'optionalParameterNames' from FunctionType.
Change-Id: I934dca9f635411b71add032a3fc607dddf7de11a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393362
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-04 23:58:32 +00:00
Sam Rawlins 0ed2082654 analyzer plugins: change rules options key to diagnostics
Also allow warning diagnostics to be disabled.

In many places, the RuleConfig is unchanged because currently the
`linter/rules` section parsing is shared with the `plugin/<plugin-name>/diagnostics` section parsing.

They will probably diverge at some point, but as long as they are the
same, we can use the same Registry class to identify enabled and
disabled rules/diagnostics.

Change-Id: I9c00770af14d3b753532bcf1bc6bff62624d99ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-11-04 23:50:29 +00:00
pq c84515f419 [element model] migrate tool to opt-out semantics
See: https://dart-review.googlesource.com/c/sdk/+/393482

Change-Id: I08fc376892652699d1eed674d8267851e2c3a02b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393483
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-04 22:49:20 +00:00