Commit graph

97802 commits

Author SHA1 Message Date
Jonas Termansen c349f992a6 [benchmark] Rename dds to dds_aot in SDKArtifactSizes.
Bug: b/298173463
Change-Id: Ia9d1672e2561e6b35ed5d3c88f8704628857ce7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328480
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-10-27 12:23:23 +00:00
Johnni Winther 219711e6ac [cfe] Use extension type members hierarchy to lookup members
Change-Id: Ife78479add65488f79c5c949a7472e9d7ea22928
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332401
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-27 12:23:20 +00:00
Ryan Macnak d5ad08c027 [infra] Add configurations for Windows and Linux ARM64 pkg builders.
Also renames the test configurations for x64 to include the architecture.

Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: I76e259a059e9fe16f4799d65f2bb5380a9c6fb94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330028
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-10-27 12:22:52 +00:00
Tess Strickland 437223150c [vm/tests] Fix using clause in vm/dart/regress_306327173_il_test.
TEST=vm/dart/regress_306327173_il_test

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-x64-try
Change-Id: Id88bf718b40cd77d733de194eb3cbf73f6578415
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332422
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-10-27 09:25:42 +00:00
Daco Harkes 0cd55a18c1 [vm] Introduce cachable idempotent calls
Adds a `CachableIdempotentCallInstr` that can be invoked via
`@pragma('vm:cachable-idempotent')` if the call-sites is force
optimized.

The object pool is not visited by the scavenger. So, we store the
results as unboxed integers. Consequently, only dart functions that
return integers can be cached.

Cachable idempotent calls should never be inlined. After the first
call the function not be called again.

The call itself is on a slow path to avoid register spilling on the
fast path.

TEST=vm/cc/IRTest_CachableIdempotentCall
TEST=runtime/tests/vm/dart/cachable_idempotent_test.dart

Bug: https://github.com/dart-lang/sdk/issues/51618
Change-Id: I612e896f27add76f57796c060157e14cc687a0fd
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-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv64-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-tsan-linux-release-x64-try,vm-aot-ubsan-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64c-try,vm-aot-win-release-x64-try,vm-appjit-linux-debug-x64-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-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-simriscv64-try,vm-linux-debug-x64-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-tsan-linux-release-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301601
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-10-27 07:55:47 +00:00
sgrekhov db3fdddd07 [co19] Roll co19 to 3011a2e78f407ba3f9a3cf543fe17f5e8f2cc294
2023-10-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2329. Fix FileSystemEntity.type() on Windows (dart-lang/co19#2332)
2023-10-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2330. Remove obsolete error expectation (dart-lang/co19#2331)
2023-10-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2317. Add tests for extension type type parameters in non-covariant position (dart-lang/co19#2318)
2023-10-25 sgrekhov22@gmail.com dart-lang/co19#2291. Update `Link.createSync()` according to the new documentation. Part 1 (dart-lang/co19#2305)
2023-10-24 sgrekhov22@gmail.com dart-lang/co19#2313. [Extension types] Add nullability tests (dart-lang/co19#2324)
2023-10-24 sgrekhov22@gmail.com dart-lang/co19#2323. Delete obsolete test (dart-lang/co19#2327)
2023-10-24 sgrekhov22@gmail.com Fixes dart-lang/co19#2323. Don't test datagram size more than 65503 (dart-lang/co19#2325)

Change-Id: I23b57a58b5cd6452e2beb923dd8cde6fd587f051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332206
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-10-27 07:43:50 +00:00
Alexander Thomas c4b959a78e Improve patch upload instructions for non-committers
Bug: https://github.com/dart-lang/sdk/issues/53726
Change-Id: Ibe9328fabcd343396ce40ebc9c8612f9af349f5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330420
Reviewed-by: Michael Thomsen <mit@google.com>
2023-10-27 07:22:48 +00:00
Sigmund Cherem 73de586423 [web] improve fileapi tests.
These tests had several issues. The fixes are aimed to reduce flakiness
and remove invalid configurations where tests are not providing any
value. Some of the issues include:

* some tests interferered with each other causing a 18% flakiness rate
  in chrome: they used a common file system that ended up being shared
  in a single browser instance. This is why some tests failed when they
  find a file exists before it was created [1].

* some tests were not properly using async_helper/async_minitest, so
  they may complete before they finish executing

* DDC no longer supports these APIs due to
  https://github.com/dart-lang/sdk/issues/53864. We don't intend to fix
  those issues, so there is no purpose in running these tests in DDC at this
  time.

[1]: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8766313714239949697/+/u/test_results/ignored_flaky_test_failure_logs

Change-Id: I1dbb28eba2d962000a4d425563dbc1eb6b55dbed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332266
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-10-27 02:25:20 +00:00
Sigmund Cherem 6b8224d2e5 [web] update transition_event_test.
Similar to the request_animation_test, it's unclear the reasons why this
test is hitting flaky timeouts (rate as high as 70% in DDC!).

This change can hopefully improve handling of
asynchrony in the test and help us investigate further.

Change-Id: I5c6023ccfaa7270b1d1e49d902fe9fa168d0d868
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332169
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-27 02:05:27 +00:00
Sigmund Cherem e0112afc70 [web] delete notification_permission_test.
This test provides very little value. It requests the notification
permissions and waits for an answer. What's happening is that the test
launches a prompt and then waiting for a user to click on the browser
dialog to accept or reject the request.

On the bots, this is consistently timing out in chrome and safari.
Turns out this issue was [identified][1] 5 years ago and the test was marked
as Timeout in the status files for that reason (dart2js) or skipped
(DDC). Back then there were discussions
about whether we could make chrome automatically accept or reject the
request, but there was no traction on that.

If we thought this test was providing value, we could explore whether
there is a way to make bots automatically accept/reject the prompt by
saving some preferences on the test machines. That said, I'm honestly
not seeing much value here. For that reason, I'm inclined to delete the
test instead.

Other reasons to delete mentioned in the review:
* this API may require a secure context, but our test runner doesn't default to use https yet
* this API requires a [user gesture in FF][2]

[1]: https://github.com/dart-lang/sdk/issues/32002
[2]: https://developer.mozilla.org/en-US/docs/Web/API/Notification/requestPermission_static

Change-Id: Ib8d372b2ebfb5859a0a9bc82d50a14ad8badeab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332320
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-27 02:02:29 +00:00
Sigmund Cherem c439c97b80 [web] improve requestanimationframe test.
This test is flaky and causes timeouts 70% of the time in DDC.

The reasons are not clear at the moment, but I noticed that the
test was not properly using async-helper. This change may help
improve our investigation in the near future.

Change-Id: I834265dd6b898098ee7d5210ffe68ef0a6db74a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332280
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-27 01:56:08 +00:00
Sigmund Cherem 7cf0603208 [web] delete element_animate_omit_timing_test.
This test is 61% flaky in dart2js-chrome and 73% flaky in DDC.

This test is almost identical to
lib/html/element_animate_simple_timing_test (long ago it was a separate
case in the same file that used the html multi test configuration). The
only difference is that this test has no deadline for the animation to
complete, while the other test (which passes consistently) does.

My theory is that not including a deadline is the cause of flakiness and
without it, there isn't ,uch we can control to recover consistency. As
such, I don't think we should be including this test anymore.

Change-Id: I5451dbc7053ba0280a64e1bef2e03cc20465ad88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332170
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-27 01:54:25 +00:00
Stephen Adams cb52932c72 [tests, dart2js] Fix test using minified type names
1. Add `Object` and `Map` to the very short list of names that are
unminified in the app.

2. Tweak test to avoid testing minified name.

Change-Id: Ide0cedc2950b5392eb6963403a48c0f89cd1b50a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332368
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-10-27 01:36:28 +00:00
Stephen Adams 8ee403e86c [tests] Fix some tests for web numbers and dart2js production mode
Change-Id: I05a1814f2a2c5810f75708ba72bfafe137122f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332486
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-10-27 01:16:28 +00:00
Stephen Adams e19e4bfaaf [tests/io] Avoid use of deprecated unmodifiable typed data view constructor
Issue: 53785
Change-Id: I47c854c1eafec8ffee30852a94eb6183c222442a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332264
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-26 22:46:39 +00:00
Konstantin Shcheglov 335aec593f Extension type. Issue 53868. Report an error when inherit a method and setter.
Bug: https://github.com/dart-lang/sdk/issues/53868
Change-Id: I5e79cef42453647797a89bed21cac46a318a0f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-26 22:13:22 +00:00
Stephen Adams abf89a6803 [tests, dart2js] Make stack-trace tests work on dart2js
Change-Id: I0986f83f5dcc61e285d1f025449ddd0ed8961a0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-26 21:53:29 +00:00
Ben Konyi 5b390028f6 [ package:vm_service ] Migrate most of the Observatory expression evaluation tests
Change-Id: I2375d829aa8505dc0b69e5ce676dc9d983267bc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332122
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-26 21:43:48 +00:00
Devon Carew 29979649bd [analyzer] simplify the libraries.dart file
Cleanup and re-landing of https://dart-review.googlesource.com/c/sdk/+/317803.

Change-Id: I9fd679fdb111895ce662ecbe6d0fc5844909c3bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332441
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-26 21:43:31 +00:00
Sigmund Cherem 8f4d4391e1 [web] delete file_sample_api_test - a flaky and obsolete test.
This test has non-deterministic failures (rate 30% on mac, 10% on linux
and windows) caused likely by a data-race ([example log][1]). The test
has a write to set the contents of a file, and a corresponding read. The
error makes it appear as if the read occurred before the write
completed.

This API is part of the [createWriter][2] proposal, which was abandoned
early on (almost a decade ago) and documented as deprecated. As a result
I believe this test is providing coverage for obsolete functionality.
In fact, the API for the `write` returns void and appears synchronous,
but my guess is that it is not. There is no API to ensure the write
completes as far as I know. An alternative here would be to use timers
to add a significant delay between the operations.

It is also worth noting that the [requestFileSystem][3] API to access
the FileSystem (used here and in the fileapi tests) is also deprecated
and not supported in firefox or safari.

Given the flakiness issue and the fact that this API is already
deprecated, I'm not really seeing the value in keeping the test.

[1]: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8767600632278735009/+/u/test_results/ignored_flaky_test_failure_logs
[2]: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry/createWriter
[3]: https://developer.mozilla.org/en-US/docs/Web/API/Window/requestFileSystem

Change-Id: I92ad6399218c6a17cfa029a99b99afcfadde0035
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332282
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-26 20:52:19 +00:00
Konstantin Shcheglov cbc21d2738 Issue 53861. Use specific element kind name instead of generic 'class'.
Bug: https://github.com/dart-lang/sdk/issues/53861
Change-Id: Iea029c612da0c2556ecb29500f30573014f5b7ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332366
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-26 20:31:53 +00:00
Sam Rawlins 716b127a1a linter: ubcs: account for when clauses in if-like nodes
Fixes https://github.com/dart-lang/linter/issues/4795

Change-Id: I4cce15ddaf8a669921646fa81dd0e455859e46e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332361
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-10-26 19:56:58 +00:00
pq 95c40c924a introduce context_locator2 scaffolding
Straight copies of existing compilation units.

Change-Id: Icfe43f4eeb6363de6e048799746ee7911a8895df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-10-26 19:43:38 +00:00
Keerti Parthasarathy 334cb78156 Add a test for monorepo
Change-Id: I8405c0244c42640696767f0ac1ec31559c07e18a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-10-26 19:31:13 +00:00
Ryan Macnak 7c5b404eaf [build] Fix Windows linker warning about unrecognized flag.
Change-Id: Iac7536450998f5f841e56ee57e60b36c4e71dabd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332442
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-26 19:23:20 +00:00
Konstantin Shcheglov 059db5cb97 Extension type. Issue 53866. Allow the representation type to be the subtype of implemented extension type.
Bug: https://github.com/dart-lang/sdk/issues/53866
Change-Id: Ic3ac0556695c8ffbb8a4545777ea07a8b52c1e76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332363
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-26 19:23:11 +00:00
Robert Nystrom a096d44753 Roll latest dart_style into the SDK.
This adds support for formatting extension types. It doesn't change any
other formatting except for an exceedingly rare edge case of trimming
trailing whitespace from the first line of multi-line strings.

There is no need to coordinate this with a new pre-built SDK.

Change-Id: Ifd52f9901ba1597ce883c42d6a21329d87936c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332365
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-26 19:07:23 +00:00
Danny Tuppeny 6299529e39 [analysis_server] Try to deflake will_rename_files test
Can't repro the failure locally this time, but my feeling is that maybe the overlay is being applied before the refactor starts. This adds pumpEventQueue to allow the refactor to start before sending the overlay change.

Change-Id: I8078b4cfe000d4155b965a384dbf116ef176fd48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332208
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-10-26 18:34:32 +00:00
Konstantin Shcheglov 49ef0be2bc Add ElementKind.MIXIN, use it for MixinElement.
Change-Id: Ie95c6c331ff437c4d6b99bfc7f9a3109f47c985b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332460
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-26 18:27:39 +00:00
Devon Carew afa7842594 Bump tar to 3383397b082c084c327587a293591fac74bc8af3
Changes:
```
> git log --format="%C(auto) %h %s" 748f6e6..3383397
 https://dart.googlesource.com/external/github.com/simolus3/tar.git/+/3383397 Prepare to release 1.0.2

```

Diff: 748f6e6802..3383397b08/
Change-Id: I9df8ba3aa3d1b4486275db031757721a1b29c92b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332080
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-26 17:58:16 +00:00
Tess Strickland 93b84b5b52 [vm/compiler] Simplify range analysis for IntConverter.
We can simplify and improve the range analysis in IntConverter if we
generalize based on the sizes and signs of the source and target
representations and whether the operation truncates or deoptimizes.

Adds RepresentationUtils::MinValue() and ::MaxValue(), which return the
minimum and maximum value (as an int64_t) for an unboxed integer
representation.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-win-release-x64-try,vm-gcc-linux-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm-try
Change-Id: Ic8dc0d58059e30d85fb2816e15ab3c19fbee461c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332203
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-10-26 17:39:49 +00:00
Stephen Adams 163bd370a0 [tests, dart2js] Make test conditional on dart2js mode
Change-Id: Ibc1a99b4ad95e3df3b6fd85715cd8f0218235771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332300
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-10-26 17:18:28 +00:00
Tess Strickland 56a17a3e85 [vm/tests] Fix vm/dart/regress_306327173_il_test for ASAN.
TEST=vm/dart/regress_306327173_il_test

Fixes: https://github.com/dart-lang/sdk/issues/53870
Cq-Include-Trybots: luci.dart.try:vm-asan-linux-release-x64-try,vm-aot-asan-linux-release-x64-try
Change-Id: I0f507175ad48c88294b626285b5025763c235b17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332420
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-26 17:03:18 +00:00
Nicholas Shahan 6bafe2fbf7 [dart2js] Seal Object prototype in browser tests
Ensures there is no dependency on modifying the native JavaScript
Object prototype by preventing modifications when running browser
tests.

Change-Id: Ifb22018736f90b339b9c60bbab095fb3e1c483e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320842
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-10-26 17:00:21 +00:00
Nate Biggs 23282457ad [dart2js] Small improvements in emitting JS.
- Remove unused Map in source map emitter logic.
- Buffer output writing for both JS and source maps. Previously we were only buffering the source map writes.

During local compilations of a large program combined these amount to a >100MB improvement in memory usage.

Change-Id: I633c2f81aa28744e30c6a706bb3927423b38a6e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331361
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-26 16:00:51 +00:00
Keerti Parthasarathy ed1842480c Revert "Add a pass to dart fix for pubspec changes"
This reverts commit 3c6ceb851a.

Reason for revert: This breaks flutter tests - running dart fix in the flutter_svg package adds a flutter_svg: any dependency line to pubspec.yaml.

Original change's description:
> Add a pass to dart fix for pubspec changes
>
> Fixes #48997
>
> Change-Id: I543a550247920e121837f2bc6c75b5c1acecc670
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331740
> Commit-Queue: Keerti Parthasarathy <keertip@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

Change-Id: I38a234b558d03c6c5c6c00f9ea55db7e1fbc7a89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332171
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-10-26 15:15:19 +00:00
Michael Thomsen d96c71b1f9 Link to dart fix docs
Change-Id: Ifc2f5c49744d796cb91d6fb207e799d5086c8a75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332207
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-10-26 14:13:43 +00:00
Danny Tuppeny 28456ae716 [analysis_server] Fix LSP "Fix All" command for part files
The original code here called getResolvedLibrary() and then _fixErrorsInLibrary which meant if it was invoked in a part file it would do nothing (it found no resolved library) and in a container file it would also fix the part file (because _fixErrorsInLibrary enumerates the units).

This fix splits _fixErrorsInLibrary in two so it can fix libraries and units and calls the unit version from the LSP Fix All command.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4813

Change-Id: Iea72c572b6e442f6846f5ba823194b30142606db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332242
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-26 14:11:12 +00:00
Vyacheslav Egorov ac32223cea [vm/compiler] Improve CreateArray compile type
If we have constant type arguments include them
into the type.

This CL also expands IL tests framework with the
capability to match CompileTypes.

TEST=vm/dart/regress_53817_il_test

Bug: https://github.com/dart-lang/sdk/issues/53817
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-product-x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-obfuscate-linux-release-x64-try
Change-Id: I48722b002d9cd436dbc8ca3c9afbefa124f18996
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331900
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-26 12:40:02 +00:00
Vyacheslav Egorov a97f85ef0e [tfa] Make kPrintStats runtime configurable
Currently we have to ask users to run TFA from source
(which requires a lot of dances with figuring out
command line and checking out Dart SDK).

However statistics printing does not impose any runtime
overhead (as opposed for example to kPrintTimings
which tracks timings) so it can be runtime configurable.

Inspired by https://github.com/flutter/flutter/issues/136529

TEST=tested manually

Change-Id: Ie496d6babb1e8cbbbb9a665b14656ea334a2eeed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331881
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-10-26 11:19:24 +00:00
Johnni Winther 931e27753a [cfe] Support inherited combined member signatures
This add support for inherited combined member signatures, both from
source and from dill.

Change-Id: I163f2b30c3242ba98692d7e9b52ef93fd0d6a903
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332201
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-26 09:56:05 +00:00
Johnni Winther 4b2cf0744d [cfe] Add TypeDeclarationType and asInstanceOf
This add a common sealed superclass TypeDeclarationType for
ExtensionType and InterfaceType and uses it to add a common
asInstanceOf method to ClassHierarchy.

Change-Id: I7294e41069b063305c3bd4e384ff90614a3936a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331981
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-10-26 08:46:48 +00:00
Tess Strickland 3a41ee6d8d Revert "[vm/compiler] Consistently use PointerBase.data values as FFiIntPtr."
This reverts commit 5c4fd50667.

Reason for revert: breaks ffi/data_test on ARM bots

Original change's description:
> [vm/compiler] Consistently use PointerBase.data values as FFiIntPtr.
>
> Also if converting an unboxed int with only non-negative values
> that fit in 32 bits to a uint32, then keep the range from the value.
>
> TEST=regress_306327173_il_test
>
> Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try
> Change-Id: Id9e7c2d5f477e560822a02574739c57d77b5a6d1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332202
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

Change-Id: I35f6b3b03c9d2dec0f35005f850dab7f2dd54515
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332205
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-26 08:11:11 +00:00
Stephen Adams 8ab032574a [observatory] Avoid deprecated UnmodifiableUint8ListView
TEST=ci
Issue: 53785
Change-Id: I1e3696b32b165813f895dfafb9da8fd50bb41ffc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332263
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-26 01:31:29 +00:00
Sigmund Cherem e557275397 [web] mark deferred/many_parts_test as slow.
This test has failed with a timeout in a flaky manner: 48% on windows,
13% on linux bots. Unlike other timeouts, this is a legit slow test
because the compiler takes too long to build it. That seems justified
given that this is a stress test for deferred loading, so it is expected
to be slow.

This CL updates the status file for non host-asserts configurations, since the
hostasserts configuration already has 4x budget.

Change-Id: Ie6b53a8c7ef5f6c9b9c6748386db2ae505c2eca2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332281
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-10-26 01:25:55 +00:00
Sigmund Cherem 744231d16e [web] delete native_gc_test.
It seems to me that this test doesn't provide value for the JS backends.
The test was first introduced 11 years ago to investigate and fix GC
issues in Dartium that happened across the Dart/DOM boundary (see
https://github.com/dart-lang/sdk/issues/1448).

While the test works in many configurations, this test is flaky in
dart2js-firefox (37%) and DDC (8-14%).  I haven't investigated the
reasons behind the timeouts, but given the origins of the test, it
doesn't seem worth fixing it.

Change-Id: I3eaf2273209b587ce5ecfcf4a2bbbd9cb8b990fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332167
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-26 01:17:20 +00:00
Sigmund Cherem a7104c813f [tests] update periodic_timer tests to reduce flakiness.
These tests check for lowerbounds on the time it took to fire an
event. Unfortunately, browsers may complete events ahead of time.
This has caused these tests to be flaky in dart2js and ddc [1]

In a local experiment, we've seen timers complete +-15ms from
the expected time. Most often they are around +-5ms, but those more
extreme cases do happen. Recent flakiness logs show some good samples:
* off by 1ms: [2] and [3]
* off by 4ms: [4]
* off by 13ms: [5]

This CL makes two adjustments to reduce flakiness:
* account for the fact that timers may complete early (checking that
  they are >= than the expected timeout - 40ms)
* increase intervals to 50ms in order to prevent overlap between two
  events in the worse scenario that both happen on the extreme variances
  (+15ms and -15ms respectively).

[1]: https://dart-current-results.web.app/#/filter=lib/async/periodic_timer,dart2js,ddc&showAll
[2]: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8766776511992750881/+/u/test_results/ignored_flaky_test_failure_logs
[3]: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8766798962026535617/+/u/test_results/ignored_flaky_test_failure_logs
[4]: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8767378609439308945/+/u/test_results/ignored_flaky_test_failure_logs
[5]: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8767357850408867553/+/u/test_results/ignored_flaky_test_failure_logs

Change-Id: Ib46d6f33f5c2b1458f393e8b4c75c84453e73024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331210
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-26 00:56:43 +00:00
Brian Quinlan 097c84f11b [io/doc/test] Modify the Windows symlink resolution behavior so that resolving a link that points to a non-existent file results in a type of notFound, which is consistent with all other platforms.
Bug:https://github.com/dart-lang/sdk/issues/53684
Change-Id: I1b594e1a85906d1f510358eec71792ea15ab801b
CoreLibraryReviewExempt: VM- and doc-only
Tested: unit tests
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331841
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-10-25 23:14:38 +00:00
Ryan Macnak 10a5df43af Roll perfetto to 13ce0c9e13b0940d2476cd0cff2301708a9a2e2b.
This fixes the build on gcc 13.2.0.

Change-Id: I53559e05a6dc372a4ae324de4f24f366212b40b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332162
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-25 22:34:39 +00:00
Kallen Tu 40aacb3482 [analyzer] Mark const iterables unknown if there is a unknown bool in an If Statement entry
Bools from environment such as `dart.library.js_util` are represented as unknown bools. They currently produce a `NON_BOOL_CONDITION` error when used in if statements in const lists, which is not the behaviour we want.

This CL marks iterables with these unknown bools in if statements as unknown and avoids other calculations like `==` upstream.

Bug: https://github.com/dart-lang/sdk/issues/53363, https://github.com/dart-lang/sdk/issues/51607

Change-Id: Ibd3e6dbc6a507c93516bc2782d59d0e1e452f17d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326261
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-25 22:31:32 +00:00