Commit graph

100147 commits

Author SHA1 Message Date
pq 3710d9c1a5 verify move_file does not modify macro-generated files
Change-Id: Iced0bc21283dbec3971fa23ecea0a114a9d909e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354970
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-29 17:03:59 +00:00
Konstantin Shcheglov cd0705a2a1 Legacy. Remove nullStar.
Change-Id: I8325bf47ea4817661212f8fbd91f44b8b18837b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354972
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-29 16:49:48 +00:00
Ömer Sinan Ağacan 3a7b9e7710 [dart2wasm] Improve internal error message in WasmArrayExt intrinsic generator
Change-Id: Ief63ed9540e4c824ea85e4476ed6c1a29acb552a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355160
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-02-29 16:21:52 +00:00
Keerti Parthasarathy d21ce23a6b Add test case with macros for change method signature.
Change-Id: Ic7be0ec8935a8ecd6b6474ceb1ce7edf6ac86961
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354961
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-29 15:52:40 +00:00
Dmitry Zhifarsky 741ddda4c5 Fix typo and a broken link in dart2js pragma annotations docs
Closes https://github.com/dart-lang/sdk/pull/55064

GitOrigin-RevId: a2076ea4f58b8b63e42b7f8cb45e8f9d54c8cdea
Change-Id: I0ab8a19c0ee1865a2bcf2a467fe649db4951cf0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355061
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-02-29 15:41:32 +00:00
David Morgan 915c837a31 [macros] Use VmTarget and associated platform dill automatically for macros, with no config.
Macro language tests start working on some platforms, including DDC, as a result.

Because config is now inferred there can be an infinite recursion of precompiles, add pending precompiles to options to stop this.

Introduce a new subfolder in the CFE for macros-related code, for serializer and target handling.

Remove unnecessary config from a few entrypoints.

R=johnniwinther@google.com

Tested: covered by existing tests.
Change-Id: I1a999ea4d3e52488dec04c87231d999b5f72d1d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351144
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-02-29 14:30:34 +00:00
Vyacheslav Egorov ca732aa5ae [vm] Remove dart:cli from dartdoc
R=mit@google.com

CoreLibraryReviewExempt: No functional changes.
Change-Id: Ic8ee88928ceb6457355319e1e411c5421542b840
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355181
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Slava Egorov <vegorov@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2024-02-29 13:57:27 +00:00
Alexander Thomas e91957b2d5 [dartdoc] Add header and footer options to dartdoc options
Bug: b/323126451
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try
Change-Id: Iedc6a4d282da3beae7bdcf522c4ae0bab8644a3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354886
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-02-29 12:49:50 +00:00
Johnni Winther 08e056a964 [cfe] Use file uri for augmentation libraries
This sets the `fileUri` of the merged augmentation library to the
`dart-macro+` uri corresponding to the file uri of the origin
library.

Change-Id: Ied78b2cf19d502b381044b65aab38549947f781e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355140
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-29 11:59:20 +00:00
Vyacheslav Egorov 9e11d79657 [vm] Remove dart:cli waitFor
Closes https://github.com/dart-lang/sdk/issues/52121

Tested: CI
CoreLibraryReviewExempt: Approved breaking change to VM specific code
Change-Id: Icc89017c5a7676c2ae07488692ad8b8b9e131a7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354880
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-29 11:18:51 +00:00
Eli Geller 0766f7b83e typo fixes: its vs. it's
Closes https://github.com/dart-lang/sdk/pull/55023

GitOrigin-RevId: f9457aac2575780d5d712531d3694ccb38d3a5bd
Change-Id: I29357eac563d6423a78ec58bbfa6a1a72e3dadf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2024-02-29 11:07:40 +00:00
Jonas Termansen a19d3f3375 [infra] Support testing with RBE on Windows.
Place the windows toolchain in the build root so it can be sent to RBE.

Use relative paths in debug symbols when building with Windows clang,
which is needed for remotely building with RBE.

Set the executable bit when invoking clang-cl remotely as it has not
been set on Windows RBE clients.

Stop including .rst files during build commands as @options-from-file
is not supported by rewrapper at this time.

Forward RBE_cfg into the msvc build environment and rewrite the
INCLUDE, LIB, and LIBPATH environment variables to use relative paths
instead of absolute paths.

Don't download reclient on windows-arm64 where there is no cipd
package and the windows-arm64 python lies and says it's x64 because
they actually packaged a x64 python.

Tune the Windows -j performance to match the historic bot performance
as most casual Windows machines won't handle -j 1000 well.

Bug: b/296994239
Change-Id: I2bd1b4478fca796f0a326c062a5f478f16c2c6ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343440
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2024-02-29 10:33:09 +00:00
Chloe Stefantsova 3ef08e1ecd [analyzer][cfe] Expand TypeAnalyzerOperations. Part 1
This CL adds more of the type operations required in the subtype
constraint gathering algorithm into the shared type operation
class. The added operations are used in the constraint gathering
algorithms in the Analyzer and the CFE.

Part of https://github.com/dart-lang/sdk/issues/54902

This is a reland of
https://dart-review.googlesource.com/c/sdk/+/346840

Change-Id: I99086cfc3cd56db40055e9bb8e23acec8bdf830b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354622
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-02-29 08:14:20 +00:00
Jens Johansen 08a8e93bf1 [CFE] Delete unused code
Change-Id: Ic516edb07cbe5150c58ac03a4633145059ae6b55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354022
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-02-29 07:42:58 +00:00
Srujan Gaddam 2f7bfc404a [dart:js_interop/_unsafe] Clean up API docs
- Rephrase docs on JS types
- JS -> JavaScript where applicable
- “This” and “that” expanded to refer to the thing
- Add docs to undocumented members
- Rephrase some docs to be clearer and more explicit
- Move warnings to format that dartdoc can display specially
- Add warnings to every single member that should have it
- e.g. -> like
- Makes similar docs consistent
- Removes library declarations per style guide. Regenerates
  expectations to handle the change.

CoreLibraryReviewExempt: Backend-specific library. Docs only.
Change-Id: I246f8c20d594741149766e5a76bb186debf54ded
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352977
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-02-29 04:15:49 +00:00
pq e8952e3977 fix test paths to be windows-safe
Change-Id: I9bf627aa43414b46f7b3e6f12590e63f2cee54e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354971
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-02-29 03:24:57 +00:00
Konstantin Shcheglov 6d0eeae28e Legacy. Remove numStar, stringStar, futureStar(), iterableStar(), listStar()
Change-Id: Ia8b3eb3f0a7d9a823da3f7fa4934a9b956129625
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-29 02:16:56 +00:00
Nate Bosch 6f5a23f150 Expand docs around error zones
Mention error zones in the docs for `runZoned`. We expect most of these
use cases to be handled by `runZonedGuarded`, but specifying an error
handler on the `ZoneSpecification` can still trigger this behavior.
Expand the phrasing from mentioning that some futures might not complete
to describe the specific reason - errors cannot cross zone boundaries
with different error zones, so specifically Futures which complete as
errors are at risk of not completing in the parent zone.

R=lrn@google.com

CoreLibraryReviewExempt: Doc changes only.
Change-Id: I8759dfb6da48463e0bb33a000943d60a4dd3d5ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348043
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2024-02-29 01:49:08 +00:00
pq 95a0ede202 verify that extract_method doesn't modify macro-generated files
Change-Id: If3c73a4e6fcbad97ddcb5c8f78121f80fc580035
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354965
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-29 01:01:32 +00:00
pq c383283edc ensure convert_method_to_getter doesn't modify macro-generated files
Change-Id: I92843c4f6bfcccd534bd9011eea1324b476f3102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354964
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-29 00:59:39 +00:00
pq fddd66f80d ensure convert_getter_to_method doesn't modify macro-generated files
Change-Id: I928f7ac8d31b6036f53f66d2c8e98863d67b1e04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-29 00:21:49 +00:00
Brian Wilkerson 17e833ecbb Convert the OverrideContributor to the new style
This should unblock working on three completion-related issues.

There is one known regression here. There's a TODO in the code and a
failing test to mark the regression. Let me know if you think I should
fix the regression before landing this.

Change-Id: Ide311d4d510f193a1ae60ef400078567ff773159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354781
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-29 00:06:39 +00:00
Dan Chevalier a3401b0c25 Update DevTools rev to 254ea4dfd93d76c6ad5e2016bf34e9057b14d9da
Change-Id: I692e08171b81d7e8db9e11c919f3a4ee11f1b534
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354980
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2024-02-28 23:32:02 +00:00
Ben Konyi 0728ffbf53 [ CLI ] Add --write-service-info flag to dart run
This was already a valid VM option, but since it wasn't listed as an
option for the `dart run` command, it was treated as an unexpected
argument when provided after the `run` command.

Change-Id: If05c3e4c8465ab0b5a088a9c5f4cf5386c231f42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354981
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-02-28 21:38:27 +00:00
Kallen Tu 6e04dd49de [analyzer] Find comment references in DocImportScopes.
This CL adds the `DocImportScope` which allows the scope visitor to find elements in libraries imported by a `@docImport`. The resolved elements will eventually be used in Dartdoc to make links for the comment references.

`Scope.lookup` can choose toggle whether or not it needs to look in doc imports for a certain id.

Change-Id: I329152651ea3cb4e3a5e2787a5d91ba1cd397d29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353232
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2024-02-28 21:16:17 +00:00
Devon Carew e0e6231b9e [deps] rev dartdoc, markdown, mockito, test, tools, web
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (40c470e..eed92d3):
  eed92d3f  2024-02-28  Sam Rawlins  Simplify InheritingContainer.allModelElements and _inheritedElements (dart-lang/dartdoc#3689)
  7b3274a6  2024-02-28  Sam Rawlins  Do not require FLUTTER_ROOT any longer, even for flutter packages (dart-lang/dartdoc#3688)
  d25dfca4  2024-02-27  Kallen Tu  Remove LanguageFeatureRenderer. (dart-lang/dartdoc#3686)
  d8e7f99c  2024-02-27  Sam Rawlins  Display the immediate representation type, not any erasure (dart-lang/dartdoc#3685)
  91c361af  2024-02-27  Kallen Tu  Remove SourceCodeRenderer and TypeParametersRenderer. (dart-lang/dartdoc#3683)

markdown (d735b0b..62e3349):
  62e3349  2024-02-27  Tom Yeh  Fix `#586`: encode image tag's src attribute (dart-lang/markdown#589)

mockito (7d6632f..3ef744f):
  3ef744f  2024-02-27  Ilya Yanok  Bump SDK version using in CI to 3.3
  ecec7c1  2024-02-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.0 to 1.6.2
  b693ada  2024-02-27  Ilya Yanok  Add basic extension types support

test (a3f05ec..26953ba):
  26953ba4  2024-02-26  Sam Rawlins  Update README.md, remove link to Stream Matchers (dart-lang/test#2187)

tools (c7fbf26..fca993e):
  fca993e  2024-02-28  Elias Yishak  Fix late initialization error for `Analytics.userProperty` (dart-lang/tools#239)
  1a0d7da  2024-02-26  Elias Yishak  Export `testing.dart` with all enums (dart-lang/tools#237)

web (d96c01d..fa4280c):
  fa4280c  2024-02-27  Devon Carew  mention the migration guide in the readme (dart-lang/web#187)

Change-Id: Ib183b4af55146fdeabfb18dc91bf642159e67a1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354963
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-02-28 20:53:21 +00:00
Lasse R.H. Nielsen 1436635d27 Add more information to ParalleWaitError.toString.
Gives the constructor optional parameters for providing
more information that can be used in the `toString` message,
and the `stackTrace` getter.
Makes the `iterable.wait` and `record.wait` extension methods
provide such information, so that the `toString` will always
contain the text of *one* of the errors.

(No issue, problem with logging was brought up in chat.)

Change-Id: I5f9a20ad0af0c64a2e7ff3cdb56f187a5cf5a3ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353080
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2024-02-28 20:36:58 +00:00
Elliott Brooks 4642c73347 Pin Webdev dep
Bug: https://github.com/flutter/devtools/issues/7231
Change-Id: I26b791e2f71aa8f696c65ff9a84f41f4b01e2a75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354782
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2024-02-28 20:33:32 +00:00
Derek Xu 098d2f3652 [VM/Compiler] Mark instructions related to late initialization error checks as synthetic
TEST=pkg/vm_service/test/breakpoints_ignore_late_initialization_error_instructions_test.dart

Fixes: https://github.com/dart-lang/sdk/issues/53376
Change-Id: Iab7d2489f29bfc4a586b9de6e3caa0a7c1a35454
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355000
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-02-28 20:06:58 +00:00
Danny Tuppeny df72011ac1 [dds/dap] Fix expectation of downloaded macro-generated sources to always have uppercase drive letters
Fixes https://github.com/dart-lang/sdk/issues/55052

Change-Id: I1a48b50e60be6fed74370f269a9fd39c648db4bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354941
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-28 20:00:13 +00:00
Danny Tuppeny b5ae11e64b [analysis_server] Add test for LSP document highlights in generated files
Change-Id: Icb2f268a8e43d1931b10bec4cfc8ef560252e8e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354884
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-28 19:56:41 +00:00
Danny Tuppeny 669514933f [analysis_server] Add tests for document symbols in macro-generated files
Change-Id: Idc1d2e9583c7281e685b14d6dadd5693f66c8678
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-28 19:56:41 +00:00
Erik Ernst ca220074db Add test about "T derives the future type U"
Issue https://github.com/dart-lang/sdk/issues/54628 raised the issue
that the static analysis of `await e` behaves in unexpected ways when
the static type of `e` is a subtype of a future related type, rather
than just a plain `Future<T>` or `FutureOr<T>` for some `T`.

This CL adds a test that assumes the update to the language
specification which is performed by the PR
https://github.com/dart-lang/language/pull/3574. Hence, this CL
should ONLY BE LANDED if and when that PR is landed.

Change-Id: Ib8acb77e24ffbceb0b4034d3b23a0f4fef8e3d1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354020
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-02-28 19:44:45 +00:00
Erik Ernst 3f4f10bd0f Update void usage test to new test runner expectations
The old version of language/void/void_type_usage_test.dart had some
faults (compile-time errors were expected, but they weren't reported
by tools and yet the test run succeeded). The failures were caused by some amount of duplication in the labels (a handful of duplicate labels from a set of about 450 labels, that is, it wasn't immediately obvious). This CL updates the test to use the new test expectation syntax (`//  ^^^^`) and adjusts the expectations to match the currently reported error messages, plus the ones about `void` that are missing.

Note that this test went through a phase where I believed that we had about 260 failures (130 CFE and 130 analyzer), but they turned out to be a consequence of migrating this test incorrectly from being a multi test into a form where it uses the current test expectation comments (`// ^^^` and such). At this point we just have 3 failures (all on expressions of the form `e += 1`), all with the CFE.


Bug: https://github.com/dart-lang/sdk/issues/31883
Change-Id: Ib1ceb56326a5847e3ca23ac0ee655eee65f0d76f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350921
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-02-28 18:30:20 +00:00
Keerti Parthasarathy c17d17153b Add a test for selection range for augmentation.
Change-Id: I59d0c5dbf4a2e388daeb9617774cbdf0b929d2eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354706
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-02-28 17:55:34 +00:00
pq 94e37d0b22 Verify that move_top_level_to_file does not change macro generated code
See https://dart-review.googlesource.com/c/sdk/+/353780 for the general approach to adding macro test support.

Open: is there a better way to get macro-generated source?


Change-Id: Ib5cda2f8e48bdbfc639ee3e9513e4d43a482bb85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354705
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-02-28 17:32:08 +00:00
Tess Strickland 321c45e327 [vm] Update error message for incorrect extracted offsets.
The tool is now written in Dart.

TEST=ci

Change-Id: I343f57bfb008b9423ada22549b37da9c80258688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354882
Auto-Submit: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-28 17:25:33 +00:00
William Hesse 83ba5916b7 [vm] Skip a slow test in aot debug mode (#21708)
The test LibTest/collection/ListBase/ListBase_class_A01_t02 takes
more than 10 minutes to be precompiled in debug mode, due to
a known issue.

Skipping this test on the CI and CQ  because it causes deflaking problems
when timing out. The problem is being tracked already in an issue.

Bug: https://github.com/dart-lang/sdk/issues/54974
Bug: https://github.com/dart-lang/sdk/issues/21708
Change-Id: Ib05e0f18baac684cf3317dbc2171a5a585e04f98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354844
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-28 15:28:39 +00:00
Tess Strickland f4857643e0 [vm/compiler] Restore old definition of BoxLanesInstr::ComputeType().
TEST=lib/typed_data/float32x4 lib/typed_data/int32x4 on RISCV.

Fixes: https://github.com/dart-lang/sdk/issues/55040
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simriscv64-try,vm-linux-debug-simriscv64-try
Change-Id: I445195d12bbb209209d6958dbfcbfc634422ae6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354842
Commit-Queue: Tess Strickland <sstrickl@google.com>
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-28 12:21:12 +00:00
Johnni Winther 7342d01311 [cfe] Handle library augment in listeners
This allows `library augment` directives in the parser listeners.

Closes #55038

Change-Id: I4d132c347c6b085292362976d89c87c487d7ff40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354860
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-28 10:46:40 +00:00
Martin Kustermann c57ad70588 [gardening] Make test not run in obfuscated/dwarf mode
TEST=Fixes standalone/regress_53519_test in obfuscate/dwarf mode

Change-Id: I6bd87ffbc983e7a429b2c0728a09ac3ccfd6d280
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354840
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-28 10:27:11 +00:00
Jens Johansen 7785799901 [CFE] Only listen to signal if doing coverage
Change-Id: I3eaf4914e8517e643dba092c525fa55e8282401e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354223
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-02-28 08:28:46 +00:00
Jens Johansen ce0a684c8e [CFE] Add a onError when listening to signal to not throw errors on Windows
Fixes https://github.com/dart-lang/sdk/issues/55020

Change-Id: I04a8de37593e126230d3f32918e0f33faa20c8f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-02-28 07:38:37 +00:00
Stephen Adams 5bcb545696 [dart2js] Clean up HInstruction.inputs ownership
Ensuring HInstruction.inputs is always a growable list allows ~650
calls to be devirtualized* and makes the output of `dart compile
aot-snapshot dart2js.dart` about 0.1% smaller. I was not able to detect a significant performance difference in the SSA phase time.

* Estimated from indirect indexed addressing mode calls in the disassembly.

Change-Id: I330cd42299d994669bf7a1e2303497b4bbdb827c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354160
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2024-02-28 03:13:29 +00:00
Liam Appelbe 56dcacff5c [test] Weaken regex in regress_53519_test.dart
Apparently in AOT mode there's no column number:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8754902661978664065/+/u/test_results/new_test_failures__logs_

TEST=tests/standalone/regress_53519_test.dart
Change-Id: I06f97d8738d0f1228953fbfbf2006302defec1a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354820
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2024-02-28 02:22:09 +00:00
Ryan Macnak a07cf4202f [test_runner] Fix null assertion failure running on RISC-V.
Bug: https://github.com/dart-lang/sdk/issues/48545
Change-Id: Ic97dab268386423fd74adc0f0cef3ce361dc610e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350684
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-02-28 00:16:52 +00:00
Jake Macdonald 0bf9ef8076 add 'library augment <uri>'; to augmentation libraries
Bug: https://github.com/dart-lang/sdk/issues/54848
Change-Id: I5ec3cb01a76955e4cbe91a867277c9d91ce5c927
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353322
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-27 23:12:41 +00:00
Lasse R.H. Nielsen f0aeebd0e7 Make all platforms return null from Error.stackTrace until thrown.
The web platforms used to invent a spurious stack trace when reading
`Error.stackTrace` before the object was thrown.
They now return `null` instead, if there is no underlying JS error object,
matching specified behavior.

Fixed bugs in async error throwing in dart2wasm:
* `throw` in an async function did not set the stack trace on an error.
  Now calls `Error._throw` instead of just a direct Wasm "throw".
* `async*` functions did not capture the stack trace of a throw
  that ended the function body, which means it called
  `StreamController.addError` with only one argument.
  That then resused the stack trace from an `Error` throw instead
  of the correct stack trace.

Added tests.

Change-Id: I1d9fa8d9e18076a7fe28254b60b950866cd550a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354021
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-02-27 23:01:06 +00:00
Danny Tuppeny 8ae8ffd9c0 [analysis_server] Move LSP tests over to generic TestMacros class and remove LSP TestMacros class
We had two TestMacros classes for no great reason, so this removes the LSP one and updates the LSP tests to use the more generic one.

I moved `addMacros` to the mixin as part of it so it can be used by LSP, legacy and integration tests without having to duplicate this.

Change-Id: I2566ab1b15e510d2d6b71201a0d4d4eab03d793b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354760
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-02-27 22:12:22 +00:00
Liam Appelbe 44094abe2f [vm/service]: VM plumbing for Throw.forErrorHandling
Use the new Throw.forErrorHandling AST flag to ignore synthetic error
handling statements in coverage. When the flag is found on a throw node,
all the TokenPositions on the child nodes are set to kNoSource.

Questions for reviewers:
- Are there any VM use cases that need the real TokenPosition here?
- Is there a better way of encoding this flag in the TokenPosition?
- Should we add a new sentinel TokenPosition instead?

Bug: https://github.com/dart-lang/sdk/issues/54005
Fixes: https://github.com/dart-lang/sdk/issues/53519
Fixes: https://github.com/dart-lang/sdk/issues/54941
Change-Id: Ic44fe2fa0359188b890d5ed762e3ff8c593c850d
TEST=SourceReport_Regress53519_Destructuring
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353920
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2024-02-27 21:59:50 +00:00