Commit Graph

1479 Commits

Author SHA1 Message Date
Ryan Macnak 554cb577e3 [infra] Add missing Android debug and RISC-V release builders.
Run co19 on fewer builders.

Change-Id: I7d6ea9f1f0cf2f9553a4a0dd34a608fa86916398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437180
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-25 16:22:25 -07:00
Alexander Markov 43830ab2ea Test interpreter directly on the VM, without dynamic_module_runner
Also, run pkg/vm_service/ tests against interpreter.

TEST=ci

Change-Id: Ib9c7fc1ed33c5721288e3ba1a3d4999c3e234350
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436500
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-06-24 06:00:45 -07:00
Ryan Macnak f5eaefd5b6 [vm] Runtime option to not use the simulator for simarm64_arm64.
TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-ffi-mac-debug-simarm64_arm64-try,vm-ffi-mac-release-simarm64_arm64-try
Change-Id: Id98d337ce16ba4b434b5c69016f01eec9b85f9d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434982
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-18 10:45:05 -07:00
Ryan Macnak ab4f9351b1 Rename vm_platform_strong.dill to vm_platform.dill.
The name has always been annoying because it did not add strong typing. And now there aren't variants of the VM platform to distinguish.

Leave a copy at the old name to not immediately break illegal uses.

TEST=ci
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,flutter-frontend-try,flutter-linux-try
Change-Id: Ie76fa7f16940aa1ba8d582eb5197f0ae55dc8938
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429828
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-16 18:33:38 -07:00
Nate Biggs 31dc969da2 [ddc] Test DartPad-like hot reload workflow.
Refactors the hot reload test suite to support non-FE server based hot reload. Similar to DartPad it uses a DDC process running in '--persistent_worker' mode and sends bazel requests for each reload.

I call this "stateless" mode because the compilation process itself is not maintaining any state. The necessary metadata is passed from one compilation to the other via a delta dill. This differs from the "stateful" mode where the FE server persists a kernel AST in memory from one compilation to the next.

Disregarding the browsers there are effectively 3 run modes now:
- web stateful
- web stateless (new)
- vm stateful

One key difference between the "stateless" and "stateful" modes is the output format of the JS files. In stateful mode DDC emits a file per library being re-compiled. In stateless mode DDC is emitting a single file with all the libraries.

DartPad's workflow is slightly simpler than what's seen in the stateless mode here. It only supports editing a single library so we skip processing any metadata. To simulate this I've added the special 'main_only' which passes a single library for each reload generation. I've verified that this would fail if not for the change recently made to ddc_module_loader.js.

Change-Id: If05da6dbeded4dd20e9e6d9dfaed52151541a19b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434340
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2025-06-12 17:18:30 -07:00
Ben Konyi 60b217ff2d [ Observatory ] Remove Observatory from the Dart VM
Also cleans up some references to Observatory in various places.

Work towards https://github.com/dart-lang/sdk/issues/50233

TEST=N/A
CoreLibraryReviewExempt: Not modifying public core libraries.
Change-Id: I1f36b4e6f1fd9a59a579d719aafa599906eedb3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429141
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2025-06-11 15:19:55 -07:00
Ryan Macnak 246f211f71 [infra] Add configurations for vm-linux-debug-arm64 and vm-aot-linux-debug-arm64.
Change-Id: Idf908ca5ebe2ac5544d8125282d3fd8f13dfba7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433961
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-10 14:39:04 -07:00
Sam Rawlins 7253f6198d infra: combine all three "analyze flutter" scripts.
The previous three scripts had some redundancies:

* Both the flutter/flutter analyzing script and the flutter/packages
  analyzing script checked out flutter/flutter. Combining them saves
  several minutes.
* The script that analyzed flutter/engine was pointing to the old
  engine repo, which was archived months ago. In pointing the script
  to the new sources at flutter/flutter, this would introduce another
  instance of cloning flutter/flutter. Combining this with the other
  scripts saves several minutes.

The only other little changes to the code are the introduction of
more echo commands, more `pushd`/`popd` vs `cd`, and isolating the
three tasks into functions for readability.

Change-Id: I08414d824c25075a8810b1aa0cc299c64328abbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432881
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-06-04 08:20:04 -07:00
Ryan Macnak cfccc2a2a8 [infra] Add arm64 back to gcc testing.
This was broken during Jammy but this builder now runs on Noble.

Cq-Include-Trybots: luci.dart.try:vm-gcc-linux-try
Change-Id: I39e4a1f924620723d36dad79383637fe5b62add7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432760
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-03 16:06:00 -07:00
Ryan Macnak 03301c9bfb [vm] Support assembly output for Windows.
The resulting DLL lacks debugging information / PDB.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/60812
Bug: https://github.com/dart-lang/sdk/issues/60813
Cq-Include-Trybots: luci.dart.try:vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-release-arm64-try,vm-aot-win-release-x64-try
Change-Id: I305bad0081ec24f27249ad9b75ff8d32fa9c4893
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428200
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-02 12:12:04 -07:00
Ryan Macnak 2565128cb0 [infra] Shard Mac AOT builders.
Use a combination of gen_snapshot's new ability to generate dylibs directly and the copy of llvm in buildtools to avoid using XCode, which is not available in shards.

Add definitions for debug builders now that they can complete without timing out.

Cq-Include-Trybots: luci.dart.try:vm-aot-mac-product-arm64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try
Change-Id: I79924128f11aafab4cd74ea6e9ab5848c64557da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431700
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-02 08:21:35 -07:00
Ryan Macnak 802331361f [dartfuzz] Add missing build target.
Cf. 786b6c5612

Change-Id: Ife3512577662f9b29481a1557f42aa13dc27b6f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431304
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-05-28 07:07:50 -07:00
Ryan Macnak 786b6c5612 [dartfuzz] Extend VM flag fuzzing to dartfuzz and iso-stress.
Extend fuzzing to run dart2wasm.

Increase flag fuzzing timeout to equal generated program fuzzing timeout.

Adjust dartfuzz_test and iso-stress to use relative paths for ease of copy-pasting commands for reproduction.

Cq-Include-Trybots: luci.dart.try:iso-stress-linux-arm64-try,iso-stress-linux-x64-try
Bug: https://github.com/dart-lang/sdk/issues/60804
Bug: https://github.com/dart-lang/sdk/issues/60805
Change-Id: I6898f30b710f26f2c624726f7affee3187804334
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430280
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-27 13:22:18 -07:00
Tess Strickland af5221f442 [test_runner] Convert boolean use-elf to an enum gen-snapshot-format.
Currently, the configuration code only has a boolean option, 'use-elf'
for specifying the output format for gen_snapshot. If false, then the
output format is assumed to be assembly.

Add a new GenSnapshotFormat enum and replace the old 'use-elf' option
with a new 'gen-snapshot-format' option. The new enum has two getters:

* snapshotType returns the appropriate string to pass to gen_snapshot
  via the '--snapshot-type' option.
* fileOption returns the name of the option used to specify the
  output path for the given format.

In addition, make it so the Configuration only has a non-null
genSnapshotFormat field if the compiler is Compiler.dartkp to avoid
spurious differences in Configurations that are created with different
GenSnapshotFormat values when the configurations in question don't
actually call gen_snapshot.

TEST=pkg/smith/test/configuration_test.dart (and the CI in general)

Change-Id: I7f17dc8d3a1bb6d4bf57750bc5ef4a16b8a78c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429980
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-05-26 08:53:03 -07:00
Alexander Markov 57174f5f87 Add vm-aot-dyn-linux-product-x64 builder
Change-Id: Ie404ccf9bad906ee4e93dcb153ff6c117494fc69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430200
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2025-05-21 12:10:53 -07:00
Ryan Macnak 9907c35974 [infra] Accept RBE setting from the builder config for Windows ARM64.
Remove dead IA32 builders.

Change-Id: Ie9ef8510f5431ed3fee4945b9d420b9b3984c9e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429827
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-05-21 09:18:20 -07:00
Ben Konyi a067d75f8f [ Observatory ] Remove legacy Observatory VM service tests
Clean up test_runner and the test matrix to remove all references to
the service test suite and delete the tests.

Work towards https://github.com/dart-lang/sdk/issues/50233

TEST=N/A

Change-Id: Ie3adb0d007d71f9a223843d739e57cbdb5be0d59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429140
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2025-05-20 10:33:53 -07:00
Ryan Macnak f4fa8b7ca6 [infra] Use x64 reclient on Windows ARM64.
Switch build to use Clang. This somewhat degrades FFI testing, but reduces build time by roughly half or one hour.

Cq-Include-Trybots: luci.dart.try:pkg-win-release-arm64-try,vm-aot-win-debug-arm64-try,vm-aot-win-release-arm64-try,vm-win-debug-arm64-try,vm-win-release-arm64-try
Change-Id: Ie267942e99934312b228cfadcd6d5b8477f855c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-19 17:31:29 -07:00
Ryan Macnak ecfce50b5d [infra] Remove IA32 from dartfuzz, GCC and MSVC testing.
Bug: https://github.com/dart-lang/sdk/issues/49969
Cq-Include-Trybots: luci.dart.try:vm-gcc-linux-try,vm-msvc-windows-try
Change-Id: Idf24c48fee5fc5bb757b49bd8941573822496090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429223
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-05-19 10:28:00 -07:00
Ryan Macnak 1b1418416c [infra] Stop testing IA32 on benchmark-linux.
Golem no longer runs benchmarks for IA32.

Change-Id: Ia3a84a7d21e7d9d13394cd114760a38fbb36600f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428160
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-12 13:15:45 -07:00
Ryan Macnak aa0a29c966 [infra] More setup for Mac and Windows ASAN.
Change-Id: I7cec0e5823410ee9dea2074c32f2ccb6f0aabceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427960
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-05-12 10:31:34 -07:00
Ryan Macnak 6dc7c6480a [infra] Refactor X64 sanitizer builders to match ARM64.
Add builder definitions for ASAN on Mac and Windows.

Combine reload and reload rollback into one builder.

Change-Id: If464f82d1d8c0560f4e7f1e341f59e5f29301a30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427303
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-07 14:28:20 -07:00
Ryan Macnak ee16e3625e Rebalance isolate stress testing shards.
Cq-Include-Trybots: luci.dart.try:iso-stress-linux-x64-try,iso-stress-linux-arm64-try
Change-Id: Ie47b15116053870b04ad95eba0efb6f36d7a35cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424341
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-07 07:49:51 -07:00
Alexander Markov cce62d31ea [dyn_modules] Enable pkg/dynamic_modules tests in VM/JIT configuration
Change-Id: Ic7d9ed514969eb72066812f442b51129e4d27204
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426680
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-05-05 16:18:30 -07:00
Ryan Macnak 32c11b5686 Extend ARM64 sanitizer coverage.
Cq-Include-Trybots: luci.dart.try:vm-msan-linux-release-arm64-try,vm-asan-linux-release-arm64-try,vm-ubsan-linux-release-arm64-try,vm-tsan-linux-release-arm64-try
Change-Id: I16d5113e49435b168a27fbf8de94bc487006893f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426541
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-05-05 14:53:53 -07:00
Alexander Markov d07c0cdc88 [dyn_modules] Add vm-dyn-linux-debug-x64 builder
Change-Id: I53b631931b600c1c22ee538a70b30b5ec9263d1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-05-05 11:28:18 -07:00
Martin Kustermann c9e3c3324c [dart2wasm] Allow running dart2wasm tests on safari on Mac
This doesn't add a builder yet, but allows running tests locally on a Mac.

Change-Id: I1e1d1158d7d443df5896a759a669db47b1eb420f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426461
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-05-05 03:18:29 -07:00
Daco Harkes 245498232c [deps] Roll dart-lang/native
`package:native_assets_cli` has been split up and
`package:native_assets_builder` has been renamed.

Change-Id: Ic9d5c21bb3c7ecf7924fdee6b4281153ad37fac5
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/+/425504
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-05-01 02:18:11 -07:00
Alexander Aprelev 9a31095181 [build] Introduce 'arch' parameter for stress test script.
Fixes https://ci.chromium.org/ui/p/dart/builders/try/iso-stress-linux-arm64-try/4

Change-Id: Iba64548fb3396a3536e3669992d6c778ae9c90cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424700
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-04-25 08:46:28 -07:00
Ryan Macnak 8308d6553c Extend isolate stress testing to ARM64.
Cq-Include-Trybots: luci.dart.try:iso-stress-linux-try
Change-Id: Ie0c2a281a4edc570b6532faadf01f06be259fd18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400144
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-04-23 13:05:53 -07:00
Sam Rawlins 8d62a1f104 Support the analysis server compiled as AOT.
This change adds a build target (see utils/analysis_server/BUILD.gn)
called 'analysis_server_aot'. This new target is _not_ included in the
Dart SDK (the create_sdk target). It's "opt-in" "for development."

The name of the new output file matches that of other snapshots (see
the dartdevc snapshots).

Then we do special work in the plugin manager if "we are AOT." An
analysis server running as AOT cannot spawn Isolates from a dart
source files; we must first compile a dart source file to AOT as well,
then we can spawn an Isolate to that AOT file.

_Then_ when we run pub, we can no longer rely on using
`Platform.executable`. `dartaotruntime pub get` is not a thing. We
must instead find the `dart` tool on disk. To do that, we copy some
complex discovery code from dartdev.

Work towards https://github.com/dart-lang/sdk/issues/53402

Work towards https://github.com/dart-lang/sdk/issues/53576

Work towards https://github.com/dart-lang/sdk/issues/50498

Manually tested:

* [+] analysis_server JIT snapshot works in IDE.
* [+] analysis_server JIT snapshot works in IDE, with a legacy
      plugin (custom_lint).
* [+] analysis_server JIT snapshot works at commandline.
* [+] analysis_server AOT snapshot works in IDE.
* [x] analysis_server AOT snapshot works in IDE, with a legacy
      plugin (custom_lint) - BROKEN. Need similar work that is done
      for new plugins.
* [x] analysis_server AOT snapshot works at commandline - BROKEN.
      I think a fair bit of refactoring is required in dartdev
      lib/src/analysis_server.dart to use `VmInteropHandler.run` or
      similar.

Change-Id: I53173c716fa2a763331ef524a96304f62165810e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417942
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-04-23 11:45:19 -07:00
Ryan Macnak 4ab313cf09 [vm, test] Enable some AOT testing for Fuchsia.
Fix the standalone embedder's ELF loader to open files with the executable permission.

TEST=ci
Bug: b/399714829
Bug: https://github.com/dart-lang/sdk/issues/60442
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Change-Id: I2652a5849462ce63585550e6c581cc578a228955
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419341
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zijie He <zijiehe@google.com>
2025-04-01 09:50:12 -07:00
Mayank Patke cc0527decb Remove babel from DEPS and (dart2js) IE support from test infra.
Tested: N/A
Change-Id: Ib1804b49c40cac9be52e732090e8160444ebb48d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417948
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2025-03-28 11:26:47 -07:00
Mayank Patke 945b031f5e Delete js_platform_hostasserts fileset.
The hostasserts and non-hostasserts filesets do not differ significantly
and can be merged for ease of maintenance. The cost of copying extra
files is small compared to building, and we currently lack the
granularity to see meaningful savings in builds if we keep them separate.

Change-Id: If8e3dd1013f60b05dabb104c632abd7a1638fe1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417947
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2025-03-28 11:26:47 -07:00
Jason Simmons 7533d042bf Specify the base branch when running "flutter_plugin_tools analyze"
flutter_plugin_tools is now querying FETCH_HEAD by default after the changes in https://github.com/flutter/packages/commit/8c287e99d62396402f9a8eb89d9704a5ba6cb8c0

This causes issues for the analyze_flutter_packages.sh script, which creates a clone of the flutter/packages repository that does not have a FETCH_HEAD.

With the --base-branch flag flutter_plugin_tools will instead query the head of the main branch.

Change-Id: I5aa69b80789fdf85497974cf29d25a66166ddc3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418200
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-03-27 02:12:21 -07:00
Ömer Ağacan ce2a048f30 [infra] Update test matrix with dart2wasm --minify tests
Change-Id: I1911eb2bedbff2c6b2b075b8f0ccd6947f08c561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416980
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-24 08:48:04 -07:00
Ömer Sinan Ağacan bb0184365d [dart2wasm, infra] Add dart2wasm minify test configuration
Change-Id: I4639bcad207b7832c6eb2f77a1751ebb03a84bbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415583
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-19 02:43:18 -07:00
Ömer Ağacan 2337553259 [infra] Add more documentation on builder names in tools/bots/test_matrix.json
Change-Id: I975ee88145ec59a4579d458f144b7de19fe5e10b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415880
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-17 08:09:30 -07:00
Nicholas Shahan 03293b52f5 [dart2js/ddc] Cleanup sound flag from benchmark test
Updates test to match the updates to the actual invocations on golem:
https://chrome-internal-review.googlesource.com/c/golem/+/8082532
https://chrome-internal-review.googlesource.com/c/golem/+/8082531

Change-Id: I171560f42c70bf59568d6c96325899be2eceb754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386082
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2025-03-07 15:10:02 -08:00
Nate Biggs d5f82b7054 [dart2wasm] Add dynamic module tests to dart2wasm test builders.
3 failing tests have been approved.

Change-Id: Ia38cbce99e739f2ce67d0d60236b3006635837ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414163
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-03-07 09:52:01 -08:00
Alexander Thomas ae5a55bca0 [infra] Remove CFE weak testing steps
Change-Id: I17194ecd70dbed796de6a867655631e8d40cf91b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413780
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2025-03-06 01:04:40 -08:00
Johnni Winther 0060b0f665 [cfe] Remove nnbd mode
TEST=existing

Change-Id: I30bbadb74e81c7f4aaa444d1e2f6f5ffc2005d4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412881
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-03-04 01:46:51 -08:00
Martin Kustermann 20fc102287 [dart2wasm] Switch to only using JS strings
Currently we have 3 different string types (JS Strings, OneByteString
and TwoByteString)s. There's some advantages to this, mainly that
if strings are used purely inside Dart we have more control over
optimizing them. But it does come with some issues

* Operations on mixture of strings are slow
* We get JS strings from outside (in DevTools e.g. websocket messages)
* Any kind of DOM interaction requires copying strings
* Regular expression matches can result in O(N*N) instead of O(N)
* Encoding of string literals/constants is terrible, high size overhead
* ...

Now that there's a standardized way to access JS strings (via
the `js-string` builtin spec) and this standard is finalized and
enabled in Chrome & Firefox it makes sense for us to switch to it.

It reduces app size:

* Smaller size: hello world -25%, flute -5.5%
* Faster startup

The performance changes are nuanced, some workloads will improve
significantly, some workloads will regress.

Improvements will come especially in cases where
strings are concatenated (due to JS not actually allocating new
strings in this case). That impacts e.g. string interpolations,
string buffer, json-to-string encoding, ...

Regressions will come especially for cases where we have to
construct strings from bytes (e.g. in utf8 decoder, utf8+json
decoder) - mainly due to having to go through an intermediary
`WasmArray<WasmI16>` to allocate strings. Also in cases where we
access individual char codes from the strings.

There's some follow-up improvements we can do, but it's better to
not iterate on this CL even longer but get it landed.

This CL will make the benchmarking system use
`--require-js-string-builtin` as well as most of test CI
(in `pkg/dart2wasm/tool/compile_benchmark`)

Though we run some configurations via overriding with
`--no-require-js-string-builtin`
(in `tools/bots/test_matrix.json`)

Issue https://github.com/flutter/flutter/issues/159400#issuecomment-2538593980
Issue https://github.com/dart-lang/sdk/issues/59699

TEST=ci

Change-Id: I238ac65efe092de569da870f23134f889ac929f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392903
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-02-27 00:33:34 -08:00
Mayank Patke 0c55c7e573 Remove unsound web configurations from test matrix.
This CL also removes references to unsound .dill files from the test
matrix and other build scripts and disables some of the option handling
that would lead to requiring unsound .dill files.

Change-Id: I89f701f8f5e1168bf974b5b44bfbafd5a39954fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412401
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2025-02-26 15:57:55 -08:00
Ryan Macnak 690b380a6a [infra] Add configuration for testing SIMARM64 on ARM64.
Bug: https://github.com/dart-lang/sdk/issues/60204
Change-Id: Id49d144bedb7eb2047ee1cc36dd737bff62e808e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411840
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-02-25 13:22:17 -08:00
Martin Kustermann 3b750c5545 [dart2wasm] Generate *.support.js feature detection files
The file will contain a JS expression that evaluates to a boolean.
If it (at runtime) evalutes to

  * `true` it means that all required features are supported by the JS
    environment and the dart2wasm-compiled app can be used

  * `false` it means some features were not present in the JS
    environment and the dart2wasm-compiled app shouldn't be used,
    instead a dart2js fallback may be used

We introduce this mechanism to allow users, at compilation time, to tell
dart2wasm to take advantage of new spec features and allow the runtime
to self-detect whether they are available and fallback to dart2js if
not.

The first feature we introduce (already in this PR) is
`--require-js-string-builtin` that will tell dart2wasm it can assume the
`js-string` builtin is available (and emit corresponding `*.support.js`
code to detect it).

If the flag was passed, we take advantage of the `js-string` import
mechanism for string constants that doesn't require emitting them in the
mjs file (which significantly reduces code size and improves startup
time - compared with emitting JS strings in the mjs file).

We enable `--require-js-string-builtin` on one CI configuration for
testing that if we don't use any polyfill, the imports of the builtin
functions as well as magical utf8-encoded wasm imports work.

We also use a template mechanism to generate `*.mjs` as the code
becomes more readable (e.g. to conditionally include the js string
polyfill)

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

Change-Id: Ic7e7818a2d5269095935022941352beeb9fed731
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408781
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-02-10 06:17:49 -08:00
David Morgan 126af93f38 Remove macros build tests.
Change-Id: I2e86ecb8298713597780b23416e3bf1832cfd50e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406821
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2025-01-30 09:11:16 -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
Ryan Macnak c3dd74ba05 [infra] Split build steps for vm-win-{debug,release}-arm64 to avoid timeouts.
Change-Id: I720be4bdb27fe41c76f4d485d9a6d9ce5b7a5357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404700
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-01-21 10:20:29 -08:00