Commit graph

99192 commits

Author SHA1 Message Date
Jens Johansen 3e46b913de Fix build after pkg/testing/test/hello_test.dart was deleted
https://dart-review.googlesource.com/c/sdk/+/346760 deleted the file
pkg/testing/test/hello_test.dart which was for whatever reason specified
in the BUILD.gn file for fuchsia builds, meaning those no longer builds.
This CL removes the reference to it, hopefully allowing it to build.

Change-Id: I51a8ae47dec61dc0bde9e0560a2cdc05cf916942
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347260
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-01-19 10:08:58 +00:00
Martin Kustermann 19caeb8604 [dart2wasm] Make dart compile exe use .unopt.wasm instead of .wasm.unopt
* It had already the assumption there's a `.` in the name but didn't
  check for it
  => Validate that the output file ends with `.wasm`

* Make the unoptimized wasm (if emitted) be `.unopt.wasm`
  => It's a wasm file, so it should have a .wasm extension

This is a step towards making flutter use `dart compile wasm`
directly without the AOT snapshot of pkg/dart2wasm/bin/dart2wasm
and wasm-opt separately. Which will allow removing of the duplicated
wasm-opt flag list in flutter.

Change-Id: I685bb1aaa9d95ab43936bab68add916a642eb296
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347280
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-01-19 09:53:08 +00:00
Johnni Winther 8a2f6495b3 [cfe] Add isImplicitCall to DynamicInvocation
This adds an ìsImplicitCall to DynamicInvocation which is set on
expression like `d()` where `d` has type dynamic, to distinguish
the for `d.call()`.

TEST=pkg/front_end/testcases/general/dynamic_call.dart

Change-Id: I73beb911bdb315a510c862e6d4876cf7673ec3c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346240
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-01-19 08:39:30 +00:00
Jens Johansen 6c897ba077 Remove unused options from package:testing (batch 2)
Change-Id: I7f9227f3b00d84db5c29e8e5da88dba69def91cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346760
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-01-19 08:15:03 +00:00
Martin Kustermann 1d92908169 [dart2wasm] Have binaryen/wasm-opt flags in one place (dart compile exe), make all other places take it from there
Golem build configuration is setup in a way that includes the `pkg/`
folder entirely, so the shell scripts should have access to the
`dart compile exe` sources.

Change-Id: I5395413ce85f11098d14eacbd6ce392f665ddce5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347021
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-01-19 07:47:52 +00:00
Brian Quinlan e5f53ce005 [io] Add tests for failure to resolve a path using FileSystemEntity.resolveSymbolicLinks.
Bug:https://github.com/dart-lang/sdk/issues/53862
Change-Id: I269668064657856f2c2aa3479618b206aad075aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347204
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-01-19 01:47:49 +00:00
Devon Carew dd837c8ffd Bump markdown to 7602f9f17d25702c11991380ebc7853ccdc42f7a
Changes:
```
> git log --format="%C(auto) %h %s" 7fdfa55..7602f9f
 https://dart.googlesource.com/markdown.git/+/7602f9f Bump to 7.2.0 (574)
 https://dart.googlesource.com/markdown.git/+/792cca4 Bump dev dependencies (573)

```

Diff: https://dart.googlesource.com/markdown.git/+/7fdfa557dc29e00c94bb637a34869e67d57fdb26..7602f9f17d25702c11991380ebc7853ccdc42f7a/
Change-Id: Ib08baa85aa38504c134e693630d895e51dbfc615
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347221
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2024-01-19 01:37:53 +00:00
Devon Carew 5a8f9a5619 Bump web to d17fdd2b6ddec289920d02a3df92c3368f0a0e50
Changes:
```
> git log --format="%C(auto) %h %s" 020ef37..d17fdd2
 https://dart.googlesource.com/web.git/+/d17fdd2 contribute a fix_data.yaml file to enable 'dart fix' renames (141)
 https://dart.googlesource.com/web.git/+/42e86ca collect MDN API information (130)
 https://dart.googlesource.com/web.git/+/4022b30 Redeprecate deprecated APIs in 0.4.1 (142)

```

Diff: https://dart.googlesource.com/web.git/+/020ef3729a10a1969b98c2b99b9894c81a953440..d17fdd2b6ddec289920d02a3df92c3368f0a0e50/
Change-Id: Ia5100a1809b176b35ab7af8f2ffab13aee1fbc61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347124
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-01-19 00:53:46 +00:00
Ben Konyi 232f5d9325 [ CLI ] Fix devtools_test.dart on Windows
Fixes https://github.com/dart-lang/sdk/issues/54666

Change-Id: I7a2dd434734b92bd0554e2481f129da1d83f39bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347142
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-01-19 00:27:23 +00:00
Konstantin Shcheglov 3ab4358f33 Macro. Dispose AnalysisContextCollection(s) in analyzer_cli/
Change-Id: I0392f591c51c8eb1faef7b065ddfac18b1864e6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347201
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-19 00:05:17 +00:00
Sam Rawlins 3e5049217d Bump dartdoc to b04c9c127fea5f3fdf600aa205f50d81d1c779c5
Change-Id: I2dedcabbd7a11c137b12c6667aee36cca9e3c31f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347181
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-01-18 23:50:09 +00:00
Ryan Macnak 6872314c66 [vm] Cleanup old TODO.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/42473
Change-Id: I2aca5b3a859ec7d1b719211734a2f41ef387be30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347180
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-01-18 22:56:40 +00:00
Paul Berry eaf876865d Revert debugging prints added to dart analyze.
These prints were accidentally included in
https://dart-review.googlesource.com/c/sdk/+/345827, causing all runs
of `dart analyze` to output the communication with the analysis server
to standard output.

Change-Id: I6610ccc9d4b091d85809f8557daf6b96497d1c9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347067
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-01-18 22:13:39 +00:00
pq 7b7dfa6bb5 add analysisOptions to FileResults
See: https://github.com/dart-lang/sdk/issues/54667

Change-Id: I5d756e9f8ba2282c7c022a8dc6c11fe4da254a3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-01-18 22:05:18 +00:00
Alexander Markov 71ffaf392f [vm] Fix cross-build Windows -> android
TEST=ci
Fixes https://github.com/flutter/flutter/issues/141786

Change-Id: I9c6620b8ee25e36631da2b1213002e8bf30b6473
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347065
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-01-18 21:22:59 +00:00
Brian Wilkerson af07a3f798 Suggest static members in the first pass of code completion
Change-Id: I308449dd69a623cdb437fadfa9715564d596699d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347064
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-01-18 21:02:50 +00:00
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