Commit graph

97923 commits

Author SHA1 Message Date
Kallen Tu 7a248040c8 [analyzer] Issue 53793: Resolve enum arguments even if the constant is non-serializable.
The analyzer used to crash when there's a non-serializable constant enum.
The issue was that we would not resolve any of its arguments if we find that it's non-serializable.

This change resolves the enum arguments, regardless.

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

Bug: https://github.com/dart-lang/sdk/issues/53793
Change-Id: I67508a9d76cce385533c963dabf7a20d9559d9ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331747
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-27 19:18:58 +00:00
Stephen Adams 0a2141b134 [tests] Make language/operators/left_shift_test work for web numbers
Change-Id: I6911a4b6e9d253c94257ccfed3d5d7451e812521
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332491
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-10-27 18:42:28 +00:00
Stephen Adams 68af0bb004 [tests] Fix language/double/int_to_string_test for web numbers
Change-Id: I69413abbeaabe2888d23fa7a37988931b95d59ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332488
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 18:07:51 +00:00
Stephen Adams 5e8e6aaefe [tests] Fix web-number edge cases in language/operator/modulo_test
Change-Id: Ia2b919afa3fca7f78c50a3ea089abe4da8dca8c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332372
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 18:00:42 +00:00
Stephen Adams 2f52ffa9f1 [test] Make language/number/int2_test parse on web compilers
Change-Id: I5cb78bac3d903d5f78cef4a45bda7a16bdc7c09e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332492
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 17:59:49 +00:00
Paul Berry e7c88f127d Flow analysis: fix capitalization convention.
Both letters of `OK` should be capitalized, in accordance with
https://dart.dev/effective-dart/style#do-capitalize-acronyms-and-abbreviations-longer-than-two-letters-like-words.

Change-Id: I920436d373d1a597244e5592e568a19d0f22fa86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332065
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-10-27 17:52:39 +00:00
Paul Berry d42390d7c1 Clean up enable/disable logic for flow analysis and type inference tests.
Previously, the logic for enabling and disabling language features in
flow analysis and type inference tests relied on setters in the
`Harness` class that (a) were mostly unmatched with getters, and (b)
were almost exclusively used in just a single one direction
(e.g. `Harness.legacy` defaulted to `true`, so it was only ever set to
`false`).

Cleaned up so that there are explicit `enable` and `disable` methods
in the `Harness` class to cover all the use cases.

Change-Id: I5ccc8585f803fec634cad1472395ea0d135c87c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332064
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-10-27 17:51:44 +00:00
Brian Quinlan c31b4c0ef5 [doc/io] Minor Link.create documentation fixes.
Change-Id: I50932e9cd0c26b2070dd2930866f3fb18bc80763
CoreLibraryReviewExempt: documentation-only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332483
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-10-27 17:25:40 +00:00
Stephen Adams 5239a7836e [benchmarks] Update TypedDataPoly benchmark
Update TypedDataPoly benchmark to use `asUnmodifiableView()` instead
of the deprecated typed data view constructors.

Bug: #53785
Change-Id: I02381e3db37f44b01da25d7cbd728b525ff4899e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332161
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 16:56:03 +00:00
Alexander Aprelev 6a464c9dee Revert "Expire 3.0.0 experiment flags."
This reverts commit 6f29e7fce4.

Reason for revert: broke g3 bot

Original change's description:
> Expire 3.0.0 experiment flags.
>
> TEST=Existing tests covers.
> Change-Id: I161eefdc28c74f63ba1ee926800a01eea03d9930
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331960
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: Ied6f612dc922824ffdadc4660898f3b859922ff5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332582
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-10-27 16:50:09 +00:00
Stephen Adams ca67a27edd [tests] Don't minify language/unsorted/cyclic_type_test for dart2js
Change-Id: I9295c0b04db8334d6526679c78cf30b1e062e321
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332490
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-10-27 16:47:59 +00:00
Paul Berry 83af09021f Front end: Fix field promotion for extension type representation variable.
Update the type inference algorithm so that `FlowAnalysis.propertyGet`
is appropriately called when analyzing code that refers to the
representation variable of an extension type.

Flow analysis requires an arbitrary `Object` to represent the property
in question; this is later passed to
`OperationsCfe.isPropertyPromotable`. We use the synthetic
"representation field" (which is actually a `Procedure`) for this
purpose
(`ExtensionTypeRepresentationAccessTarget.representationField`).

Representation variables are considered promotable if they are public
(see
https://github.com/dart-lang/language/pull/3411). `OperationsCfe.isPropertyPromotable`
can tell if the representation variable is public by checking the name
of the synthetic representation field.

Fixes #53439.

Bug: https://github.com/dart-lang/sdk/issues/53439
Change-Id: I8f7ff8fcd8e5a43de419b8441951b52a555fda1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332480
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-27 16:34:30 +00:00
Jake Macdonald 24936fecb9 [macros] ensure we close the socket if the process fails to start
Change-Id: I29a9583080d27ce286d0c2f9f7dfa2d267b60b9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332600
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-10-27 16:32:35 +00:00
Paul Berry f644a30069 Test field promotability for fields "passed through" extension types via "implements".
Change-Id: Ic5bbb5eb12259d076b697bce7624cde181d7beb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332484
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2023-10-27 16:23:02 +00:00
Erik Ernst 5cebb0f980 Adjust Dart.g such that an extension can not have the name type
The declaration `extension type on(int i,) {}` is ambiguous: It can
be an extension named `type` or an extension type named `on`. This
CL adjusts the specification grammar Dart.g such that it is
disambiguated in favor of being an extension type.
See https://github.com/dart-lang/language/issues/3258 for details.

Change-Id: I74f800a75c6c5061675c345c546a85cff046d27f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332243
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-10-27 16:21:41 +00:00
Stephen Adams c87fec8663 Revert "[typed_data] Deprecate unmodifiable views"
This reverts commit b4bae467d4.

Reason for revert: Flutter plugin contains use of deprecated method.

Original change's description:
> [typed_data] Deprecate unmodifiable views
>
> CoreLibraryReviewExempt: Reviewed in https://dart-review.googlesource.com/c/sdk/+/321922
> Bug: #53785
> Change-Id: I23a064e76a4b359e804f41676b3b775dd02ea183
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331723
> Commit-Queue: Stephen Adams <sra@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>

Bug: #53785
Change-Id: I01998a3d74681ef2d8c804f59a82d51a2e4290e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332580
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 15:22:54 +00:00
Tess Strickland e7fd34b82c [tests] Fix language/type_object/runtime_type_function when obfuscated.
Add the "vm:keep-name" pragma to the class whose name is checked.

Add isObfuscated to guard the check that includes named parameter
names, since currently they are obfuscated, even if the function is
marked with the "vm:keep-name" pragma.

TEST=language/type_object/runtime_type_function on
     vm-aot-obfuscate-linux-release-x64

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

Cq-Include-Trybots: luci.dart.try:vm-aot-obfuscate-linux-release-x64-try
Change-Id: I7698607ed6e1c95860f2e26ede923320a409eba4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332425
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-27 14:02:22 +00:00
Lasse R.H. Nielsen 6f29e7fce4 Expire 3.0.0 experiment flags.
TEST=Existing tests covers.
Change-Id: I161eefdc28c74f63ba1ee926800a01eea03d9930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331960
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-27 13:57:00 +00:00
dependabot[bot] 042be526c5 Bump actions/checkout from 4.1.0 to 4.1.1
Closes https://github.com/dart-lang/sdk/pull/53821

GitOrigin-RevId: b37210be807dcbe0ebc0efb14f39c23a9e8b4ba5
Change-Id: Id21de60d2da66c043be2280eeff9fb0760de44eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331620
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-27 13:23:21 +00:00
William Hesse adc79bc389 Avoid crashes in string concatenation 32-bit integer overflow test
The test standalone/string_overflow_test.dart is causing crashes
and out-of-memory thrashing on some configurations. It was originally
a regression test that concatenating a string with 2^31 characters
did not overflow a 32-bit signed integer.

It was changed to exponentially grow a string until an out-of-memory
runtime exception is thrown in Dart.  On some VM configurations,
this crashes the machine instead.

Restoring it to only check concatenating a string of 2^31 bytes.

Bug: https://github.com/dart-lang/sdk/issues/46225
Change-Id: Ib50625fe14be2613c907a7bc30cd57766693f6aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332423
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-10-27 12:36:29 +00:00
Ömer Sinan Ağacan 3a8d3cdf2f [dart2wasm] Don't generate duplicate selectors for dynamic calls
Change-Id: I8c41e8289400c4673d1268826bfe1cbc161a4d90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332402
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-10-27 12:31:23 +00:00
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