Commit graph

101335 commits

Author SHA1 Message Date
Devon Carew 7b8d82bea3 [docs] refactor the gsoc docs and docs/readme.md file
Change-Id: Ic8a18064ecf3bc404ffd3601574352a75d362bbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367762
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2024-05-23 07:50:46 +00:00
Sam Rawlins 8e27428a96 DAS: Rename coveredNode to coveringNode; small changes
This is preparing _AbstractCorrectionProducer to be a sealed public
class for plugins:

* Move `_coveringNode` and `coveringNode` to
  CorrectionProducer from _AbstractCorrectionProducer; these are only
  used by CorrectionProducer subclasses.
* Seal CorrectionProducer; the ultimate subclasses should subclass
  either ParsedCorrectionProducer or ResolvedCorrectionProducer.
* Make CorrectionProducerContext final.

Change-Id: Iccbe0d92042eb826c6c53499e052c37442e312ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-23 04:17:49 +00:00
Sam Rawlins 15dd406dac DAS: Fix producers that can apply in bulk, but not really across file
This introduces CorrectionApplicability.automaticallyButOncePerFile,
used in just 4 producers:

* AddNullCheck
* MoveDocCommentToLibraryDirective
* RemoveLibraryName
* RemoveUnnecessaryLibraryDirective

Also fixes FixProcessorMapTest to actually test registered fixes.

Change-Id: I2ed2d8d6a030f04ea3fa969988719bb9d4c2f8fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367661
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-23 01:20:10 +00:00
Sam Rawlins c386ca52d7 Clean up ex-multitest: number/identifier_test
I convert the `noSuchMethod` tests to (imho) simpler tests of what
property access of `e` or `d` or `D` would look like on an int, via
extension getters.

The noSuchMethod test as it was written cannot be executed at runtime,
because (as of Dart 2, I think, maybe earlier), property access on
expressions is a compile-time consideration. And I think as a compile-
time error test, it's hard to see what it's testing.

Change-Id: I5c0ca728e6e812b8f35adb80b288be351c4b076a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367461
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2024-05-23 01:19:59 +00:00
Ben Konyi f4cc1eb648 [ docs ] Add documentation for DART_VM_OPTIONS
Change-Id: Icf66ff1f024c9f14bc8241b2b23f99f1ed8e0c45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367800
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-05-22 21:03:44 +00:00
pq 375310caa2 quick fix for REMOVED_RULE
Change-Id: If1995ff9938df8b08d12a2d7deaf9fc69e39a356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-05-22 20:29:52 +00:00
Ben Konyi 0c547d2833 [ CLI ] Fix DART_VM_OPTIONS usage only resulting in printing of help message
Fixes https://github.com/dart-lang/sdk/issues/55767

TEST=pkg/dartdev/test/commands/compile_test.dart

Change-Id: I6a773acbd9fc21c086fc459c7cb983ea1ff11fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367720
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-05-22 20:06:49 +00:00
pq af7355d34b quick fix for DUPLICATE_RULE
Change-Id: I49c75bcaa12eefc06b1e906983b482a51466c134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367740
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-22 19:56:24 +00:00
Sam Rawlins 286715bda3 linter: Move no_literal_bool_comparisons tests
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I0a3831c2ba47ced728d9c71087e36e2c497fa1b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367141
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-22 18:43:58 +00:00
pq 58e6149a98 update fix status stats
Change-Id: I096871271a240b6af30d3c6d6e6afb5fe37f8a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367660
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-22 18:42:55 +00:00
Ryan Macnak 53f1ed4095 [build] Fix ARM32 GCC build.
TEST=vm-gcc-linux
Bug: https://github.com/dart-lang/sdk/issues/52080
Bug: https://github.com/dart-lang/sdk/issues/55669
Change-Id: I94ecf1b7c74c23d0609844a1163d14454e80eebc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367502
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-05-22 18:06:01 +00:00
pq 4015ad7b2b quick fix for EXTRANEOUS_MODIFIER
Change-Id: I8ee50febb04758a227a25aa8635ec1396ca180d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-22 17:50:42 +00:00
pq 874f291ade fix bad key in error fix map
Change-Id: I08cc00a54f0325ce758447428e48308f3a8aafda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-22 17:05:08 +00:00
Danny Tuppeny f3be14c3b0 [analysis_server] Ensure errors are cleared from NotificationManager cache when flushed on client upon file remove
When a server plugins generates diagnostics, they're merged with the servers diagnostics (which are kept cached in `NotificationManager.errors`) and sent to the client.

When a file is removed, we tell the client to flush all results but we did not previously clear this cache. That meant it a plugin subsequently generates diagnostics (even if empty), we would merge with them with the last state of the server errors and send them to the client.

This clears errors from the servers cache at the same time as flushing them on the client.

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

Change-Id: I047c4531a38edaaad1362f9c7e7714a7e7ab705f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367321
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-22 16:36:58 +00:00
Danny Tuppeny 0f05924297 [analysis_server] Remove redundant solo_test tests
Checking for solo tests is now done as part of `verify_tests_test.dart` so solo tests currently produce two test failures.

This file did check one additional project that doesn't have `verify_tests_test.dart` does not (analyzer_cli) so it isn't exactly the same, but that project is going away (https://github.com/dart-lang/sdk/issues/48457) so it doesn't seem worth making `verify_tests_test` work there (there's a mismatch because it currently uses `all.dart` and not `test_all.dart`, but I suspect that filename may be coded into some bot configuration somewhere).

Change-Id: I7431ed0e141bab1898860f6fbe316833281d6fa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-22 16:34:31 +00:00
Daco Harkes 101faa6929 [tool] Fix tools/generate_idefiles.py after RBE migration
Closes: https://github.com/dart-lang/sdk/issues/55813
Change-Id: Ia724f291a8893c7ee8622c687ab8181f23d0c405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367580
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-05-22 16:17:33 +00:00
Srujan Gaddam 751052e826 Update package:web rev to 7604578eb538c471d438608673c037121d95dba5
Includes 7604578eb5.

Change-Id: I7437304ee64cb71608ed36597d26921991faa3b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367520
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-05-22 16:02:28 +00:00
pq 643b9ae8f7 remove unused parser error codes
The error codes are not being generated and the mapping to `EXTRANEOUS_MODIFIER` in tests is unnecessary.

This logic is likely a hold over from when the analyzer had it’s own parser with temporary conversion logic to align it with fasta. With only one parser, these bits are stale and should be safe to remove.


Change-Id: I5b29f0081953c61771b313025595910eef055c2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367540
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-22 15:08:18 +00:00
arkare 69565652cc @JsonCodable() macro: escape field names with raw string
Closes https://github.com/dart-lang/sdk/pull/55799

GitOrigin-RevId: 297bb5fada9941d87bad51b70a6c8ec6f6c6e074
Change-Id: Ic21df065ac701764cb2e2d6b27a8364df7bf0c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367361
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2024-05-22 15:03:04 +00:00
Paul Berry bd7ef48815 Change SharedRecordType abstract getters to return lists.
Previously these abstract getters were typed as returning
iterables. Although in principle, changing the return types to lists
constrains the implementations more, in practice it makes no
difference because the only implementations are in the CFE, analzyer,
and the mini_types shared tests, and those implementations already
return lists anyhow.

Changing the abstact getters to return lists will simplify future work
by allowing code that interacts with the base SharedRecordType class
to index into the lists rather than having to iterate through them.

Change-Id: Ia257400dbb7c89aabc468be15a939e6baa36e191
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367500
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-22 14:27:51 +00:00
Paul Berry 14c15d936a Fix detection of record field name mismatch in subtype matching.
Fixes #55802.

Bug: https://github.com/dart-lang/sdk/issues/55802
Change-Id: I9f9488cb09243679965ee891c45bee293af5056a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367462
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-05-22 14:22:00 +00:00
Paul Berry 50e6ea7f8c Inline LibraryBuilderImpl.nonNullable.
This method always returned Nullability.nonNullable. Inlining it will
pave the way for removing support for legacy libraries from the type
system, which will in turn make it easier to share type system logic
between the analyzer and front end.

Change-Id: I25757f6f7a65d65c72b28e57153ce0f06ffd38e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367441
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-05-22 14:19:48 +00:00
Danny Tuppeny e43bbe32fa [dds/dap] Fix flaky tests waiting for breakpoint resolved events on slow bots
This test shows up as flaky quite often. It's waiting for breakpoint Resolved events by just calling `await pumpEventQueue(times: 5000);` but it appears this sometimes doesn't get all of the events.

This change waits up to 5s for the events to arrive (because we unfortunately have no signal to know when they should have come through). I'm hopeful 5s is more than enough and this won't flake, but we could increase this as not - the goal of this test is not to verify performance but just ensure the events do arrive.

Change-Id: Ia2236b65bbb5d11e2a5519d49869c6b87202a940
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367301
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-05-22 14:13:56 +00:00
Stephen Adams fb057ea4e0 [js_runtime, js_dev_runtime] Implement microsecond field of DataTime
- Move DateTime implementation for dart2js and DDC into a shared place to reduce duplication.

- Add a _microsecond field to the web DateTime to track microseconds outside of the JavaScript Date.

- The cute dart2js optimization whereby `DateTime.now().millisecondsSinceEpoch` is compiled to `Date.now()` still works.

- Both implementations report better errors.

- Fixed VM bug with in-range sentinel.


Change-Id: I9156255bdb6ecc195500ae9bc88f91fb315b6297
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366963
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2024-05-22 05:18:52 +00:00
pq 177ad1a895 quick fix for DUPLICATED_MODIFIER
Change-Id: Ibcfbee84b8bcd67cab81741f65e701012f6a4ce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367362
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-21 23:45:02 +00:00
pq 3972ab2213 quick fix for unnecessary_await_in_return
Change-Id: I30b0e48d7c5b93766580d23b35d7e2a6c8c9a44b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367341
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-21 23:44:58 +00:00
Kallen Tu bd8f87d477 [wildcard-variables] Test non-binding behaviour with top-level declarations.
Added a little section for late wildcard variables too.

This CL tests mixing top-level wildcard declarations with local wildcard declarations and the non-shadowing, non-binding behaviour.

Bug: https://github.com/dart-lang/sdk/issues/55652
Change-Id: I72e7cfb1b2d80a3934af355579c36252881cf3fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367241
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-05-21 22:15:11 +00:00
Ryan Macnak ffbbdb5a10 [vm, service] Treat the object id ring as strong during major GC.
The id ring was treated as a strong root during minor GC and a weak root during major GC. Before mark-through-new-space, new-space objects could not be collected during a major GC, so in practice the policy was that the id ring was strong for all new-space objects. After mark-through-new-space, new-space object can be collected during a major GC, so service ids could expire very quickly, especially for object just created using the service protocol and not otherwise reachable from the Dart program. Given that service id zones have still not been implemented, this makes it impossible to reliably interact with such an object.

TEST=ci
Bug: https://github.com/flutter/flutter/issues/148704
Change-Id: I0f15c00414f996fad49bcb137c7f1c15bb4955c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367440
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-05-21 21:29:49 +00:00
Devon Carew e5e2c925c0 [docs] remove older pages
Change-Id: I6567aa21fe036929fb036551901823dc2926468f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367480
Reviewed-by: Hossein Yousefi <yousefi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-05-21 21:10:29 +00:00
Konstantin Shcheglov 263820ad70 Macro. Issue 46392. Use the same Identifier for all augmentations.
Bug: https://github.com/dart-lang/sdk/issues/46392
Change-Id: Ib175cb3f0be6108c4f8b180526dd04e3ef3b2670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-21 21:01:58 +00:00
Sam Rawlins c888e760f6 DAS: Simplify public API of CorrectionProducer and friends
* CorrectionProducer:
  * Remove `errorMessage`; unused.
  * Make `configure` abstract; it is only here for the doc comment.
* MultiCorrectionProducer: remove `typeProvider`, `typeSystem`.
* ResolvedCorrectionProducer: make `coreTypeBool` private.
* _AbstractCorrectionProducer:
  * Move `invalidNodes`; only used once.
  * Remove `strictCasts`; unused.
  * Remove `displayStringForType`; unnecessary convenience.
  * Move `mightBeImplicitConstructor` to be a private extension
    getter.
  * Move `nameOfType` to be a private extension getter.
  * Move `shouldWrapParenthesisBeforeAnd` to be a public extension
    getter.
* Move DartFileEditBuilderExtension to be a private extension.

Change-Id: Icd1e17ccf398fafd1d9fee88d4b6a430a2deb50a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367363
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-21 19:02:39 +00:00
Sam Rawlins 6c7452ac15 DAS: rename files with capital letters
Change-Id: Ib4d3da6f1dea130b56caf642c0e0a6a0a9a15e2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367400
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-21 17:55:04 +00:00
Ryan Macnak 9077bf991f [vm, gc] Incremental compaction, take 2.
- Fix missing store buffer flush when --marker_tasks=0.
- Fix passing untagged pointer to store barrier check on ARM/ARM64 (6bc417dd17).
- Fix passing uninitialized header to store barrier check on ARM64/RISCV (1447193053).

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/52513
Bug: https://github.com/dart-lang/sdk/issues/55754
Change-Id: Id2aa95b6d776b82d83464cde0d00e6f3b29b7b77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367202
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-05-21 16:33:00 +00:00
Ömer Sinan Ağacan fab56db71b [dart2wasm] Move common code generation routines to state_machine, fix sync*
This is the last part of the series of patches to implement missing
sync* features and fix bugs.

Move common code generation functions between async and sync* code
generators to the state_machine library, with the name
`StateMachineCodeGenerator`.

This class allows overriding parts that differ between the async and
sync* code generators.

Fixes tests:

- co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_sync_t05
- language/sync_star/generator3_test/test1
- language/sync_star/generator3_test/test2
- language/sync_star/sync_star_exception_iterator_test
- language/sync_star/sync_star_exception_nested_test
- language/sync_star/sync_star_exception_test
- language/sync_star/sync_star_exception_current_test

Fixes #51343.
Fixes #51342.

Change-Id: Ife6eab43b2721b003ebf9bc0f03796748fd5df46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367041
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-05-21 14:53:58 +00:00
Martin Kustermann 4dd6ee661d [dart2wasm] Add extra build targets in V8 build documentation
Change-Id: Ibef9a043a1326651b123bb0a3748407c6cc87b18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366941
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-05-21 10:52:18 +00:00
dependabot[bot] aacbc973df Bump github/codeql-action from 2.13.4 to 3.25.5
Closes https://github.com/dart-lang/sdk/pull/55778

GitOrigin-RevId: bb823a15a06a1e75316354893423dd0a1f87eb5a
Change-Id: I3cffe1eded07a755e11960b2810c00e384302ef7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367143
Reviewed-by: Alexander Thomas <athom@google.com>
2024-05-21 10:44:50 +00:00
dependabot[bot] 42cb07fe23 Bump actions/checkout from 4.1.5 to 4.1.6
Closes https://github.com/dart-lang/sdk/pull/55777

GitOrigin-RevId: 532a4e4a81275f630fcc386e12fd0151b244667d
Change-Id: Ida871bd0a17421be9fb1cdf8f876e5693e83f79e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367142
Reviewed-by: Alexander Thomas <athom@google.com>
2024-05-21 10:44:21 +00:00
Ömer Sinan Ağacan 829261e2ba [dart2wasm] Move async compiler utilities to state_machine library
This is the second part of the refactoring to make sync* and async
compilers to reuse code as much as possible.

Move exception handler and label target types from `async` to
`state_machine` library.

This is a change from
https://dart-review.googlesource.com/c/sdk/+/366663, moved to a spearate
CL to make revieweing easier.

The end goal is to share code generation for async and sync* code
generators.

Change-Id: Ie38e4237bd89063ceba1700bf0a996e4839a396a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367040
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-05-21 10:09:14 +00:00
Ömer Sinan Ağacan 3863e78e80 [dart2wasm] Move yield finder to a shared library
- Generalize `YieldFinder` to consider both `await` and `yield` as a
  suspension point.

- Move it to `state_machine.dart`, reuse it in async and sync* code
  generators.

This is a change from
https://dart-review.googlesource.com/c/sdk/+/366663, moved to a spearate
CL to make revieweing easier.

The end goal is to share code generation for async and sync* code
generators.

Change-Id: I4c75c746f85b2fedf7c1117a20fcd32152573c6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367021
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-05-21 09:09:40 +00:00
Erik Ernst 035be2b0d4 Update Dart.g to clarify the association of metadata and its target AST
Change-Id: I02a3e155aab73d638ddbc20485db9db3dcbe6c9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365781
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-05-21 09:07:23 +00:00
Brian Wilkerson 1d0c90c145 Add documentation for more FFI diagnostics
Change-Id: Ie6b9f68e348a512ad84bd4f896564dd84cf30968
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366406
Reviewed-by: Marya Belanger <mbelanger@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-05-20 23:24:47 +00:00
Sam Rawlins 2f13e3d9a0 DAS: Use an enum to express how broadly a CorrectionProducer can be applied
We decided that the existing mechanism, three bool values that can be
overridden by an AbstractProducer subclass, was confusing as it might
give the impression that they are independent, and that any of the 8
possible combinations are valid. But really each author of a
CorrectionProducer just needs to answer one question: how broadly can
this correction be applied?

So to answer that question we decided (loosely in emails) to offer an
enum of a few values that more-or-less represent the sensible
combinations of the bool getters. And more specifically I decided in
this CL what those values should be.

In this CL I also remove the notion of a default value. Each
CorrectionProducer must indicate specifically how broadly it can be
applied.

This PR should functionally be a no-op; no applicability was increased
or reduced. I left comments intact. I left `TODO(applicability)`
comments where no comment is made to justify why a correction cannot
be made any more broadly than "only at specific location."

Change-Id: I3e3a12ee811b2b08f276ff755e7ff638f4fffabf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366740
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-20 22:35:49 +00:00
Ryan Macnak 1447193053 [vm, compiler] Fix use of StoreIntoObjectNoBarrier before header initialization.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/55754
Change-Id: Ie516be52a8edf620019f60b2ea0fd4f3eeeba533
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367203
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-05-20 20:56:20 +00:00
pq cf65fa73dd remove AstBuilder.enableNonNullable
Change-Id: Ifb7e049115297a34ed95a974b0a1e71540b54ce8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367148
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-20 20:08:25 +00:00
Devon Carew 5679c4d237 [deps] rev args, http, mockito, web_socket_channel
Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (5c83bc9..cf90551):
  cf90551  Fri May 3 11:17:38 2024 -0700  Devon Carew  blast_repo fixes (dart-lang/args#274)
  72d6ef0  Wed May 1 23:57:25 2024 +0000  dependabot[bot]  Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/args#271)
  e2e2023  Wed Apr 17 15:00:21 2024 -0700  Kevin Moore  Update to latest lints, require Dart 3.3 (dart-lang/args#270)
  8d66d21  Mon Apr 15 15:29:55 2024 +0000  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/args#268)

http (76deb75..5c01453):
  5c01453  Fri May 17 15:41:46 2024 -0700  Brian Quinlan  Create a fake WebSocket implementation (dart-lang/http#1200)
  4d2f9f9  Fri May 17 15:19:58 2024 -0700  Brian Quinlan  Get ready to publish cronet_http 1.2.1 (dart-lang/http#1202)

mockito (4be52e1..2302814):
  2302814  Fri May 17 09:51:20 2024 -0700  Googler  Stop using deprecated LibraryElement.isNonNullableByDefault

web_socket_channel (8c77d6f..45b8ce9):
  45b8ce9  Fri May 17 15:19:29 2024 -0700  Brian Quinlan  Remove obsolete `WebSocketChannel.new` documentation. (dart-lang/web_socket_channel#363)

Change-Id: I654b0dce548e8b4ca1b98a626fddcb071cb1daae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367147
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-20 18:56:43 +00:00
pq b879f622b4 quick fix for CONST_CLASS
Change-Id: Ic3f7202ec5d730b6938d854e59b9ad0ed8c60bc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367146
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-20 18:09:47 +00:00
Sam Rawlins 022948c878 linter: convert path in test infra
Change-Id: Ie8c61aae0dc20be53c26741ef98f67f52c928bfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367201
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-05-20 18:09:27 +00:00
Sam Rawlins 842a9820f0 linter: Move prefer_asserts_with_message test
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ieada57f3d9b2974a8726c47fa526ba3baea8fc89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367161
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-20 17:06:41 +00:00
Sam Rawlins 5891bf0308 linter: move implicit_call_tearoff tests
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Idcfe32d68c120e9cb4848b71a6b54d0c5b157e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367160
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-20 16:21:49 +00:00
pq 6ec163b277 quick fix for MIXIN_CLASS_DECLARATION_EXTENDS_NOT_OBJECT
Change-Id: I6d0759b4d7221d32c8afe5910c10e619d7ad5027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-20 15:56:24 +00:00