Commit graph

99176 commits

Author SHA1 Message Date
Danny Tuppeny
97ac9ace13 [analysis_server] Use FileResult.content for LSP TextDocumentContentProvider
Change-Id: I09546804419bb5d78c3add4e1fa3d80a11526160
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347022
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-01-18 20:16:43 +00:00
Ben Konyi
5a60ceeff8 [ package:vm_service ] Fix get_isolate_rpc_test flakiness
Fixes https://github.com/dart-lang/sdk/issues/54585

Change-Id: Ie335a5cb7c2add7987d9b729d86b6a0823357775
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347140
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-01-18 20:10:40 +00:00
Devon Carew
2facb74d3a Bump webdev to f32fdc48f0ae7cb7fa8088233fd69e2ed30af457
Changes:
```
> git log --format="%C(auto) %h %s" c08a65c..f32fdc4
 https://dart.googlesource.com/webdev.git/+/f32fdc48 Prepare Dart Debug Extension for release (2346)
 https://dart.googlesource.com/webdev.git/+/c59d26a0 Reset DWDS after release (2347)
 https://dart.googlesource.com/webdev.git/+/c8db176a Prepare DWDS for release to version 23.2.0 (2345)
 https://dart.googlesource.com/webdev.git/+/b377fcde Send a "pong" response when Cider "pings" the Dart Debug Extension (2344)
 https://dart.googlesource.com/webdev.git/+/10131b1c Plumbing flags required for running tests with the DDC module system. (2295)
 https://dart.googlesource.com/webdev.git/+/7c096a2e Fetch full `developer.log` messages (2333)
 https://dart.googlesource.com/webdev.git/+/6cad2b00 Reset DWDS to version `23.2.0-wip` after release (2334)

```

Diff: https://dart.googlesource.com/webdev.git/+/c08a65c93c8504af27bf9169d17037e6abf3cd9c..f32fdc48f0ae7cb7fa8088233fd69e2ed30af457/
Change-Id: I825ca4f049daaa073d9b2fa11a01248bee003fa6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347122
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2024-01-18 20:08:39 +00:00
Konstantin Shcheglov
6f82d639d8 Macro. Add JsonSerializable example.
It looks that the element model correct, but resolution is not yet.
I will work on improving resolution in following CLs.

Change-Id: I225db07bf243539638364b711f0c9c68550199f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-18 18:54:49 +00:00
Ben Konyi
53af406764 [ package:vm_service ] Fix flaky get_memory_usage_test.dart
Fixes https://github.com/dart-lang/sdk/issues/54586

Change-Id: Ide277dc7db1fe85a35a2a7d8cc0ad7ec70c10688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347141
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-01-18 18:39:42 +00:00
Danny Tuppeny
2b713a9e4e [analysis_server] Add experimental TextDocumentContentProvider support for virtual documents
This adds support for serving the contents of virtual files to the client over a custom LSP protocol (based on the VS Code API of the same name). This is currently a custom Dart protocol but hopefully very close to something that could become standard LSP in future.

If the client advertises support for this feature (currently with an experimental flag "supportsDartTextDocumentContentProviderEXP1") we will return the set of URI schemes we can provide content for (currently "dart-macro-file"). Additionally, we will map internal analyzer macro paths (like `/foo/bar.macro.dart`) onto that scheme (`dart-macro-file://foo/bar.dart`) instead of standard `file://` URIs.

Overlays are not created for these kinds of files (because they would override the server-generated content).

Some language functionality "just works" because we can get resolved ASTs for the macro files (and many LSP features operate on these), but more testing (and tests) are required.

Included are tests for the virtual file methods (and events) and Go-to-Definition. Tests for other features are outstanding.

Change-Id: I2056699652873a12b730f565b823f187f883a1ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-01-18 17:34:43 +00:00
Sam Rawlins
0c3503dde7 Analyzer: Stop relying on a static lint rule map in AssistProcessor
This also simplifies the logic of determining whether a possible producer is
already being proposed as a quick fix for an enable lint rule.

Fixes testing analysis_server with: `dart --enable-asserts pkg/analysis_server/test/test_all.dart`.

Otherwise a functional no-op.

Change-Id: I623101b1c4c732f631a0b74c488cc8853afd282e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-18 17:33:29 +00:00
Sam Rawlins
63399a992c analyzer: Support implicit call tearoff from type variable
Fixes https://github.com/dart-lang/sdk/issues/54353

Change-Id: I0b7725efb6380de35832f1a713df3b4139990f0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346947
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-01-18 17:19:50 +00:00
Danny Tuppeny
6f97eb264a [anlaysis_server] Fix flaky verify_sorted test
This test appears to have been flaky for a while. Sometimes the analysis status triggers multiple times during the test run which results in "Future already completed" errors.

It's not clear why the status fires multiple times (I cannot reproduce it locally despite running in a loop for a while) but the test really only cares about detecting that initial analysis has completed, so I've changed it only track the first instance.

Change-Id: If8e5d5b3ba27217bbdce94a68840882773920351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-01-18 16:44:17 +00:00
Ben Konyi
8db4393f1e [ CLI ] Start DDS instance if VM service URI passed to dart devtools doesn't have a DDS connection
This is can happen if a Dart or Flutter application is started in a
non-standard way (e.g., not through the `dart` or `flutter` CLI
tooling). Developers using custom embedders need to use `dart devtools`
to start a DevTools instance, so it's a good opportunity to check for a
DDS instance and launch DDS for the target application if one isn't
found.

Change-Id: I817ca0951c7839e8e9a0d1c78756caa45381cea1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346820
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-01-18 16:28:37 +00:00
Dan Chevalier
a995f7930b Solidify, test and document DTD errors
Change-Id: Ied0f1af43954e47a2c51837bd2fc8d7ce0e03fa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345800
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-01-18 16:07:31 +00:00
Paul Berry
c9cf5b9916 Add a type parameter to TypeAnalyzer to represent type schemas.
The front end and analyzer use the same representation for types and
type schemas, with the unknown type schema (`_`) treated as a
pseudo-type. This creates the risk of accidentally mixing types and
schemas, resulting in `_` accidentally "leaking" into the type system
and showing up in static analysis results or error messages.

As a step toward reducing this risk, this change adds a type parameter
to `TypeAnalyzer`, preventing the shared type analysis code from being
able to assume that types and schemas are represented the same. This
extra discipline makes it much easier to search through the code and
identify how types are manipulated vs. how type schemas are
manipulated, and makes it impossible for the shared type analysis to
accidentally leak `_` into the type system.

I believe this change will also make it easier to implement some type
inference improvements we've been contemplating, such as improved type
inference of `.map(...).toList()`, as well as
https://github.com/dart-lang/language/issues/3471, because those
improvements may require introducing new kinds of type schemas.

Change-Id: Ifcd7e2c4e1172ee39719ce8c8b10d7f10f6a7b6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345353
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-18 15:28:25 +00:00
Jens Johansen
9abc9fc4d7 [CFE] Strong/weak suites takes error-and-ok-comments into account
A line marked with "// error" should get an error (or it's an error),
and one marked with "// ok" should not get an error (and if it does it's
an error).

Some tests are left unhandled and are programatically ignored in this
first CL. A bug (https://github.com/dart-lang/sdk/issues/54635) has
been filed to sort those out.

Change-Id: I083f62829ceff6ff85121e21cfdb6670bfacb7e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346301
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-01-18 14:40:08 +00:00
Ömer Sinan Ağacan
941ddc7ad7 [deps] Update Firefox from 120.0 to 121.0.1
Fixes: b/319607544
Cq-Include-Trybots: luci.dart.try:dart2js-linux-firefox-try,ddc-linux-firefox-try,dart2wasm-linux-firefox-try
Change-Id: I63a803a600e4f2471b09b24f40cfe554f2ac5d17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345301
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-01-18 13:56:39 +00:00
Daco Harkes
ae5db20deb [deps] Roll native_assets_cli to internal import
https://dart-review.googlesource.com/c/sdk/+/346761 can't land,
because then flutter_tools in g3 breaks.
flutter_tools in g3 can't be forwarded because
https://github.com/dart-lang/native/pull/886 isn't in g3 yet.

Landing https://github.com/dart-lang/native/pull/886 in g3
should work, because it shouldn't break flutter_tools.

Change-Id: Ida60ed22093ace535c00114fc8b088ba2100eb1a
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-win-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346960
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-01-18 12:50:21 +00:00
Daco Harkes
d506f5064c Owners file for pkg/native_assets_builder.status
Change-Id: I09272d82e3b3c374362ceb0552260d292782b670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346860
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-01-18 11:05:05 +00:00
David Morgan
b28ced8e93 [macros] Add language test: applying a macro in the wrong place is an error.
Change-Id: Iebdc005d792ac2e2fca912f792d3caf16810bb32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346044
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-01-18 09:02:52 +00:00
Alexander Markov
4266f780bd Reland "[vm/aot/tfa] Analyze function calls"
This is a reland of commit 66d3eedb33

g3 breakage was fixed in https://dart-review.googlesource.com/c/sdk/+/346940.

Original change's description:
> [vm/aot/tfa] Analyze function calls
>
> This change adds analysis of function calls when closure target
> of a call can be inferred. Local functions are now analyzed separately
> from enclosing members. Inferred result type of function calls is now
> used in the AOT compiler.
>
> Time of AOT compilation step 2 (TFA) on a large Flutter application:
> Before: 59.448s
> After: 61.870s (+4%)
>
> Maintaining hierarchy of function types and analysis of all function
> calls is not feasible as it causes unbearable increase in AOT
> compilation time.

TEST=existing
Issue: https://github.com/dart-lang/sdk/issues/39692

> Change-Id: Ieb4d5dce23868b5ab5c87fa1e77e49b85fd656fe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345083
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

Change-Id: I05377121ffa7e56748c8a5ab58551e2b1caef70b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346946
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-01-18 08:48:37 +00:00
Daco Harkes
fb8f06baef [vm] Fix g3
Follow-up to https://dart-review.googlesource.com/c/sdk/+/346940.
Follow up to https://dart-review.googlesource.com/c/sdk/+/346907.

TEST=ci
Fixes b/320789794

Change-Id: I82e52a651174d9a84cd05995383255a01257f556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346961
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-01-18 08:44:22 +00:00
Alexander Markov
6ce0341f60 [vm] Fix build on vm-ffi-qemu-linux-release-arm bot
Follow-up to https://dart-review.googlesource.com/c/sdk/+/346940.

TEST=ci
Fixes b/320789794

Change-Id: I4440f06b82f92594749540c715801f71fe90759d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346907
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2024-01-18 07:33:38 +00:00
Konstantin Shcheglov
1719ef36c4 Revert two CLs that remove WithoutNullSafetyMixin usages.
There is code in Flutter that verifies the analyzer with language
verison `2.7`, and breaks if we remove legacy support.

I opened https://github.com/flutter/flutter/issues/141743

Bug: https://github.com/flutter/flutter/issues/141576
Change-Id: I9ec47c2126149ead49cdead82f49fd9eb80a75ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346948
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-01-18 03:22:17 +00:00
Konstantin Shcheglov
b6d2662a82 Fix producing errors from bytes to update the latest signature.
This should fix analyzer-mac-release bot.

Change-Id: Ia61f5c33a21d703f20fb7a275bbffa4511a122c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346941
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-18 02:04:14 +00:00
Konstantin Shcheglov
f6c0da24d0 Macro. Support for getErrors()
Also, fix a bug with the associated file.

Change-Id: Ib8440e0ce6846ed664a836227ea0ab3a841dcdc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346942
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-01-18 01:51:59 +00:00
Alexander Markov
5230995e3a [vm] Fix unwinding records on Windows
This change fixes the following 2 bugs related to unwinding records
on Windows:

1) When cross-compiling from another OS to Windows, unwinding records
   were not added to the end of the code section. Later, when loading
   AOT snapshot, arbitrary bytes at the end of the code section were
   used as the unwinding data, which could result in the errors
   returned from Windows API calls.

2) When code section is mapped, its size was rounded up to the page
   size; when looking for unwinding record, size of the unwinding
   record was subtracted from the rounded size. This is not correct
   as unwinding record is placed right at the end of code section,
   so code section size should be used before rounding.

Also, magic value is added to the unwinding record in order to
verify that it is preserved and correctly found.

TEST=Manually tested repro from b/320642692
TEST=ffi/ffi_induce_a_crash_test

Fixes b/320642692
Fixes https://github.com/dart-lang/sdk/issues/54206

Change-Id: Id0c6413cd1b759da9e9f25f7617eef55f33b04a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346940
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-01-18 01:09:49 +00:00
pq
4a7dd72bcf stop accessing driver.analysisOptions
Change-Id: Ieb9d2581691b82f59b2a5540aaae2c3e453c078c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346944
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-01-18 00:40:29 +00:00
pq
b7f46d3738 stop reporting "unique" options file counts
The presence of options files will soon not cause context creation so this data won't be useful.

See: https://github.com/dart-lang/sdk/issues/54312

Change-Id: I32ed83458c2202f036bd31bac930f91010089aad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346943
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-01-18 00:13:48 +00:00
pq
fba7ea4f3a update diagnostics contextData to collect aggregate options data
See: https://github.com/dart-lang/sdk/issues/54312

Change-Id: I35083783514de5fb204230eec14cf3cf9a15c18c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346906
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-17 23:21:53 +00:00
Konstantin Shcheglov
b9c922998c Use patterns and null safety to omprove request routing code style.
Change-Id: I2747e7cfd982430f0d1c72a29b58945722533638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346905
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-17 22:44:58 +00:00
Konstantin Shcheglov
f98574ee10 Extract GetDriverEvent, and print method/name on the same line.
Change-Id: I0ccf7131cf1fc144212a28ba4046802bdd48557c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346903
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-17 22:44:01 +00:00
Paul Berry
c5fb584a75 Language test pattern type schemas.
I discovered recently that when we implemented the "patterns" feature,
we got the pattern type schema for cast patterns wrong--it was
specified to be `_`, but what was actually implemented was
`Object?`. I've filed a breaking change request to address that:
https://github.com/dart-lang/sdk/issues/54640.

In the course of prototyping a fix, I was surprised to find that no
language tests or co19 tests were affected; it appears that we don't
have adequate test coverage of pattern type schemas. This CL addresses
the lack of test coverage by adding a language test.

The test case for cast patterns is currently commented out, pending
resolution of the breaking change request; after the breaking change
lands, I will update the test accordingly.

Change-Id: I0d27fd8ac65f16d21a8597586e6f76fd9a5ba86e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346621
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2024-01-17 21:55:14 +00:00
Bernardo Ferrari
4b273b4481 Make sign faster.
Closes https://github.com/dart-lang/sdk/pull/54653

GitOrigin-RevId: af94934e2fb2bac0989742364fd2e33b49398469
Change-Id: I412d48ff24bd80120cf1de4e580b85eeca8e9619
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346687
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-01-17 21:39:34 +00:00
pq
daf06f3fe4 spelling fixes
Change-Id: I719e6daf9b465e362ffcf3ab29877667dd9e3963
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346904
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-01-17 21:04:48 +00:00
Konstantin Shcheglov
5df56a153c Add 'content' to FileResult.
Change-Id: I8600aed3beb712b4da9e4a157b2e87398057a9cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346902
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-17 20:35:10 +00:00
Konstantin Shcheglov
bd989afb35 Macro. Support for getUnitElement()
Change-Id: Iefeb5594279e768031e88fb31ae59b983b35b705
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346686
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-17 20:20:08 +00:00
Konstantin Shcheglov
904c8c2c39 Add completeAll() extension for List<Completer>.
Change-Id: I389091ec08749f0b61ce88d93cff240e05fb03bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-17 19:40:29 +00:00
asiva
93f41eccf0 [VM/test] Skips test on Android as executable bit is not set for shell script.
TEST=fixes test.

Change-Id: I384aa695b3072c31dbd120cae17504a373a22275
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345861
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-01-17 19:21:19 +00:00
asiva
c539f57b00 [VM/vm_service] Fix for https://github.com/dart-lang/sdk/issues/54641
- Skip stdio_newline_test in AOT mode
- Fix capture_stdio_test and dds_stdout_stderr_history tests under the
  observatory directory to account for the new line fix.

TEST=ci

Bug:54641
Change-Id: Ic5403ab30a1367e4ec9e6798545837813f8f1060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346685
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-01-17 19:19:23 +00:00
Brian Quinlan
b325bc6a43 [doc,io]: Document how errors with File.openRead are exposed
Bug:https://github.com/dart-lang/sdk/issues/53904
Change-Id: Ib457ceb62f6745753e047b5d8160bf6d50fa12cb
CoreLibraryReviewExempt: documentation-only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346586
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2024-01-17 18:43:50 +00:00
Konstantin Shcheglov
5a6ed7a8db Macro. Support for macro generated files in getIndex().
Change-Id: I3eabefc1a1a2b0ac44e554b111fe6ebe06d0288a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346684
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-17 18:20:28 +00:00
Ryan Macnak
d5104d978d [vm, gc] Defer marking of SuspendState.
SuspendState changes shape on suspend and resume as new PCs change which StackMap is used to interpret the saved frame area. Shape changes are not compatible with concurrent marking because they can cause the concurrent marker to misinterpret a non-pointer as a pointer.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54410
Change-Id: I5ec35b812a4e94a2bae2628a8914f6d05116dbc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346620
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-01-17 17:36:08 +00:00
pq
a754646dc1 cleanup file path conditional
Change-Id: I8c6c9949891bb87cfb9cd52397383a03d82c5ac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346587
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-01-17 17:12:20 +00:00
Konstantin Shcheglov
ad9928cfde Macro. Tests for producing results for macro generated files. Part 1.
For addFile(), changeFile(), getResolvedLibrary(), getResolvedUnit()
These should cover the main need of DAS, and IDE integration.

Change-Id: Ie711ceaec7dd4fa4a5f8f8f51b9ddc3ff0b418d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-01-17 16:40:49 +00:00
Konstantin Shcheglov
9835d42c60 Macro. Report introspection cycles, every time.
See https://github.com/dart-lang/language/pull/3551

Change-Id: I179be7ac04ecc1a1c3f4ee0cfbadfa27e079b6d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346382
Reviewed-by: Morgan :) <davidmorgan@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-17 16:39:40 +00:00
Tess Strickland
743c0c862c [vm] Revert caching of default type arguments within closure.
Since we already cache instantiation of type argument vectors to avoid
runtime calls as long as the cache has room, remove the default
type arguments field from Closure objects. Instead, just perform any
needed instantiation when the default type arguments are needed
using the instantiator and parent function type arguments stored
in the closure.

Also rename DefaultTypeArgumentsKind to InstantiationMode and
generalize the calculations to determine how to instantiate default
type arguments to an operation that can be performed on type arguments
in general.

TEST=ci

Fixes: https://github.com/dart-lang/sdk/issues/54589
Issue: https://github.com/dart-lang/sdk/issues/54564
Change-Id: I704ea4244fb10cbc08175629c8e92cf05b8aabea
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-arm64-try,vm-aot-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-tsan-linux-release-x64-try,vm-aot-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346021
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-01-17 14:36:48 +00:00
Ryan Macnak
58bf203064 [VM] Add support for allocation tracing in AOT
TEST=Manual
Bug: https://github.com/dart-lang/sdk/issues/51234
Change-Id: I4ab75bb85898a41dfb091b38402711170fd3b972
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271420
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-01-17 13:50:49 +00:00
Emmanuel Pellereau
c111a1346e Revert "[vm/aot/tfa] Analyze function calls"
This reverts commit 66d3eedb33.

Reason for revert: breaks google3 (b/320642692)

Original change's description:
> [vm/aot/tfa] Analyze function calls
>
> This change adds analysis of function calls when closure target
> of a call can be inferred. Local functions are now analyzed separately
> from enclosing members. Inferred result type of function calls is now
> used in the AOT compiler.
>
> Time of AOT compilation step 2 (TFA) on a large Flutter application:
> Before: 59.448s
> After: 61.870s (+4%)
>
> Maintaining hierarchy of function types and analysis of all function
> calls is not feasible as it causes unbearable increase in AOT
> compilation time.
>
> TEST=existing
> Issue: https://github.com/dart-lang/sdk/issues/39692
>
> Change-Id: Ieb4d5dce23868b5ab5c87fa1e77e49b85fd656fe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345083
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

Issue: https://github.com/dart-lang/sdk/issues/39692
Change-Id: Ieb9104f4263e19ef9e5bd749e935f6c2dbec3046
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346780
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2024-01-17 13:08:58 +00:00
Chloe Stefantsova
970885b879 [cfe] Use TypeParameter in DDCTypeEnvironment, TypeParameterFinder
This CL is a part of the clean up for
https://dart-review.googlesource.com/c/sdk/+/312264

Change-Id: If9d892496af5498943694ad266ee6eb151fdc3e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346401
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-01-17 11:00:17 +00:00
pq
f45c75655b display multiple options files in the diagnostics page
See https://github.com/dart-lang/sdk/issues/54074 for screenshots.

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



Change-Id: I4143a29c55857616b406be87f587e6231c7d90b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346682
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-17 02:52:40 +00:00
pq
f68fd1f108 lift options analysis into analyzedFiles loop
See: https://github.com/dart-lang/sdk/issues/54312

Change-Id: Ide2314704ec7e233f40d0db98805c98820b81333
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346585
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-01-17 02:20:40 +00:00
Konstantin Shcheglov
12bba67bf5 Stop reporting MISSING_RETURN as unrecognized_error_code.
Bug: https://github.com/flutter/flutter/issues/141576
Change-Id: I1080ce65ebab70363fc49afc6798ccf9ddb532ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346681
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-17 01:37:18 +00:00