Commit graph

85731 commits

Author SHA1 Message Date
なつき
6b04565db2 Enable Large File Support extension (LFS)
This PR adds flags to enable LFS to make 32-bit builds to correctly handle 64-bit inode from the ext4/xfs file systems.

Specifically, many APIs internally uses `readdir()` for listing directory, which may crash with an `EOVERFLOW`, `Value too large for defined data type`.

See https://bugs.gentoo.org/681790#c0 for some background about this issue.

Closes https://github.com/dart-lang/sdk/pull/49179

GitOrigin-RevId: 34ff2282635ffd50cb8e5dffe57601bb0b2b18f7
Change-Id: Idd10d215f0791242fff986c18decc443609f471e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247245
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2022-06-08 19:55:22 +00:00
Devon Carew
ca205612d6 [deps] remove the dep on package:charcode
Change-Id: I0880f16db5bf62e6e7c91352c2f8e57f66ad7022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247500
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-06-08 19:49:22 +00:00
Ryan Macnak
6a1749edbc [vm, ffi] Misc fixes for RV32 FFI.
TEST=local
Change-Id: I50f0a848cfd973389a7e903aa89e650aa7420aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247503
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-06-08 19:41:52 +00:00
Nate Biggs
743573cb26 [dart2js] Add some more setup logic for unordered indices and deferred serialization.
- Pass options to all DataSourceReader and DataSinkWriter constructor calls.
- Add DataAndIndices to replace ClosedWorldAndIndices. Maintains the same indices as before for now.

Change-Id: I2e25d4a4c25ef12276fa808146ff8aae27da792c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247401
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-06-08 18:57:02 +00:00
Konstantin Shcheglov
d9f45805f1 Use exportedReferences directly for PrefixScope.
Change-Id: If02245fdce3f28302e6691344531b0fc09dc7628
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-06-08 18:54:18 +00:00
Alexander Aprelev
1fddb10107 [vm/heap/metrics] Make sure heap-related metric are reported for the isolate group, rather than isolate.
TEST=ci

Change-Id: Ie0514f05c0a024ce37f10d56dd29b3fa921133d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247504
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-06-08 18:01:02 +00:00
Konstantin Shcheglov
6e27d2458f Change LibraryElementImpl.session to AnalysisSessionImpl, export LinkedElementFactory.
Change-Id: I920659db7cbfd1e337e8fbb4c35b334aed8b404f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-08 17:31:52 +00:00
Ryan Macnak
78d613b37c [vm, gc] Don't cache a thread in marking visitors.
Marking visitors can run on multiple threads during their lifecycle, so this only creates confusion.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/48957
Change-Id: Ia2ac68f0e17c985b18a1faf51be7004c972cf27b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247520
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-06-08 17:11:54 +00:00
Michael Thomsen
da050a2b16 Reland "Remove SCREAMING dart:io networking APIs"
This is a reland of commit abfdc3d50f

Original change's description:
> Remove SCREAMING dart:io networking APIs
>
> Bug: https://github.com/dart-lang/sdk/issues/49140
> Change-Id: I50c6cca26597ee4d469b776fcec412ddfed760e1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246962
> Reviewed-by: Paul Berry <paulberry@google.com>
> Commit-Queue: Michael Thomsen <mit@google.com>

Bug: https://github.com/dart-lang/sdk/issues/49140
Change-Id: I64a4bdb69909dd864e84efae7dc423fc435e40ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247543
Reviewed-by: Oleh Prypin <oprypin@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-06-08 16:57:32 +00:00
Janice Collins
e63e4937e9 Add a fix for HintCode.UNUSED_ELEMENT_PARAMETER.
This repurposes an existing lint CorrectionProducer to handle both
the lint and the hint.

Bug: https://github.com/dart-lang/sdk/issues/49074
Change-Id: Iacd597ca2151cdb80be9ddae0847128b4cc700a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246989
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2022-06-08 16:57:02 +00:00
Alexander Aprelev
f681734aef [vm/send_and_exit] Allow for safepoints when validating exit message.
``` before
$ dart isolate_exit_pause_time_test.dart
.Min(RunTimeRaw): 0.001 ms.
.Avg(RunTimeRaw): 212.399592 ms.
.Percentile50(RunTimeRaw): 49.055 ms.
.Percentile90(RunTimeRaw): 809.049 ms.
.Percentile95(RunTimeRaw): 1009.049 ms.
.Percentile99(RunTimeRaw): 1169.049 ms.
.Max(RunTimeRaw): 1208.049 ms.
```

``` after
$ dart isolate_exit_pause_time_test.dart
.Min(RunTimeRaw): 0.001 ms.
.Avg(RunTimeRaw): 53.87510125 ms.
.Percentile50(RunTimeRaw): 8.05 ms.
.Percentile90(RunTimeRaw): 174.005 ms.
.Percentile95(RunTimeRaw): 217.975 ms.
.Percentile99(RunTimeRaw): 275.033 ms.
.Max(RunTimeRaw): 314.033 ms.
```

Remaining latency after the change is due to large root set formed by pointers_to_verify_at_exit_ that have to be visited during GC.

Fixes https://github.com/dart-lang/sdk/issues/49050
TEST=ci

Change-Id: I1ed7af017f80890900b137a1514e5ffdeb63f53f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246482
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-06-08 16:27:22 +00:00
Danny Tuppeny
88c2f888ea [analysis_server] Support dart.updateImportsOnRename setting for updating directives on renames
This setting is already supported in VS Code but accidentally stopped working in the switch to LSP. This change prevents/removes the registration for willRenameFiles so that a client won't call the server when files are renamed if this setting is `false`.

Change-Id: Ia7b22b9fc2f119d0e7f98f4e2c5f0bac994a28af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247544
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-06-08 16:06:52 +00:00
Alexander Thomas
595ec38f27 [scorecards] Remove outdated version comments
Dependabot doesn't update those, so it's better to remove them than keep
the stale comment. Use `git blame` to see the version number in the
upgrade CL instead.

Change-Id: I1b071db4c62154784bcdc7b4ab41f7ef95363c1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247547
Reviewed-by: William Hesse <whesse@google.com>
2022-06-08 15:29:00 +00:00
dependabot[bot]
f0bee54f4f Bump actions/checkout from 3.0.0 to 3.0.2
Closes https://github.com/dart-lang/sdk/pull/49173

GitOrigin-RevId: 393b22722ff9137c5f9b491eedc7eee682146cbf
Change-Id: I4d082235d98cb86e34d0989b83f506b2cf35c905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247187
Reviewed-by: Alexander Thomas <athom@google.com>
2022-06-08 15:22:51 +00:00
dependabot[bot]
3d4dd1a95c Bump ossf/scorecard-action from 1.0.4 to 1.1.1
Closes https://github.com/dart-lang/sdk/pull/49172

GitOrigin-RevId: c58d448c52fe088715cca5e93d5ad3aab8513db5
Change-Id: I25babf0798e059f028e539ec8bb7bdaef37429bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247186
Reviewed-by: Alexander Thomas <athom@google.com>
2022-06-08 15:22:43 +00:00
dependabot[bot]
d64322e055 Bump github/codeql-action from 1.0.26 to 2.1.12
Closes https://github.com/dart-lang/sdk/pull/49171

GitOrigin-RevId: 8d1b2ba0ef3f7f4b2abeed770c24761b62717ed6
Change-Id: I2e92e574d2c4559e401d27242ded7eac0d464285
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247184
Reviewed-by: Alexander Thomas <athom@google.com>
2022-06-08 15:22:10 +00:00
dependabot[bot]
113fbd237e Bump actions/upload-artifact from 3.0.0 to 3.1.0
Closes https://github.com/dart-lang/sdk/pull/49170

GitOrigin-RevId: e3cc5698bedcb03a1d0b73aaee5c545d8b5e223b
Change-Id: Ida7b2fec955fa3bd430239842804041178afd9ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247182
Reviewed-by: Alexander Thomas <athom@google.com>
2022-06-08 15:21:55 +00:00
DEPS Autoroller
a2ba34a63c Roll Dart Documentation Generator from f5bcc4bd46f4 to b61647bc3833 (3 revisions)
https://dart.googlesource.com/dartdoc/+log/f5bcc4bd46f4..b61647bc3833

2022-06-08 102626803+drewroengoogle@users.noreply.github.com Pin github actions to a hash (#3056)
2022-06-06 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 1.1.0 to 1.1.1 (#3059)
2022-06-06 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.1.11 to 2.1.12 (#3057)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: Ia70e7e622ec520a5f8f19d3bfc51608c8d6f5c70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247469
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-06-08 15:10:42 +00:00
Joshua Litt
6bf0e5cd7e [dart2wasm] Make _Function implement Function.
This ensures the TFA doesn't tree shake Function members.

Change-Id: I23374d1bb9aec118906e2b8211d987046a3bbafb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247502
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2022-06-08 15:03:52 +00:00
DEPS Autoroller
258846f95c Roll Dart Protobuf Support from b149f801cf7a to 408f69b98b2d (9 revisions)
https://dart.googlesource.com/protobuf/+log/b149f801cf7a..408f69b98b2d

2022-06-08 omersa@google.com Update documentation according to Effective Dart documentation guide (#664)
2022-06-02 omersa@google.com Move closures in proto3 deserializer to top-level (#668)
2022-06-02 omersa@google.com Refactor protobuf bench runners, update README: (#665)
2022-06-02 omersa@google.com Benchmarks: add proto3 ser/deser benchs, move common code to common.dart (#667)
2022-06-02 omersa@google.com Remove makeLongInt helper (#666)
2022-05-31 lorenvs@outlook.com Use `-O4` when compiling benchmarks. (#552)
2022-05-25 omersa@google.com Remove invalid check in `_FieldSet.writeFieldValue` (#660)
2022-05-20 devoncarew@gmail.com Refactor file locations, update READMEs (#657)
2022-05-19 omersa@google.com Remove trailing whitespace in protoc_plugin/README

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-protobuf-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Protobuf Support: https://github.com/dart-lang/protobuf/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I0f1aa66ee6fe167f37443957234f4d0140828416
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247467
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-06-08 15:01:53 +00:00
Danny Tuppeny
8b40a7bb2a [analysis_server] Make Sort Members + Organize Imports fail silently if invoked automatically
Previously, Organise Imports always failed silently (since it was often run on-save). Sort Members had not been given the same treatment (but often now runs on-save).

This uses a new LSP 3.17 field to know when the command was run automatically, so both are now consistent, showing errors if invoked manually and failing silently if run automatically.

Change-Id: I48e8380fcee4e54d0f4dc3c177c9ae2362627efb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247542
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-08 14:11:42 +00:00
Danny Tuppeny
1861eac395 [analysis_server] Fix an edit conflict renaming folders containing files that reference siblings
Renaming a folder with files that referenced each other would fail with edit conflicts. The pass over the first file would update the reference to the other (going from "a.dart" to "../old/a.dart" as if the other file wasn't moving too) and then then when processing the second file, it would try to update the import back.

It doesn't seem to ever make sense to update relative paths when the "other" file is also in the folder being renamed, so this skips them.

Change-Id: I14c09977aa66017eecac5922d0e3caacf59350fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-06-08 14:07:25 +00:00
Chloe Stefantsova
0d53291c30 [cfe] Don't report duplicate names error during top level inference
This CL also adds a run-time check for assigning a .helper during
top-level inference.

Closes https://github.com/dart-lang/sdk/issues/49153

Change-Id: I1647fa9df6e5eeb8fe02a62e29fc33074b42ca09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247084
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-06-08 13:58:52 +00:00
Chloe Stefantsova
24883aa841 [cfe] Check type arguments of literals in constant evaluator
Closes https://github.com/dart-lang/sdk/issues/49206

Change-Id: I3e6167c3db5d3b9d49e73190952ffcca65ad6357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247540
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-06-08 12:21:03 +00:00
Oleh Prypin
159887ff78 Revert "Remove SCREAMING dart:io networking APIs"
This reverts commit abfdc3d50f.

Reason for revert: breaks on internal roll - b/235267735 and others can be fixed in advance of landing this

Original change's description:
> Remove SCREAMING dart:io networking APIs
>
> Bug: https://github.com/dart-lang/sdk/issues/49140
> Change-Id: I50c6cca26597ee4d469b776fcec412ddfed760e1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246962
> Reviewed-by: Paul Berry <paulberry@google.com>
> Commit-Queue: Michael Thomsen <mit@google.com>

TBR=mit@google.com,paulberry@google.com

Change-Id: I55a43cc1bd7435fe7824f7ca8098575232fdcf2f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/49140
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247389
Commit-Queue: Oleh Prypin <oprypin@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
2022-06-08 07:22:31 +00:00
Konstantin Shcheglov
cf628900b9 Record ExportedReference(s), with information how it is exported.
Bug: https://github.com/dart-lang/sdk/issues/23067
Change-Id: I5e2559bed9eafc5bcbf023ccc957f0c46079011c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-08 02:29:22 +00:00
Stephen Adams
de8f84f62d [dart2js] Migrate ir/element_map.dart
Change-Id: I5b00914f7963658446099ca31a5a38aec09437e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247465
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-06-07 22:00:31 +00:00
Ryan Macnak
88ca1e95b8 [vm, gc] Evaluate old-gen GC on each new-gen page.
This gives starting or finalizing concurrent marking a chance to run not-immediately-after-a-scavenge.

TEST=ci
Change-Id: Iec1ba7b7440045cc18e01637af1f865d588b24c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246163
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-06-07 21:56:41 +00:00
Jaime Wren
128a7e1641 Modify dartdev language-server to call the server snapshot
This change also modifies the Dart Analysis Server to default to use the LSP protocol

Change-Id: I73a1ceae9a05bc8e5af219e4f28df959c054d4c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247461
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-07 21:31:02 +00:00
Alexandre Ardhuin
473dbf17b6 add UNDEFINED_EXTENSION_GETTER to bulk fix
Following up on #49164 this PR allows rename in extensions via `dart fix`

Closes https://github.com/dart-lang/sdk/pull/49200

GitOrigin-RevId: a5af8d05f4d9bf849e8115cc780b17bce18d0d50
Change-Id: I845848901768ff48746a0438b009f631c5d03a7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247460
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-07 20:27:41 +00:00
pq
a362115c60 bump to linter 1.25.0
Change-Id: Ie709139029d1f58cef4807708ff054acb0fba6cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247363
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-07 17:59:29 +00:00
Alexander Markov
3e10d8c833 Revert "[vm] Enable new implementation of async/async* in JIT mode"
This reverts commit b3544c44dc.

Reason for revert: avoid incompatibility between Dart->kernel compiler
and Dart VM during Dart and Flutter rolls (b/234850964).

TEST=ci

Original change's description:
> [vm] Enable new implementation of async/async* in JIT mode
>
> TEST=ci
>
> Issue: https://github.com/dart-lang/sdk/issues/48378
> Change-Id: I0fc069508cb1ce5648deb6604171dfdcd5bcb5c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246082
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

TBR=vegorov@google.com,kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,johnniwinther@google.com

Change-Id: I6157623857dbfa9bb07eb1f620d100f5b24314d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: https://github.com/dart-lang/sdk/issues/48378
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247243
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-06-07 17:57:30 +00:00
William Hesse
eb12216408 Move benchmark IsolateSendExitLatency to correct directory
A benchmark should be in a directory with the same name as
the benchmark main file.

Bug: https://github.com/dart-lang/sdk/issues/49050
Change-Id: I31c0a9f276d313ab43d61be8ac3833b77ae8ee47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247387
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Auto-Submit: William Hesse <whesse@google.com>
2022-06-07 16:50:40 +00:00
Nate Biggs
43d68f91c6 [dart2js] Migrate load_kernel.dart to nnbd
Change-Id: If3e8925d5e6888f6c888ca6c81772a3e83f94bad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247285
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-06-07 16:37:16 +00:00
Paul Berry
62e8e9dd8d Migration: fix conversion of @required to required in redirecting factory constructors.
The migration tool has logic to suppress some of its heuristics for
suggesting `required` in redirecting factory constructors, to account
for the fact that a redirecting factory constructor is allowed to have
a non-required non-nullable argument with no default.  But that logic
was overzealous and was preventing `@required` from being turned into
`required` (which is clearly still a good idea).  This pattern crops
up frequently in classes using BuiltValue.

Bug: https://b.corp.google.com/issues/234631651
Change-Id: Ic0428a878184bb837d3f5b79cb6585ec4fa30344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247361
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-06-07 16:12:59 +00:00
Michael Thomsen
abfdc3d50f Remove SCREAMING dart:io networking APIs
Bug: https://github.com/dart-lang/sdk/issues/49140
Change-Id: I50c6cca26597ee4d469b776fcec412ddfed760e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246962
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-06-07 16:00:17 +00:00
Danny Tuppeny
03d51e1f89 [analysis_server] Switch to using Maps for LSP command arguments
This makes it easier to extend commands in future (for example adding additional args to indicate if the command execution was automatic on-save or manually invoked, to adjust error handling).

Change-Id: I274f28109ebc0d93ed555525b4c8d1ee689b2af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247385
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-07 15:52:15 +00:00
Konstantin Shcheglov
786589616f Use unloadAll(), not unloadLinked().
My previous CL had a mistake - we need to unload all libraries
because we might have resynthesized some of them only to link the
requested library, but we might not need these libraries anymore.

Also includes one more test that demonstrates that we can later access
some data of a linked library without resynthesizing an imported
library (that was used for during linking).

Change-Id: I60fd880a901dacefd386d8eb8304817c14c7faf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247334
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-07 15:38:24 +00:00
Ben Konyi
ff08af36ce [ package:dds ] Migrate devtools_observatory_connection_test to null safety
Fixes https://github.com/dart-lang/sdk/issues/49177

Change-Id: I7221386b64ade709114e793b2665beca0a4c8115
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247440
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-06-07 14:49:09 +00:00
Brian Wilkerson
9e8132da51 Prepare to gather analytics about the number of analysis roots and priority files and the kinds of refactorings
Let me know if there are other values you can think of related to
requests that ought to be captured, especially in LSP.

Change-Id: Id9e92f54dd9ade3541d3ca8dc11450fb6affee0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247328
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
2022-06-07 13:37:18 +00:00
Daco Harkes
81584f5d03 [samples/ffi] Update sqlite sample
The sample wasn't working for the longest time.

Fixes:

- Null safety, and late fields.
- `dart pub` instead of `pub`.
- Use the new `NativeFinalizer` and `Finalizable` features.

Change-Id: I0a397abae511ab3f6762d1b2c4047226d15e36d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143804
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2022-06-07 12:11:39 +00:00
Aske Simon Christensen
79abd5ea56 [dart2wasm] Emit unreachable as default case when switch is exhaustive
The front-end variable initialization analysis considers a variable
definitely initialized if it's initialized in all `case` branches of an
"explicitly exhaustive" `switch` statement, i.e. a `switch` statement switching on an enum value where the `case` branches cover all variants
of the enum.

In order for the emitted Wasm code to validate according to the
flow-sensitive non-nullable locals validation scheme being discussed in
https://github.com/WebAssembly/function-references/issues/44 this
definite initialization must be reflected in the static control flow of
the Wasm code. Thus, such a switch statement must not have static
control flow exiting the switch statement through the (dynamically
unreachable) default case.

Change-Id: I53628d2c6e9690214ffb4c60498c4f2b895f33e7
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245985
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-06-07 10:45:39 +00:00
Aske Simon Christensen
608b95c9b4 [kernel] Add exhaustiveness information to switch statements
Tested: Added flag to text output and updated expectation files
Change-Id: I44bb82242ad608b19894e22c41d8404c5003c2d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245982
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-06-07 10:45:39 +00:00
Ömer Sinan Ağacan
1456af7b97 [dart2wasm] Implement backward jumps in switch statements
Change-Id: I1c39722edb72d7fb5128bb9fe7e4d03ce4041849
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246443
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2022-06-07 08:30:29 +00:00
Stephen Adams
6384eceedc [dart2js] Late instance field optimizations
Late fields start out holding a sentinel value and after they are initialized or assigned, never hold a sentinel value again.
This CL implements some removal of checks and loads based on this monotonic behaviour.

On two large Dart Angular apps, this reduces the number of late-instance-field checks by ~25%.
One app is 0.44% smaller, the other is 0.98% smaller.

The optimization_test.dart no longer forces `--disable-inlining` because that prevents the inlining that exposes the optimization opportunities.
Most tests already use `@pragma('dart2js:noInline')` to prevent inlining where relevant.

Change-Id: I2327a96e69191313ed6c07eabe94aa2962fb2648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246881
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-06-07 05:57:59 +00:00
Konstantin Shcheglov
a89370324e Issue 49188. Fixes for enhanced enum and switch.
Bug: https://github.com/dart-lang/sdk/issues/49188
Change-Id: Ie23327fe813de45b2ad63d25f038d070de243d53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247421
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-07 01:10:49 +00:00
Mark Zhou
d76e36fbcb [dart2js] Adding kernel dump info regression tests
Ensures that kernel dump info doesn't break the original dump info's behavior.

Change-Id: I9bfe22cea0d1a5597db9c98fe736f20369b80c82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247122
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-06-06 22:35:29 +00:00
Konstantin Shcheglov
98a193f07e Fix linkLibraries() for Cider, release data.
1. We cannot just discard the LibraryContext instance, if there are
   linked bundles loaded, we need to release them, otherwise the
   byte store will keep it forever.

2. But we don't want to release them if there is a chance that there
   are no other isolates that reference it. So, we release after reload.

Change-Id: I92e01b57e83466d4679718e23eebcbfdc70d5602
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247330
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-06 22:21:39 +00:00
DEPS Autoroller
3fd6912bc2 Roll Dart Documentation Generator from 8549817bb1b5 to f5bcc4bd46f4 (5 revisions)
https://dart.googlesource.com/dartdoc/+log/8549817bb1b5..f5bcc4bd46f4

2022-06-06 49699333+dependabot[bot]@users.noreply.github.com Bump actions/cache from 3.0.2 to 3.0.3 (#3058)
2022-06-02 106621169+klr981@users.noreply.github.com Issue #3052: up/down arrox bug fix (#3054)
2022-06-01 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 1.0.4 to 1.1.0 (#3053)
2022-05-25 kevmoo@users.noreply.github.com Require Dart 2.17, enable and fix latest lints (#3051)
2022-05-25 6655696+guidezpl@users.noreply.github.com Update styles.css (#3046)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I6c49e95569b83b08c53158079febaeb8a9ab2f64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247301
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-06-06 21:03:49 +00:00
Konstantin Shcheglov
c9e956a7b3 Use existing 'exportedLibrary', a few renames.
Change-Id: I35bf712bb400ac7935724ce137e446e30688d204
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247324
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-06 20:58:21 +00:00