Commit Graph

105344 Commits

Author SHA1 Message Date
Ivan Inozemtsev 6e33c95463 Dart Engine
Adds shared libraries for embedding Dart VM and new API (runtime/engine/include/dart_engine.h).

TEST=tests/standalone/embedder_samples_test.dart

Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-asan-linux-release-x64-try,vm-aot-dwarf-linux-product-x64-try,vm-aot-dyn-linux-debug-x64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv32-try,vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-product-arm64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-aot-ubsan-linux-release-x64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,vm-aot-win-product-x64-try,vm-aot-win-release-x64-try,vm-appjit-linux-debug-x64-try,vm-appjit-linux-product-x64-try,vm-appjit-linux-release-x64-try,vm-asan-linux-release-arm64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-product-arm-try,vm-ffi-android-product-arm64c-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try,vm-gcc-linux-try,vm-linux-debug-ia32-try,vm-linux-debug-simriscv32-try,vm-linux-debug-simriscv64-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-linux-release-arm64-try,vm-linux-release-ia32-try,vm-linux-release-simarm-try,vm-linux-release-x64-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-msan-linux-release-arm64-try,vm-msan-linux-release-x64-try,vm-msvc-windows-try,vm-reload-linux-debug-x64-try,vm-reload-linux-release-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-reload-rollback-linux-release-x64-try,vm-tsan-linux-release-arm64-try,vm-tsan-linux-release-x64-try,vm-ubsan-linux-release-arm64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try,vm-win-release-x64-try
Change-Id: Ia4e4d1b871ddef515cfb2f4639bdaa9fe3676936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402860
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-01-28 03:53:40 -08:00
Ryan Macnak 79df09999e Fix recognizing X64C in pkg/vm/tool/precompiler2.
TEST=dartfuzz
Change-Id: Ia1a716c703da2f9968d8d3f926d6be1aaca1ceaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406182
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-01-28 03:45:19 -08:00
Lasse R.H. Nielsen dd2dcba874 Make .expect files not contain platform library implementation details.
Removes frames in stack traces for private platform members
(any `dart:...` entry with a private name, any `dart:_...` entry),
removes line/column number from any remaining `dart:` functions,
and removes the stack frame number (which depends on the number of
removed frames).

Should not affect what is actually being tested, but avoids the test failing
any time a line number in the platform libraries change.

Change-Id: I7255a3ae5fb6ff2cbca0830ce61ddcdb7d0f43a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406003
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-01-28 03:08:13 -08:00
Jens Johansen 9a8d4362df [CFE] Fix instrumenter
The `enter` and `exit` methods in the instrumenter library were also
instrumented and called themselves recursively.

I believe this has been broken since
https://dart-review.googlesource.com/c/sdk/+/387704

Change-Id: Iac3f91a23a25e0122be6bde00a132e4bf530f5db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406020
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-01-28 03:03:00 -08:00
Johnni Winther fdad92cc62 [cfe] Cleanup SourceFactoryBuilder
This removes unnecessary code from SourceFactoryBuilder previous inherited from SourceFunctionBuilderImpl.

Redirecting factory specific is moved fully inside SourceFactoryBuilder and most method are made private.

This is in preparation for creating factory builders using fragments.

Change-Id: I273b3c360fb51a7c1533f14d267c7f6aae949d19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406001
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-01-28 01:26:42 -08:00
Martin Kustermann 9b33264ed1 [dart2wasm] Keep static symbols in dart2wasm-*optimized-* builders
The optimized builders run with binaryen which by default strips static symbols
(in all -Ox modes). So we'll pass `--no-strip-wasm` to `dart compile
wasm` in order to keep the static symbols.

This makes stack traces have the symbols in them which will make tests
that rely on that more likely to work.

Change-Id: I9e0eab8c4ec50ef3a7208551d04a80e9ffa009e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406241
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-01-28 01:06:54 -08:00
Alexander Aprelev 52a528280a [infra] Split build steps for aot-win-{debug,release}-arm64 to avoid timeouts.
Number of targets per splits are 982/800/1829.

Example of failing build https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/vm-aot-win-debug-arm64/1084

Change-Id: I59ee16768c30ad4b5940cb745d92dcd874a0bbf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406040
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-01-27 21:31:43 -08:00
pq 4312e9a957 [element model] migrate function_expression_invocation_resolver
Change-Id: Ib4671a4fe7ef754d929609eb38d955133ed56a95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406205
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 17:12:46 -08:00
pq 7d808b2027 [element model] migrate assignment_expression_resolver
Change-Id: I1d7befa9efdda790dbd3f67b11901b5a2040be40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406222
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 17:03:52 -08:00
Konstantin Shcheglov 967779815f Elements. Migrate MetadataElementTest.
Change-Id: Ifa10e395597bb86926ac67c2ea88734e02e34c9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406162
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-01-27 16:41:15 -08:00
Stephen Adams 32082be3eb [dart2js] invariance optimization for field setters under -O2
Calls to the implicit setters for fields are replaced with field assignments (HFieldSet). This is inhibited when the setter needs to check its argument, which happens when the field type is covariant and the checks not 'trusted', i.e. at optimizations level `-O2` and lower (aka 'spec' mode).

This optimization detects when the check is unnecessary due to invariance. If the receiver of a setter instance call to the the implicit setter has `this` as a receiver and the setter does not have an explicit `covariant` declaration, then the check will always pass, so the setter call can be replaced with HFieldSet.

This optimization works well for Iterators for generic collections at the assignment to the `_current` field, with some iteration-heavy benchmarks improved by 20-50% at `-O2`.

Change-Id: I4f3ffd08b45ba28de721535afc3c7a6d1e486a3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405448
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2025-01-27 16:24:09 -08:00
Konstantin Shcheglov 70fbbd208f Elements. Migrate TypeInferenceElementTest.
Change-Id: I1e1bafc95ec1095d670cab51e394bd0daa2a9790
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406203
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 16:22:06 -08:00
Konstantin Shcheglov af6b3f4fcc Elements. Migrate TopLevelVariableElementTest.
Change-Id: I32ef2ffc73a84e9d5e530d0b0e898f71ae52265b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406202
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 16:16:07 -08:00
Konstantin Shcheglov 6e3c85a5fa Elements. Migrate NamedTypeBuilder.
Change-Id: Ib6a775a52f409d2f657f2877556b44e2b9c5b788
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-01-27 16:14:01 -08:00
Alexander Markov efee57c5f8 [vm] Replace unreachable 'throw' code with Never/Stop
Change core library '_throwNew' helpers to return Never.

Since https://dart-review.googlesource.com/c/sdk/+/405604 flow graph
builder automatically appends Stop and closes fragment after appending
a call with return type Never. So additional 'throw' after calling
'_throwNew' are no longer needed and can be removed.

Also, cleanup unused FlowGraphBuilder::ThrowTypeError() and
replace 'throw' with shorter Stop at the end of 'case'.

TEST=ci

Change-Id: I0a5109fd693c0463c53e70e5dd261f8080bf1132
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406080
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-01-27 16:05:48 -08:00
pq ea62736e71 [element model] migrate find_node
Change-Id: I41ef6e8a0ac8341d97677fb343a63c3e220880b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406083
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 15:30:30 -08:00
Konstantin Shcheglov ce1f3e9d48 Elements. Migrate PostfixExpressionResolver.
Change-Id: I474dd080ecea79678acb1dff478af5e528c51b82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406180
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 15:19:55 -08:00
pq b4eceecdc3 [element model] migrate typed_literal_resolver
Change-Id: Ic90d4c498205f317cca293d8695f7f906f3cb79b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406201
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2025-01-27 15:12:28 -08:00
pq f98a7f9b89 [element model] migrate resolution_result
Change-Id: Ie3f7ef2c632a8e062b1a1f602a513fcf408825a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406181
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2025-01-27 15:11:52 -08:00
Danny Tuppeny 8eb9bcd7f0 [analysis_server] Verify with/without documentChanges for EditArguments tests
The tests by default run with documentChanges (set in `setUp`), but it's possible LSP-over-Legacy clients won't support it.

Change-Id: I40c65f05127c88e15a43f16669f64675285955dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406002
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-27 12:54:48 -08:00
Konstantin Shcheglov 04484a2c59 Elements. Migrate ExtensionMemberResolver.
Change-Id: I0a9f008d900a478200bbdac898fe58c61e825391
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406082
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 12:39:41 -08:00
DEPS Autoroller 193f8a26ad Roll gn from c97a86a72105 to ed1abc107815
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/gn-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com,dart-engprod@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in gn: https://bugs.chromium.org/p/gn/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: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: I9edd07c7072cc191b62a377201ffd2800dd74b2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404745
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-01-27 12:30:56 -08:00
Devon Carew 732fa5ed79 [deps] rev core, ecosystem, test, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

core (https://github.com/dart-lang/core/compare/72a2060..3b35aca):
  3b35aca9  2025-01-24  Devon Carew  update the topics section of several pubspecs (dart-lang/core#854)

ecosystem (https://github.com/dart-lang/ecosystem/compare/682c8ef..c4a163a):
  c4a163a  2025-01-23  Devon Carew  print detailed info about the leaked APIs to stdout in the workflow (dart-lang/ecosystem#339)

test (https://github.com/dart-lang/test/compare/7fc9521..92eed6c):
  92eed6c4  2025-01-27  Lasse R.H. Nielsen  Make zone handlers call zone.run to run callbacks. (dart-lang/test#2451)
  ad04f172  2025-01-24  Devon Carew  add a pull request labeler; add issue tracker links; update codeowners file (dart-lang/test#2452)
  1f292db8  2025-01-24  Lasse R.H. Nielsen  Don't require Dart 3.5.
  a56fa947  2025-01-24  Lasse R.H. Nielsen  Accept extra `run`s in test. Move to Dart 3.5.
  4bd54972  2025-01-24  Lasse R.H. Nielsen  Clean-up. Accidentally merged a removed lint back in.
  9fa57d16  2025-01-24  Lasse R.H. Nielsen  Make zone handlers call zone.run to run callbacks.

webdev (https://github.com/dart-lang/webdev/compare/9430dd7..5dc7950):
  5dc79508  2025-01-24  Jessy Yameogo  Added support for callLibraryMethod with the DDC library bundle format.  (dart-lang/webdev#2577)
  1d0b32c2  2025-01-24  Srujan Gaddam  Reset DWDS to 24.3.4-wip (dart-lang/webdev#2580)
  1990d29a  2025-01-23  Srujan Gaddam  Implement hot restart for DDC library bundle format and publish 24.3.3 (dart-lang/webdev#2576)

Change-Id: Ifa23e74a1399ac7ec70a99750419b915a2efbb19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2025-01-27 12:19:40 -08:00
Konstantin Shcheglov e9896a9a68 Elements. Migrate CommentReferenceResolver.
Change-Id: I8962f99ba4422d673ace93035bfad1d926ce68e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406042
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 12:10:22 -08:00
DEPS Autoroller b7a9e2b5d9 Roll Fuchsia Test Scripts from gUHjJPMGJW0yseyRp... to g6IlaYL1_wNmk3zNj...
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 fuchsia-3p-engprod@google.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: Id21860f72cf9a85b3cdc541aaae360101efe47c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405880
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-01-27 11:44:16 -08:00
Konstantin Shcheglov f72732c351 Elements. Migrate, remove v1 getters from SimpleResolutionResult.
Change-Id: I4eb55afe0a04bd2ff16daa8d29d88d2847fb9c08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406100
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 11:17:34 -08:00
DEPS Autoroller e4d04807f7 Roll Clang from 684052173971 to 6d12b954a7df
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: I3ba75dd58bda848c4262776824cada308f9bebab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405680
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-01-27 11:10:13 -08:00
pq af534bd087 [element model] migrate super_formal_parameter_test
Change-Id: Ib33e62c00a84f9cfd1976f2711d65c11b2f20dbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405607
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 11:03:38 -08:00
DEPS Autoroller 90ba332029 Roll Fuchsia SDK from 26.20250106.5.1 to 26.20250120.5.1
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-sdk-dart-sdk
Please CC fuchsia-3p-engprod@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Fuchsia SDK: 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: I9d1d0b5a9d930e0125724fc11cbbaf302b2d9e18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405160
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-01-27 10:55:41 -08:00
Ryan Macnak 82f8a10cdb [vm] Take only a read lock during Field::SetStaticValue.
It is safe for multiple isolates to set their values concurrently. Only growth of the field tables needs to be excluded by the write lock.

A storm of such setters are invoked as part of core library initialization during isolate spawning.

TEST=ci, tsan
Change-Id: I4677e33ee80bb06d261ada2ae9d6b71c94fde611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405400
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-01-27 10:41:28 -08:00
DEPS Autoroller 8a1010f439 Roll BoringSSL from 5a2194f43d88 to d3f26f8af085 (48 revisions)
https://boringssl.googlesource.com/boringssl.git/+log/5a2194f43d88..d3f26f8af085

2025-01-20 bbe@google.com Add a function for Conscrypt to use
2025-01-17 davidben@google.com Fix unwrap comment for CBB_init_fixed
2025-01-17 davidben@google.com Document and test PEM_X509_INFO_read_bio's odd decryption behavior
2025-01-16 davidben@google.com Test some obscure modes of EVP sign/verify with RSA keys
2025-01-16 davidben@google.com Remove some dead code in bssl_shim
2025-01-16 davidben@google.com clang-format bssl_shim.cc
2025-01-16 davidben@google.com Rename foo_extra to foo
2025-01-16 ebiggers@google.com Add explicit prefetching to the new AES-GCM code
2025-01-16 agl@chromium.org Add SPAKE2+.
2025-01-15 joegar@google.com Add ability to upload a directory of vector test results.
2025-01-14 davidben@google.com Bump MODULE.bazel for another snapshot
2025-01-14 davidben@google.com Unfork Chromium's Clang update script
2025-01-14 davidben@google.com Remove embed_test_data.go
2025-01-14 agl@chromium.org Mark fallible container operations as `nodiscard`
2025-01-13 davidben@google.com Start using bssl::UniquePtr in libcrypto
2025-01-13 davidben@google.com Move RSA_blinding_on out of BCM
2025-01-13 davidben@google.com Switch some tests to std::string_view
2025-01-13 davidben@google.com Initialize iqmp during keygen directly
2025-01-13 davidben@google.com Remove a redundant call to freeze_private_key
2025-01-13 bbe@google.com Add tests for TIME functions that accept offsets
2025-01-13 davidben@google.com Use more span patterns for strings vs bytes
2025-01-13 davidben@google.com Remove calls to now unnecessary MakeSpan/MakeConstSpan
2025-01-13 davidben@google.com Remove now unused size hooks from ECDSA_METHOD and RSA_METHOD
2025-01-13 davidben@google.com Remove some RSA_is_opaque and EC_KEY_is_opaque special cases
2025-01-12 davidben@google.com Use std::string_view for label strings
2025-01-09 davidben@google.com Update CMAKE_CXX_STANDARD in generate_build_files.py
2025-01-09 davidben@google.com Revert "Stop playing with time strings with strlcat"
2025-01-08 daniel@binaryparadox.net util/fipstools: document AES-gcm-randnonce cmds
2025-01-08 daniel@binaryparadox.net util/fipstools: add SSH KDF ACVP support
2025-01-08 davidben@google.com Add something to the error queue when Proc-Type version is wrong
2025-01-08 agl@chromium.org Gate Rust support for ML-{KEM,DSA} on a crate feature.
2025-01-07 bbe@google.com Stop playing with time strings with strlcat
2025-01-07 agl@chromium.org Revert "Always try and enable the new_uninit feature."
2025-01-07 bbe@google.com replace some more allocate + strlcat with asprintf
2025-01-07 davidben@google.com Remove out directories in pki test data
2025-01-07 bbe@google.com replace manual alloction math and srlcats with asprintf
2025-01-07 bbe@google.com use asprintf instead of magic manual allocation
2025-01-07 prb@google.com Always try and enable the new_uninit feature.
2025-01-07 davidben@google.com Add another missing file header
2025-01-07 davidben@google.com Add some missing file headers
2025-01-07 davidben@google.com Align a few license headers with OpenSSL's "copyright consolidation"
2025-01-06 agl@chromium.org Remove uses of `strcpy`, `strcat`, and `sprintf`, and handle NULL in some functions.
2025-01-06 davidben@google.com Import "Remove some code for a contributor that we cannot find" from upstream OpenSSL
2025-01-06 davidben@google.com Import "Undo commit d420ac2" from upstream OpenSSL
2025-01-06 ebiggers@google.com Disable the "AVX10/256" AES-GCM functions for now
2025-01-06 ebiggers@google.com Add VAES + AVX2 optimized AES-GCM
2025-01-06 daniel@binaryparadox.net util/fipstools: adjust KDF-counter command docs
2025-01-06 daniel@binaryparadox.net util/fipstools: support more digests w/ hmacDRBG

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/boringssl-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 BoringSSL: https://crbug.com/boringssl/new
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

Tbr: dart-vm-gardener@grotations.appspotmail.com
Change-Id: I9947da0bc5b08179052b9c8eef2e7520195d6213
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405161
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-01-27 10:33:56 -08:00
Konstantin Shcheglov 6417e1ce8a Elements. Migrate TypeConstraintGatherer.
Change-Id: I321604b994d6aa63bf9e6b6de70bbe6a79f61f24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406060
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-27 10:03:49 -08:00
Danny Tuppeny 1ec4ea79fd [analysis_server] Include "get" or "set" in LSP override completions to distinguish them
Screenshot of how this looks here: https://github.com/dart-lang/sdk/issues/59929#issuecomment-2602188244

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

Change-Id: I220ee8facb96dbf31ee88868c8c44223de5e8406
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405007
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-27 09:06:38 -08:00
Danny Tuppeny 8884a8b4ad [analysis_server] Make it easier to print protocol messages when running LSP-over-Legacy tests
This moves the existing `debugPrintCommunication` flag out of `test/lsp` into `test/` and passes it to the `MockServerChannel` to simplify printing protocol messages for LSP-over-Legacy tests (similar to what MockLspServerChannel already does).

Change-Id: Ic5fa6309e8de01ce0c624584ad6eb653ced90698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406021
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-01-27 08:47:42 -08:00
Alexander Markov 6ddd96b45a [vm,compiler] Treat 'Never' return type as unreachable
When building a flow graph, break control flow (close fragment) after
a call with return type 'Never'. Append 'Stop' instruction after
the call to make sure the return address is still within function
code range.

TEST=runtime/tests/vm/dart/regress_59941_il_test.dart

Fixes https://github.com/dart-lang/sdk/issues/59941
Issue https://github.com/dart-lang/sdk/issues/56969

Change-Id: I5bbc0b9740a4f7e06b8560589daeb2b44f13d084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405604
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-01-27 08:16:08 -08:00
Brian Wilkerson 83f540b4f0 Fix three links to the contributing docs for the sdk
Change-Id: I7da01e06279b649021c3c40e44c223cd1cec02c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405860
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-27 08:12:11 -08:00
Nate Biggs b969f32a76 [dart2wasm] Store exception/stacktrace for nested catch blocks.
The async state machine uses a single state in the heap to store the current exception and stacktrace when within a catch block in case they need to be rethrown. When catch blocks are nested this state can be overwritten.

With this new change, before entering a new catch we store the current value of the exception/stacktrace in a local that we can restore after exiting the associated catch blocks. A wasm catch can represent multiple Dart catch blocks so we only need to store the state per wasm catch.

Fixes: https://github.com/dart-lang/sdk/issues/59981
Change-Id: I738084fdecdf5aceac65c5d3698e40b791175171
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405920
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2025-01-27 07:58:31 -08:00
Alexander Markov e893d11b3f [vm,compiler] Fix serialization of ranges and arguments descriptors
Convert range boundaries with symbolic references to other instructions
into constant boundaries to avoid serializing extra references.

Specially handle serialization of arguments descriptors which are
cached in the VM isolate.

TEST=ci

Change-Id: Ifab3bb4d9b037aaefd81d38dd93d47cd4b42cf1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405571
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-01-27 06:46:05 -08:00
Parker Lougheed d86f6c2815 [release] Add 3.6.1 entries and recent release dates to changelog
Resolves https://github.com/dart-lang/sdk/issues/56999 by placing release dates separate from the header.

Change-Id: I54dc71db61982ceb2de1edd4fcf2771a74565d58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404501
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-01-27 01:46:27 -08:00
Jens Johansen 8521d4f5d9 [CFE] Fix coverage destroyed by (wrong) offsets on extension method tearoffs
Say you have a class method like this:

```
class Bar {
  /*offset a*/ void /*offset b*/ qux() {
    /*offset c*/ print("hello");
  }
}
```

Lets also say that this method is run.
This will mark offset a and offset c as hits.
Offset b does not exist in coverage terms.

Now say you have an extension mehod like this:

```
extension Foo on Bar {
  /*offset a*/ void /*offset b*/ baz() {
    /*offset c*/ print("hello");
  }
}
```

Lets also say that this method is also executed.
This will mark offset a and offset c as hits.
Offset b does not exist in coverage terms for this method.

Because extension methods are special though we create a special tearoff for
it. Lets say we didn't execute that one.
The tearoff method - before this CL - had offset b on positions that caused
the position to exist in coverage terms, and as the method wasn't executed
this would make it a miss.

This CL fixes the issue by setting the offsets on the tearoff that before
introduced offset b to offset a instead.

Change-Id: I3a5339135f3d76327624b35f04cc14afccaf487a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404563
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-01-27 01:27:50 -08:00
Johnni Winther 2d83ca1d38 [cfe] Remove SourceFunctionBuilderImpl and merge SourceFactoryBuilder and RedirectingFactoryBuilder
This is in preparation for creating factories through fragments.

Change-Id: Ia9589d16468c647a1bf3236bcb75133f96fcfac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405781
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-01-27 00:25:48 -08:00
Sam Rawlins c550de7c40 analysis server: simplify LegacyAnalysisServer
This class had a few methods which only pertain to the resource provider
and can just be extensions on ResourceProvider. They also have the
exact same impl! So one can redirect to the other.

Change-Id: I3a0433304adba1b71f69d0a4afc8a44515a23d10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405600
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-25 11:52:58 -08:00
Paul Berry e2477add3e [analyzer] DartType no longer implements SharedTypeStructure.
Field types, getter types, method return types, and method parameter
types are changed to `Impl` types in the following classes:

- `BodyInferenceContext`
- `BinaryExpressionResolver`
- `ForResolver`
- `ListPatternResolver`
- `PrefixExpressionResolver`
- `StaticTypeAnalyzer`
- `TypeConstraintGatherer`
- `TypeSystemOperations`
- `YieldStatementResolver`

Additionally, the type `DartType` is changed so that it no longer
implements `SharedTypeStructure`. Instead, the private class
`TypeImpl` implements `SharedTypeStructure`.

There is no change to the analyzer public API.

This is part of a larger arc of work to change the analyzer's use of
the shared code so that the type parameters it supplies are not part
of the analyzer public API. See
https://github.com/dart-lang/sdk/issues/59763.

Change-Id: Idbf09e25a26249a16e65a59274e66b477480d697
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405802
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-24 16:32:11 -08:00
Paul Berry a68ae55885 [analyzer] Switch more types to "Impl" types.
Field types, getter types, method return types, and method parameter
types are changed to `Impl` types in the following classes:

- `AssignmentExpressionResolver`
- `DartPatternImpl` and its subtypes
- `ExpressionImpl` and some of its subtypes
- `PropertyElementResolver`
- `RecordLiteralResolver`
- `TypeParameterElementImpl2`
- `TypeSystemImpl`
- `_InferenceLogWriterImpl`

There is no change to the analyzer public API.

This is part of a larger arc of work to change the analyzer's use of
the shared code so that the type parameters it supplies are not part
of the analyzer public API. See
https://github.com/dart-lang/sdk/issues/59763.

Change-Id: I2cc0dcf0a8e0d97053bf6da4975c729500bb1131
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405840
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-24 15:12:43 -08:00
Stephen Adams a1c54855a6 [dart2js] Detect larger no-op regions
Change-Id: Id4ced6f3a54d40a3775b77fde8453e45a6383ee2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404800
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-01-24 14:35:55 -08:00
Konstantin Shcheglov b92ef7e053 Elements. Migrate DefaultTypesBuilder.
Change-Id: Ic9742f46b3d83077baa720112d2576b1f40ac6f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-24 13:21:13 -08:00
Nate Biggs 6c4028eab8 [ddc] Update ddc_module_loader.js to safely check for localStorage in page.
When running in an iframe without specific flags, DDC may not have access to `localStorage`. In this context, even trying to access `window.localStorage` can cause an exception in the iframe.

Wrapping the check in a try/catch allows us to safely check for access before using it.

Change-Id: I0c5d3d0ac34a550444c12b52f6519a9446ebfe9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405608
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2025-01-24 12:17:26 -08:00
Paul Berry ba9ef09163 [analyzer] Switch more types to "Impl" types.
Field types, getter types, method return types, and method parameter
types are changed to `Impl` types in the following classes and
extensions:

- `CompoundAssignmentExpressionImpl`
- `ExecutableElementExtensionQuestion`
- `ExtensionElementImpl`
- `ExtensionResolutionError`
- `FunctionReferenceResolver`
- `InstanceElementImpl2`
- `InstantiatedExtensionWithMember`
- `InstantiatedExtensionWithMember2`
- `InterfaceElementImpl`
- `InvocationInferrer`
- `LexicalLookupResult`
- `LocalVariableTypeProvider`
- `PostfixExpressionResolver`
- `PropertyElementResolverResult`
- `RecordTypeExtension`
- `ResolutionResult`
- `ResolverVisitor`
- `SimpleResolutionResult`
- `TypePropertyResolver`

There is no change to the analyzer public API.

This is part of a larger arc of work to change the analyzer's use of
the shared code so that the type parameters it supplies are not part
of the analyzer public API. See
https://github.com/dart-lang/sdk/issues/59763.

Change-Id: I5d0d432301df38c7a5ccc7c65767cf73ce7b5d7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405801
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-24 11:16:50 -08:00
Devon Carew 4c3e7abfee [deps] revert the recent tools roll
Change-Id: Ie5bbca028df25a32e9a2cb6a27c459a5f47f48cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405570
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2025-01-24 10:41:24 -08:00
Konstantin Shcheglov 668754285b Elements. Fixes after https://dart-review.googlesource.com/c/sdk/+/405660
Bug: https://buganizer.corp.google.com/issues/392069763
Change-Id: Iecbfc55433890c4e5e606dc9b1f2bc005b9b6684
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-24 09:54:59 -08:00