Commit graph

100462 commits

Author SHA1 Message Date
Brian Quinlan 9b2b0ac848 [docs,io] Clarify that isDirectory is not meaningful for FileSystemDeleteEvent.
Bug: https://github.com/dart-lang/sdk/issues/55130
Change-Id: I43c95218cd9f6b87ab242affa8cc2b9d42df7d96
CoreLibraryReviewExempt: documentation-only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357663
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2024-03-30 01:03:08 +00:00
Nate Biggs 50360c51ce [dart2js] Add retry to dart2js deferred loading multi loader hook.
In some cases the code downloaded through this hook is corrupted and one or more part files don't get registered correctly. The implementer of this hook just gets a 'download success' event and calls the success callback. It's not until dart2js itself checks if the part file as registered that we know it failed. In this case we should retry the load request with only the failed part files.

This matches the retry logic from the non-multi deferred load hook.

Change-Id: I655acd9f519cba1837d5cb367365a7be7254df03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360380
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-03-29 23:47:13 +00:00
Sam Rawlins cd90f27317 meta: Introduce TargetKind.constructor
Fixes https://github.com/dart-lang/sdk/issues/47421

Doc nits while I was looking:

* wrap CHANGELOG to 80 characters
* correct docs on field, getter, method, parameter, setter, typedef,
  type parameter,

Change-Id: I97476e08b6773be53dbce190007443f22626d498
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360124
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-29 19:15:40 +00:00
Konstantin Shcheglov 833277f806 Completion. Remove includedElementKinds/Names.
We don't use them anymore, for some time now.

Change-Id: Ieae70d6936a72dcaac296c967ad3bac78fd4d25c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360442
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-03-29 19:10:39 +00:00
Sigmund Cherem 4e0ece2722 [ddc] fix flaky for-loop test.
This test was flaky about 3% of the time in linux bots due to a race
condition.  Details are shared in
https://github.com/dart-lang/sdk/issues/55299. TLDR, when one test case
completes and it's execution is resumed (program 1),  the test driver
sets up a breakpoint for a new test case concurrently and schedules to
run main again (program 2). Depending on when the breakpoint is set, it
could be hit by either program 1 or program 2.  If both programs are in
the same state when they hit the breakpoint, then it doesn't matter
which program we use to validate the test expectations (a benign race
condition).  However, this is problematic when the state is different,
which can happen when test 1 and test 2 both are using the same
breakpoint in a loop. This is what happened for the `forLoopTestBP` in
this CL.

To workaround this data race between two test cases, I decided to simply
combine them into a single test case. A different alternative is to copy
the test function and use a different breakpoint, but that didn't seem
worthwhile in this case.


Change-Id: I561c2a25d33d56a8543fe061342cab9cceafd4e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359721
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-03-29 18:50:50 +00:00
Alexander Markov a33270dc0a Revert "[vm] Replace array GetIndexed graph intrinsics with flow graph builder implementation"
This reverts commit d24b5d1f5e.

Reason for revert: performance regression
(Graph intrinsics are applied to dynamic invocation forwarders,
but flow graph builder implementation isn't.)

Original change's description:
> [vm] Replace array GetIndexed graph intrinsics with flow graph builder implementation
>
> _Array, _GrowableList, internal and external typed data 'operator []'
> are now implemented in the flow graph builder.
>
> Unlike graph intrinsics, flow graph created in the flow graph builder
> can be used by the inliner. Corresponding graph intrinsics and native
> methods are removed.
>
> Also, this change adds missing external typed data indexing operations.
>
> TEST=ci
>
> Change-Id: Ic19784481feadf54c096a587413e67b4e18353dc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359940
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

Change-Id: I2b31b06edaa4b8a09d256f25f923d4489e28518b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360305
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2024-03-29 17:27:50 +00:00
Konstantin Shcheglov 15d310a851 Completion. Migrate LibraryMemberContributor.
We migrate all pre-existing contributors into the new schema, `InScopeCompletionPass`.

Change-Id: Ifa2834d79525f9efefff783900e83fd4d5843b35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358684
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-03-29 17:11:22 +00:00
Sam Rawlins f0c4243e6c linter: avoid_dynamic_calls: don't report proper cascade usage
Fixes https://github.com/dart-lang/linter/issues/3897

Change-Id: Ifdbbb1df0f8bce4f9616883fc159cbc251e8628c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360303
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-29 16:32:21 +00:00
Sam Rawlins fe05845b45 linter: allow unnecessary parens in spreads
Fixes https://github.com/dart-lang/linter/issues/3816

Change-Id: I3e5928e939de18b95cb27d2214a16b045c9aabc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-29 16:30:53 +00:00
Konstantin Shcheglov 6e0978be76 Completion. Migrate RecordLiteralContributor.
Change-Id: I0cf393c121f714f596dac41bdd853d2dc3422f39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358781
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-29 16:19:27 +00:00
Keerti Parthasarathy 690598221b Migrate ExtesnionMemberContributor.
The ExtensionMemberContributor is used in the NotImportedContributor, so cannot be deleted until that has that has also been migrated.

Change-Id: I272532e68b7c7038469d3898f93ea78b754ce67f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-03-29 16:04:48 +00:00
Sam Rawlins a70ee07cc2 Add TargetKind.typeParameter
Fixes https://github.com/dart-lang/sdk/issues/49796

Change-Id: I434c3bba20cbcf26177db4f0dc199bb696ab04de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-29 06:40:43 +00:00
Alexander Markov d24b5d1f5e [vm] Replace array GetIndexed graph intrinsics with flow graph builder implementation
_Array, _GrowableList, internal and external typed data 'operator []'
are now implemented in the flow graph builder.

Unlike graph intrinsics, flow graph created in the flow graph builder
can be used by the inliner. Corresponding graph intrinsics and native
methods are removed.

Also, this change adds missing external typed data indexing operations.

TEST=ci

Change-Id: Ic19784481feadf54c096a587413e67b4e18353dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359940
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-03-28 20:43:59 +00:00
Elliott Brooks 0667799664 Roll DevTools 2.34.1 into the Dart SDK [for cherrypick into beta]
Follow up to https://dart-review.googlesource.com/c/sdk/+/360181 but with the correct DevTools version: https://github.com/flutter/devtools/pull/7490

Bug: https://github.com/flutter/devtools/issues/7483
Change-Id: Ie64f72bbc473230b182f348e1f53291a1c771b34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360281
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2024-03-28 20:24:28 +00:00
Kallen Tu b6ac281270 [linter] Update missing_code_block_language_in_doc_comment to avoid linting indented code blocks.
After trying to add the lint to flutter (https://github.com/flutter/flutter/pull/145354), I noticed that we lint on indented code blocks, which we should not be doing.

This CL uses the new code block type in https://dart-review.googlesource.com/c/sdk/+/358326 to make sure we only lint on fenced code blocks.

Change-Id: Ic13596dd3c95ce4ff64deeffe02da0fdb7a298e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359981
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-03-28 20:13:29 +00:00
Keerti Parthasarathy b6137f7cee Issue 54893: Add a test for sorting imports that span 2 lines.
Change-Id: I9ed0a1b754d3f201d760813dafa4c1049b7124f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-03-28 17:54:51 +00:00
Devon Carew 3b23ffe53f [deps] rev dartdoc, http
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (79c1675..bf6080c):
  bf6080c8  2024-03-27  Sam Rawlins  Remove unnecessary EnclosedElement mixin (dart-lang/dartdoc#3736)
  c5bb9066  2024-03-26  Sam Rawlins  Bump to 8.0.8; fix changelog wrapping (dart-lang/dartdoc#3735)
  4e096f84  2024-03-26  Sam Rawlins  Format parameters better (dart-lang/dartdoc#3731)

http (7949d6f..280d361):
  280d361  2024-03-27  Derek Xu  [package:http_profile] Expand README.md (dart-lang/http#1162)
  9fddb1c  2024-03-27  Brian Quinlan  Fix the connectionInfo getter (dart-lang/http#1163)
  9f47439  2024-03-27  Derek Xu  [package:http_profile] Make connectionInfo a top-level field of HttpClientRequestProfile (dart-lang/http#1160)

Change-Id: Ib50584ef7d7914ab262bb01eeb087e44c34e4dc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360240
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-03-28 16:58:18 +00:00
Ryan Macnak b776196f0b Roll Fuchsia SDK to 19.20240327.2.1.
Fixes -Werror,-Wextra-qualification with newer Clang.

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Change-Id: I6bf5e662fd850930d7db0cf331e99e5b1a2b30be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360180
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-03-28 16:47:49 +00:00
Sam Rawlins 80d16cf9e5 DAS: Inline prepareNewStatementLocation into add_call_super
This was the only caller, and it always passed in `true` for `first`.

Inlining the function is the same number of lines as calling the function and using it's output.

Change-Id: Ifee204e68f2b7d168fe6078ac7f8ec66261ff76b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-28 16:27:51 +00:00
Sam Rawlins 7d0a2e56eb DAS: wrap new integer division in parens
We use precedence of the parent of the previous `toInt()` invocation to
determine if parentheses are necessary.

The one change to the _existing_ test may be surprising. But here's how
it is: The code pre-fix had unnecessary parentheses, and the fix
previously removed them. That is not the fix's job, so we should keep
whatever (unrelated) parentheses were in the input.

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

Change-Id: I045860a663c3c3a55d93038551f64e658feb56d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360183
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-28 16:26:33 +00:00
Daco Harkes eb50c2683c [vm/ffi] Throw on attaching NativeFinalizer to deeply immutable object
This CL

* adds a `kind` to `CheckWritableInstr`,
* starts using `CheckWritableInstr` in JIT mode, and
* adds support for `CheckWritableInstr` ia32.

TEST=tests/ffi/vmspecific_native_finalizer_deeply_immutable_test.dart

Closes: https://github.com/dart-lang/sdk/issues/55067
Change-Id: I0b397daba12cfc8b885401169889f7cd7c040166
Cq-Include-Trybots: dart-internal/g3.dart-internal.try:g3-cbuild-try
Cq-Include-Trybots: dart/try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-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-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-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-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/+/359223
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-03-28 11:24:36 +00:00
Daco Harkes 9426e47d73 [vm] Add receiver argument to WriteError runtime entry
Note this changes the error in AOT to tell what is the typed data that
is not writable.

This CL eases the follow up CL which starts reusing the
`CheckWritableInstr` and accompanying slow path and runtime entry for
other messages.

TEST=tests/lib/typed_data/polymorphic_unmodifiable_typed_data_test.dart

Bug: https://github.com/dart-lang/sdk/issues/55067
Change-Id: Icf26d119501059e2ea4e885897539ebcb1063da0
Cq-Include-Trybots: dart-internal/g3.dart-internal.try:g3-cbuild-try
Cq-Include-Trybots: dart/try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-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-linux-debug-ia32-try,vm-linux-debug-simriscv64-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-linux-release-simarm-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-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/+/359063
Reviewed-by: Ilya Yanok <yanok@google.com>
2024-03-28 11:24:36 +00:00
Sam Rawlins 702be59cfc Analyzer: Fix Expression.precedence doc.
See how the backticks are broken at
https://pub.dev/documentation/analyzer/latest/dart_ast_ast/Expression/precedence.html

Change-Id: I1a81a5340fdc90041cb4ab39bc14bd25cfe7224b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360182
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-28 02:33:49 +00:00
Elliott Brooks d94c9f08d5 Roll DevTools 2.34.1 into the Dart SDK
Follow up to https://dart-review.googlesource.com/c/sdk/+/360181 with one more patch: https://github.com/flutter/devtools/pull/7485

Bug: https://github.com/flutter/devtools/issues/7483
Change-Id: Ia2a93c783827d7e894ac139ecba9850edc8dff20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360123
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2024-03-28 00:29:16 +00:00
Jonas Termansen 3cce981e6c Bump version to 3.5.
Change-Id: Iaba0d7367689c60a8c899b49311dbd64d5736be1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345306
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
2024-03-28 00:08:58 +00:00
Kenzie Schmoll f84d26ac91 Roll DevTools 2.34.1 into the Dart SDK
Bug: https://github.com/flutter/devtools/issues/7483
Change-Id: Ic99de79454c0425bc31672d505b2015a6c4aafb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360181
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2024-03-27 23:25:49 +00:00
Konstantin Shcheglov 228ef6c589 Completion. Issue 55251. Suggestion variable name for DeclaredVariablePattern.
Bug: https://github.com/dart-lang/sdk/issues/55251
Change-Id: I57df0c13b205ab6018f7f416bd1181d45c2991ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-27 23:05:39 +00:00
Danny Tuppeny 0c9f4054d8 [analysis_server] Send Flutter Outline notifications for Flutter framework files
This fixes the check to determine whether a file is Flutter to handle things in Flutter itself.

It also improves the optimization for not setting overlays when they're the same as on-disk to handle files from dependencies (not only those that are explicitly analyzed) which might help avoid https://github.com/dart-lang/sdk/issues/48051#issuecomment-1686202738 more (it was the original intention, but perhaps wasn't working as well as I'd believed).

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

Change-Id: Ibd04ebeb10e9a1e749f2b44d4053f9b467554f4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-03-27 23:03:00 +00:00
Danny Tuppeny 41612e4375 [analysis_server] Ensure server notifications are sent for newly-opened files whose contents are unmodified
Some time ago I implemented an optimisation to skip analysis when a file is opened in the LSP server if the contents exactly matched what was last analyzed from disk (since it would just produce the same results).

Some notifications (like Outline) are only sent for open files and are triggered by analysis results. Skipping analysis means that some notifications would not be sent when you first open a file (because no new analysis result was computed).

This became quite noticable with the new CodeLenses because there are other CodeLenses (built into the Dart-Code extension) that were relying on Outline notifications and would "time out" after 5s, and this had the effect of causing the new CodeLenses to not appear for 5s (because VS Code waits for all CodeLenses). This wasn't obvious before because of the caching VS Code does for CodeLens locations.

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

Change-Id: I5653c01fe7b224ba693f5b95a8af8e3c3d3da06d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-03-27 21:20:06 +00:00
Polina Cherkasova 16589e650e Update DevTools rev to 9e510709212a714eaf985141629fef04a1180356
Change-Id: Ib85e8c4c39bc723f550fc303a6dec208213b54a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360160
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Polina Cherkasova <polinach@google.com>
2024-03-27 20:51:21 +00:00
Devon Carew 86f6a0ab62 [api docs] update the layout of the page footer for api.dart.dev
Change-Id: I198cdafc4c18206367898032e7df7971e09f3b6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360060
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-03-27 20:31:35 +00:00
Ryan Macnak 128896936e [vm, compiler] Fix type deduction for AddWithWrapAround on Mac.
TEST=https://ci.chromium.org/ui/p/fuchsia/builders/luci.fuchsia.toolchain.ci/dart-x64-mac
Change-Id: Id29e54dde9f392d353c521f07b34f36da0b000e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360120
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-03-27 19:33:19 +00:00
Tess Strickland e78c8e873b [vm] Remove unnecessary unsafe untagged pointer loads.
I missed these when reviewing 0bcb0c934.

TEST=ci

Change-Id: I0bd4985158d780872983e0eb043211bf9f22c723
Cq-Include-Trybots: dart-internal/g3.dart-internal.try:g3-cbuild-try
Cq-Include-Trybots: dart/try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-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-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-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-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360100
Auto-Submit: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2024-03-27 19:04:32 +00:00
Konstantin Shcheglov 031a855539 Augment. Parse 'augment' for extension declaration.
Change-Id: I5670e75c9d99be894d571bf9dc4d0d67df41ef82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359901
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-03-27 17:45:49 +00:00
David Morgan 75fc67b3f3 [macros] Increase timeout for test flakiness.
R=nshahan@google.com

Bug: https://github.com/dart-lang/sdk/issues/54404
Change-Id: Iba97bd0bcf6a20d60c1f0ca9cf332bb338f25eaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360000
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-27 15:45:41 +00:00
Oleh Prypin e9df8dceab Revert "[tool] tools/find_builders.dart cbuild opt in"
This reverts commit 86c41c9c77.

Reason for revert: This builder is now included by default

Original change's description:
> [tool] `tools/find_builders.dart` cbuild opt in
>
> Opt in to CBuild being green.
>
> Remove denylisted bots now that issue is resolved.
>
> Change-Id: I89c23720eaed78b317067bbdb065fe0cef8ecd75
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356022
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: William Hesse <whesse@google.com>

Change-Id: Ife49afc47f576901d2b8bb5523d2c8ed5224a761
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359862
Auto-Submit: Oleh Prypin <oprypin@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2024-03-27 13:01:49 +00:00
Konstantin Shcheglov 3bf33b667c Augment. Issue 55295. Report AUGMENTATION_WITHOUT_DECLARATION.
Bug: https://github.com/dart-lang/sdk/issues/55295
Change-Id: I50811e1ccd7a2be0e71b18eefa9ecb76ac1aef73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359961
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-03-27 00:22:59 +00:00
Ryan Macnak dbcf24cedb Roll Clang to b1d2e8510b58893e58558ffdf3f8ba29c1e25e5a.
Bug: https://github.com/dart-lang/sdk/issues/55303
Change-Id: Ida31e3487836e1797b968dd46b07bdd580f6401a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359541
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-03-26 22:56:03 +00:00
Konstantin Shcheglov 0608127cbc Macros. Don't print package:_macros files.
Change-Id: I8057baeb73d210308f2d51f46f21eb8f588e76e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-03-26 21:39:36 +00:00
Ryan Macnak 8da86ee19e Roll zlib to 24c07df5033183efad8607cba62e746bea7180bf.
Note that Chromium's copy of zlib now has a dependency on the cpu_features library.

Change-Id: I0f2c306aa7eb0e1deb8fa4c45e4a04f1fee8bb83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359600
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-03-26 19:55:45 +00:00
Jake Macdonald 631939e109 Prep to release package:macros
- update SDK dependency to ensure it supports SDK vendored packages
- sync pubspec/changelog versions

Change-Id: Ib79244bec43fc94bf12340241f6eab4001e4b21c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359920
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-03-26 19:51:01 +00:00
Devon Carew 571ec4e2bd [deps] rev crypto, csslib, dartdoc, http, markdown, web
Revisions updated by `dart tools/rev_sdk_deps.dart`.

crypto (f059196..69d13c9):
  69d13c9  2024-03-21  Kevin Moore  Switch sha512 to use fastpath with wasm (dart-lang/crypto#165)

csslib (b58e487..4216525):
  4216525  2024-03-21  Devon Carew  prep for publishing 1.0.1 (dart-lang/csslib#197)

dartdoc (7be9e24..79c1675):
  79c16759  2024-03-25  Parker Lougheed  Migrate client code to package:web (dart-lang/dartdoc#3610)
  0b1c7fa4  2024-03-25  dependabot[bot]  Bump actions/cache from 4.0.1 to 4.0.2 (dart-lang/dartdoc#3734)
  9fe35ec5  2024-03-20  Sam Rawlins  mustachio: Separate out the context stack LUB type calculation (dart-lang/dartdoc#3730)

http (5dfea72..7949d6f):
  7949d6f  2024-03-25  Brian Quinlan  cupertino_http: upgrade ffigen version (dart-lang/http#1159)
  051482a  2024-03-22  Brian Quinlan  Ready cupertino_http for release with WebSocket support (dart-lang/http#1158)
  988b4d4  2024-03-20  Brian Quinlan  Prepare package:cronet_http 1.2 for release (dart-lang/http#1157)
  69f4eff  2024-03-20  Hossein Yousefi  [cronet_http] Upgrade jni to 0.7.3 (dart-lang/http#1156)
  d8b1a9e  2024-03-19  Brian Quinlan  Release `package:web_socket` 0.1.0 (dart-lang/http#1155)
  cfbc191  2024-03-19  Brian Quinlan  Add a WebSocket implementation to package:cupertino_http (dart-lang/http#1153)

markdown (9c6b1af..8d07abc):
  8d07abc  2024-03-19  MJ Studio  Link uri encoding, URL-escaping should be left alone inside the destination (dart-lang/markdown#598)

web (4af904f..c522718):
  c522718  2024-03-20  Kevin Moore  Update MDN documentation (dart-lang/web#213)
  f80dcab  2024-03-15  Srujan Gaddam  Update pubspec description to be consistent with README (dart-lang/web#210)
  27936c4  2024-03-15  Devon Carew  Generate api docs for getters (dart-lang/web#207)
  2f13cd5  2024-03-12  Devon Carew  fix unresolved dartdoc links (dart-lang/web#200)
  686827a  2024-03-12  Srujan Gaddam  Remove reference to static interop and point to dart.dev page for JS interop (dart-lang/web#206)
  9b7e29d  2024-03-12  Devon Carew  Add a 'sourced from mdn docs' line to the MDN sourced dartdoc (dart-lang/web#198)
  51e594b  2024-03-05  Srujan Gaddam  Fix dictionary constructors to accept supertype members and create an empty object when there are no fields (dart-lang/web#197)

Change-Id: Ic90c6f5a7e7d701746276031a8028cdfe76bc27a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-03-26 19:47:42 +00:00
Konstantin Shcheglov 36c0788137 add package:_macros (SDK vendored) and package:macros (pub published)
add sdk_packages.yaml file (describes SDK vendored package locations)

delete old macro code in _fe_analyzer_shared, move tests/benchmarks

adds a top level `pkg` directory to the Dart SDK, which is where vendored packages live

BUG: https://github.com/dart-lang/sdk/issues/54976
Change-Id: Ib3503a27fb5644fa8a39ab5a3e5b568df330cfd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359040
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2024-03-26 18:40:00 +00:00
Daco Harkes 0bcb0c934d [vm/ffi] Add _Compound _offsetInBytes field
This CL changes compounds (structs, unions, and arrays) to be backed
by a TypedDataBase and an int offset.

Before this CL, the compounds where only backed by a TypedDataBase.
This leads to the following issues:

1. Access to nested structs required code for allocating new typed data
   views or pointers, which the optimizer then had to prevent from
   being allocated after inlining.
2. Runtime branching on whether the TypedDataBase was a Pointer or
   TypedData increased code size and prevented inlining.
   https://github.com/dart-lang/sdk/issues/54892
   This could not be properly optimized if in AOT both typed
   data and pointer were flowing into the same compound.
3. Constructing TypedData views required calculating the length of the
   view.

After this CL, accessing nested compounds will lead to accesses on the
original TypedDataBase with an extra offset.

This removes the polymorphism on TypedData vs Pointer, because the
final int/float/Pointer accesses in nested compounds operate on
TypedDataBase.

Also, it simplifies creating an `offsetBy` accessor, because it will
no longer have to be polymorphic in typed data vs pointer, nor will it
have to calculate the length of the field.

Implementation details:

* The changes in the CFE and patch files are straightforward.
* VM: Struct-by-value returns (or callback params) are initialized
  with an offsetInBytes of 0.
* VM: Struct-by-value arguments (and callback return) need to read out
  the offsetInBytes. Before this CL we were passing in the TypedData
  as tagged value. With this CL we are passing the TypedData as tagged
  value and the offset as unboxed int, from 1 IL input to 2 IL
  inputs. (The alternative would have been to take the compound as
  a tagged value, but that would have prevented optimizations from not
  allocating the compound object in the optimizer.
  The FfiCallInstr is updated to have two definitions for the case
  where we were passing in the TypedData previously.
  The NativeReturnInstr is refactored to be able to take two inputs
  instead of 1. (Note that we don't have VariadicInstr only
  VariadicDefinition in the code base. So the instruction is _not_
  implemented as variadic, rather as having a fixed length of 2.)
* dart2wasm does no longer support nested compounds due to the
  compound implementation only storing a pointer address.
  https://github.com/dart-lang/sdk/issues/55083

Intending to land this after
https://dart-review.googlesource.com/c/sdk/+/353101.

TEST=test/ffi

CoreLibraryReviewExempt: VM and WASM-only implementation change.
Closes: https://github.com/dart-lang/sdk/issues/54892
Bug: https://github.com/dart-lang/sdk/issues/44589
Change-Id: I8749e21094bf8fa2d5ff1e48b6b002c375232eb5
Cq-Include-Trybots: dart-internal/g3.dart-internal.try:g3-cbuild-try
Cq-Include-Trybots: dart/try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-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-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-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-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/+/354226
Reviewed-by: Tess Strickland <sstrickl@google.com>
2024-03-26 17:14:13 +00:00
Jake Macdonald 8df8de82b3 Ensure that the pubspecs of both _macros and macros packages are updated whenever the lib/ dir of _macros is edited.
Related to https://dart-review.googlesource.com/c/sdk/+/359040

Change-Id: Iab3cfa89e0492282c348c6a72f3032191fa4998f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359580
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2024-03-26 16:49:16 +00:00
Srujan Gaddam d1a949a8e5 Add static tests for external extension members on extension types
We have tests for whether external extension members are allowed
on certain classes, but not extension types.

Also rewords the error to be more accurate.

Change-Id: I61c1fa4c101971986b6c8e7cc778aca94908816a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358380
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-03-26 15:43:19 +00:00
Srujan Gaddam 1232260158 [dart:js_interop] Add ExternalDartReference
Closes https://github.com/dart-lang/sdk/issues/55187

Adds a faster way for users to pass opaque Dart values to
JS without the need for boxing like in JSBoxedDartObject.
This does mean, however, that this new type can't be a JS type,
and therefore cannot have interop members declared on it.
Refactors existing code to handle that distinction.

CoreLibraryReviewExempt: Backend-specific library that's been reviewed by both dart2wasm and JS compiler teams.
Change-Id: Ia86f1fe3476512fc0e5f382e05739713b687f092
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358224
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-03-26 15:43:19 +00:00
Sam Rawlins bcf64bdfeb linter: Adjust require_trailing_commas reported token, and description
Fixes https://github.com/dart-lang/linter/issues/4918

I migrated relevant tests.

Description fixes:

* Don't use "function calls" or "declarations". First, I don't think
  we use the term "function call" much, I could be wrong. Second, it's
  not about function calls or declarations. It's about parameter lists
  and argument lists.
* Remove more mixing up of parameters and arguments. E.g. A "final
  parameter" cannot be a list literal.
* Fix naming of "literal array" to "list literal" and a few others.

Change-Id: I15844f4a34dc4fe08f15dc00bce2592ec12ce5c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-26 15:38:49 +00:00
Jonas Termansen d7ee76326d Clarify risk and multiple channel CLs in cherry-pick request template.
Clarify the same CP request can be used for both beta and stable and
make more room for doing so, as well as including a whole list of
changelists to be cherry-picked for complicated cases. Clarify distinct
gerrit CLs are needed for beta and stable.

Replace the informationless risk field that everyone says is low with a
mandatory question to explain the actual risk involved.

Fixes: b/329611671
Change-Id: Ibfb81d89722c237e4b8a531bcac2d475798369b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357603
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
2024-03-26 15:29:23 +00:00
Alexander Markov 3545100e32 [vm] Fix build
Fix the build failure after revert landed on top of
ReturnInstr -> DartReturnInstr rename.

TEST=local build

Change-Id: Ic0c7208485b9b3d1e6525cb8f31e3113765fd317
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359843
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-03-26 14:38:51 +00:00