Commit graph

88693 commits

Author SHA1 Message Date
Jens Johansen 56c416430e [analyzer] LSP 'get implementations': get lineInfo directly
Asking for implementations of 'ToJsonable' from
package:analysis_server/lsp_protocol/protocol_special.dart takes
8+ seconds both on first request and on subsequent requests.

Turns out most of that is spent on getting line info data for each
result via `server.getLineInfo`.

This CL rewrites how the search is performed, getting all subtypes
directly via `searchAllSubtypes`, from which one can cheaply get the
line info.

On my machine, the call that always took 8+ seconds before now takes
<2 seconds (at least on subsequent runs).
Notice that the time also depends on how much is open by the editor and
that calls from my editor with many folders open still takes ~6 seconds.

This CL furthermore adds more performance measurements that's available
via the "Analysis Server Diagnostics" page "Timing" for
"textDocument/implementation" requests.

Change-Id: I2e5ef20238901fb4734cc182aeb53adfc96f79b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272360
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-11-29 08:19:42 +00:00
Konstantin Shcheglov 2b5608d690 Fix parsing switch statement with SwitchPatternCaseImpl when the patterns feature is disabled.
Bug: https://github.com/dart-lang/sdk/issues/50553
Change-Id: Icd87d422ebf899d4a0d56ab4b7e476ab60949ad4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272387
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-11-29 03:02:30 +00:00
Konstantin Shcheglov 0b7124729d Use late final 'folderWithExamplesApi' for examples/api.
Change-Id: I5d02f0656e914a87dff33532c3835a373472104a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272352
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-29 02:56:33 +00:00
Konstantin Shcheglov f85734d220 Remove AstTextPrinter and its tests.
I don't remeber anymore *why* I implemented it.
And it causes a failure in https://dart-review.googlesource.com/c/sdk/+/272387
because we started dropping some tokens, so we cannot restore the
same source code.

Change-Id: I886122e488715ba35347662268b207a99945cd90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-29 01:29:57 +00:00
Brian Wilkerson 6e4b689bba Add documentation for the newest diagnostics
Change-Id: If32e96b6bb2591f2f1ba72265e7437a37a66ac5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272386
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-11-28 23:51:38 +00:00
Srujan Gaddam ed0ac1936a Reland "[pkg:js] Disallow using @staticInterop synthetic constructors"
This reverts commit aa252e907e.

Reason for revert: Flutter engine is migrated to not use synthetic constructors.

Original change's description:
> Revert "[pkg:js] Disallow using @staticInterop synthetic constructors"
>
> This reverts commit aab6ab8b84.
>
> Reason for revert: Broke Flutter roll https://github.com/flutter/engine/pull/37838
>
> Original change's description:
> > [pkg:js] Disallow using @staticInterop synthetic constructors
> >
> > Change-Id: I5c74369ee8ae97fcc21032464fcb8fea987022d9
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268107
> > Reviewed-by: Joshua Litt <joshualitt@google.com>
> > Reviewed-by: Riley Porter <rileyporter@google.com>
> > Reviewed-by: Sigmund Cherem <sigmund@google.com>
>
> TBR=sigmund@google.com,joshualitt@google.com,rileyporter@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com,srujzs@google.com
>
> Change-Id: I6caf4b776191e8eed9877c43f900ae6300f1f5c2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271440
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Srujan Gaddam <srujzs@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: Iaa538bb5f309a46c320bf1781c3d1a7148ec7be7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271500
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-11-28 23:41:02 +00:00
Konstantin Shcheglov e80b9bde80 Report REFERENCED_BEFORE_DECLARATION for if statement/element, pattern variable declarations.
Change-Id: I844f186d504abf69b7524017ac9be27fdcef5ff6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272385
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-28 23:36:38 +00:00
Nate Biggs ad14e5d67c [dart2js] Add universe/member_hierarchy.dart
This will be used from DynamicCallSiteTypeInformation nodes to get a list of receivers for dynamic calls. The InferrerEngine will also use it to calculate overrides of a given function and mark them as called.

Change-Id: I5738e393ae2de4cb93fd55c60e944a2db067b448
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266422
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-11-28 23:26:08 +00:00
Ben Konyi af1536d463 [ dart:developer ] Deprecate Metrics related functionality
See https://github.com/dart-lang/sdk/issues/50231

Change-Id: I8f5196f90dd7a03c08d413d381bf093cc1f309eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272381
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-11-28 23:03:18 +00:00
Devon Carew 576df7f82c Bump pub_semver to 17231113f98c80285881cc4452863bcfd085d1a8
Changes:
```
> git log --format="%C(auto) %h %s" 28159b8..1723111
 https://dart.googlesource.com/pub_semver.git/+/1723111 rev to 2.1.3 in preparation for release (#75)
 https://dart.googlesource.com/pub_semver.git/+/5ac4c28 update and fix lints, bump min SDK (#74)

```

Diff: https://dart.googlesource.com/pub_semver.git/+/28159b8c5b96fc2709d0904389d7932880f68659~..17231113f98c80285881cc4452863bcfd085d1a8/
Change-Id: I52e3503fff0529917e3ce9e9c79bd27b00402940
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272388
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-11-28 22:42:18 +00:00
Devon Carew af23ffc8cc [deps] revert the recent package:fixnum roll
Change-Id: I95c46b3e47963348daf0f4ac97cd2b2f5c6ad59e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272348
Commit-Queue: Oleh Prypin <oprypin@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
2022-11-28 21:59:30 +00:00
Paul Berry 2a9491b613 Rename looksLikePatternVariableDeclaration.
The new name, `looksLikeOuterPatternEquals`, is a more precise
description of what it does.

This helps prepare for adding parser support for pattern assignments,
which require the same functionality.

Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: Ibfcc4c37faac1770c98a427facdffda5c40e6d08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272344
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-11-28 21:33:41 +00:00
Paul Berry e69a503610 Patterns parsing: Add logEvent call to Listener.handlePatternVariableDeclarationStatement.
Normally, listener methods call `LogEvent`.  This helps find bugs
where a listener that extends `Listener` doesn't implement a necessary
callback.

Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: Ideac739d8d63cda2244572f7d1deb83dceeced37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272346
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-11-28 21:27:39 +00:00
Alexander Thomas 1d9f3ba509 [infra] Update checked-in SDKs to 2.19.0-374.0.dev
Change-Id: Icef5a3ba6968312c6a49dc5bedb44dbeb901ee99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272347
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2022-11-28 21:25:39 +00:00
Nate Biggs 456ca8a264 [dart2js] Delete hashCode implementation on TypeInformation.
This hashCode is rarely used today so there shouldn't be any significant change from this. But in terms of code health it's better to remove this now.

Change-Id: Iff3ea93a4d82c3977ca7903888def7cbcb2f138f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272401
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-11-28 20:51:38 +00:00
Stephen Adams 72f429d63b [dart2js] Prepare to migrate ssa/optimize.dart
Change-Id: I1cb0fc08fa4682c0ec13fb8e101ebaaa34bc76bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271860
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-11-28 20:45:00 +00:00
Nate Biggs 3121b8e3ed [dart2js] Fix goldens for dump info tests (bots failing).
Change-Id: I2c4a56f7e9f7073705b56ebe7a7b819458a1f794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272400
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-11-28 20:19:37 +00:00
Sam Rawlins 4d5426b35a analysis_server: Refactor disk reads for examples directory
Fixes https://github.com/dart-lang/sdk/issues/50542

One primary principle is keeping the cost for _most code_
extremely low. Most code does not have an `examples/api`
directory. Most comments do not have `{@tool`.

Looking for directories on disk is expensive. Walking tokens
in comment text is cheap. So we can pay the price of walking all comments, prowling for `{@tool` text which we won't likely find,
and skip the work of looking for `examples/api` in _all_ parent
directories, until we find a comment with `{@tool`.

Don't check if `$parent/examples` exists before checking if `$parent/examples/api` exists. We don't care if `$parent/examples`
exists.

Don't create an `AanlyzerConverter` instance for _every element_
in a compilation unit while we are editing it. Instead, refactor
some of the `AnalyzerConverter` methods to be extension methods.

Change-Id: I812a1a435ee075e921782c1a57e9ed77325f9387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271863
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-28 19:53:01 +00:00
Devon Carew 32ae44215f [deps] rev ffi, fixnum, http, markdown, protobuf, sse, test
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ffi (3ede231..17a8142):
  17a8142  2022-11-21  Daco Harkes  Add links to API reference and examples to README (#167)

fixnum (bca3816..62916f2):
  62916f2  2022-11-24  Lasse R.H. Nielsen  Split into separate libraries instead of using parts. (#97)
  14d4827  2022-11-23  Lasse R.H. Nielsen  Add `tryParse` methods. (#96)

http (d56141d..047d6ed):
  047d6ed  2022-11-22  Brian Quinlan  Fixes a bug where requests made in different Clients would fail (#827)
  9dbbafb  2022-11-17  Brian Quinlan  Add tests for compressed responses (#823)

markdown (37951d1..ee3f4e9):
  ee3f4e9  2022-11-24  Zhiguang Chen  Fix a blockquote issue (#496)
  c9048c0  2022-11-16  Zhiguang Chen  Optimise DelimiterSyntax (#492)

protobuf (ae90e53..c181573):
  c181573  2022-11-23  Kevin Moore  [api_benchmark] migrate to null-safety (#776)
  648deaf  2022-11-23  Kevin Moore  Standardize and fix lints (#775)
  bfa4c0d  2022-11-23  Kevin Moore  Fix `///` at the top of generated Dart files (#774)
  ed68426  2022-11-17  Devon Carew  Remove duplicate consts (#773)

sse (283568d..8d018dd):
  8d018dd  2022-11-23  Elliott Brooks (she/her)  Format markdown files (#68)
  2f6f151  2022-11-23  Elliott Brooks (she/her)  Add optional `debugKey` parameter to SSE client (#67)
  eaee6a8  2022-11-23  Elliott Brooks (she/her)  Use Fetch API in SSE Client (#66)

test (7756833..b25dac9):
  b25dac99  2022-11-21  Kevin Moore  checks: finish async tests (#1793)
  3166163e  2022-11-18  Devon Carew  Update scorecards-analysis.yml (#1792)
  d930d5b0  2022-11-18  Nate Bosch  Add support for async soft checks (#1789)
  b1411a21  2022-11-18  Devon Carew  blast_repo fixes (#1788)
  a6aa04e0  2022-11-18  Jacob MacDonald  disable wasm tests for now as they are failing (#1791)
  8b5174c1  2022-11-17  Kevin Moore  Starting on async tests (#1787)

Change-Id: Ic361fce7753d08d43fc827f13cb1bfa1738cc16e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272343
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-11-28 19:47:48 +00:00
Kallen Tu f12fa86c45 [cfe] Make named mixin applications non-constructable and abstract if sealed.
Special syntax for mixin applications should be also abstract if we add the sealed modifier.

Change-Id: I3af3e997734f4bc762dc29bfc3f61f2e691ca41b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-11-28 19:44:58 +00:00
Dmitry Zhifarsky 2b7b4dc777 [analysis_server] Fix CodeAction LSP dynamic registration config
Bug: https://github.com/dart-lang/sdk/issues/50531
Change-Id: I35a3c05a70a4ffe9ae0bbfb13874eddfaa302b25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272260
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-28 18:53:47 +00:00
Paul Berry a3befd399a Add support for ... inside map patterns
Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I350eb526e67e4cc42c94b4776e5d38315932ddc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272382
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-11-28 18:34:58 +00:00
Sam Rawlins eaff33f439 analyzer_utilities: tidy static analysis
* Stop using `implicit-casts: false`
* Don't list rules which are found in package:lints
* Fix strict-inference issues

Change-Id: Ibe350548e3d6bef486ef2ef82430cda23d684baf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-28 18:11:03 +00:00
Danny Tuppeny f2b4152159 [analysis_server] Include pubspec+analysis_options fixes in LSP Code Actions
Fixes https://github.com/dart-lang/sdk/issues/50306.

Change-Id: Ia9331887ee72c7ecff757557e3903ed1711ada39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-28 16:46:04 +00:00
Paul Berry f22c4580e4 Fix patterns parsing when EOF encountered during potential pattern variable declaration.
Fixes #50563.

Bug: https://github.com/dart-lang/sdk/issues/50563
Change-Id: Icc1e38c0775bd1fab7ed717f24932dea47dd2990
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272342
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-11-28 16:36:08 +00:00
Tess Strickland 4f925105cf [vm] Use a hash map for larger type argument instantiation caches.
Previously, the VM used a linear array to cache previous instantiations
of a type arguments object. Now once the cache hits a certain number
of occupied entries, the VM changes to using a hash-based approach.

The InstantiateTypeArguments stubs have not yet been updated to
traverse the hash-based cache, so once the cache has grown too large,
all attempts at instantiations, even those that are in the cache, go to
the runtime. Thus, until the stubs are updated, this is only an
improvement if the cost of traversing the linear cache dominates the
cost of making a runtime call. Our benchmarks see a ~40% performance
regression for hash-based caches of size 100 but a ~400% performance
improvement for hash-based caches of size 1000. Thus, we currently
split the difference and set the maximum size of linear caches to 500.

TEST=vm/cc/TypeArguments_Cache_ManyInstantiations

Bug: https://github.com/dart-lang/sdk/issues/48344
Change-Id: I7f1376943523bb5bcd8b175cfb1936779ea73d60
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simriscv64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-tsan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265325
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-11-28 15:00:20 +00:00
Tess Strickland 333d924504 [vm/compiler] Make InstantiateTypeArgs stubs architecture independent.
TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/48344
Change-Id: I7c0cee827a09d981e6e65802304a361ace7ce501
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simriscv64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270102
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-11-28 15:00:20 +00:00
Sergey G. Grekhov b1949bfa1f [spec_parser] Change logical pattern rules to '||' and '&&'
Change-Id: I0f973090b6fab0be0f9c774636b3cc4248dc2c22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272362
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2022-11-28 14:23:34 +00:00
Jens Johansen 78fc03c7b0 [analyzer] SearchedFiles.add doesn't need File
Currently a File is created to make a lookup in a map with the key
being looked up being "file.path". I've seen examples where creating
this File - because of the call `FileSystemEntity._toUtf8Array(path)` in
`_File` (from the SDK) - adds 1+ seconds to a request.

Specifically, asking for implementations of 'ToJsonable' from
package:analysis_server/lsp_protocol/protocol_special.dart goes from
taking ~12.8 seconds to taking ~11.5 seconds (with enough workspace
folders open).

Change-Id: I838f7fb15f39f95b63697530336d930319961a40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271700
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-11-28 09:46:27 +00:00
Daco Harkes 827d166ea0 [vm/ffi] Stop reifying type argument in Pointer
All `Pointer`s will now have the `Never` type argument at runtime.

TEST=tests/ffi(_2)/*

Bug: https://github.com/dart-lang/sdk/issues/49935

Change-Id: I83c8bba9461c2cab22992ba2e3cf42b7b5f43c36
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-precomp-win-debug-x64c-try,vm-kernel-mac-debug-x64-try,dart-sdk-mac-arm64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272201
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-11-28 09:45:45 +00:00
Coaspe 091a292d82 Fix typo in wasm_types.dart
Closes https://github.com/dart-lang/sdk/pull/50555

GitOrigin-RevId: 5bdce7c315236c33be893c525f1fa063c71b95ea
Change-Id: I0267dc19610746323abab067b1957e9ca32ad61c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272340
Reviewed-by: Michael Thomsen <mit@google.com>
2022-11-28 09:29:36 +00:00
Konstantin Shcheglov ba097c6b7c Check SwitchPatternCase for DUPLICATE_DEFINITION.
Change-Id: I3e83bc935589ea790962009195bd88f0c8842fda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272121
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-27 03:43:19 +00:00
Konstantin Shcheglov cdf22210f2 Report DUPLICATE_DEFINITION for pattern variables.
Change-Id: I66e8049ac950c9c8fdce6214f9726af83813a881
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272120
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-11-25 17:08:27 +00:00
Johnni Winther 076c85682d [cfe] Update patterns expectations
Change-Id: I08de1fff9096b64d1e838c975a1659f4a960fc9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272181
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-11-25 14:55:36 +00:00
Sergey G. Grekhov 3f1b69c209 [co19] Roll co19 to c38e027467efb69c754b198fe0d4029c38cfe72b
2022-11-25 sgrekhov22@gmail.com dart-lang/co19#1555. Don't use colon for initializing default value (dart-lang/co19#1556)
2022-11-24 askesc@google.com Avoid Function.apply in utility code (dart-lang/co19#1545)
2022-11-21 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Constant pattern tests added (dart-lang/co19#1538)

Change-Id: I13c7a50524e8ca3eeb090b03038119420ef88f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272160
Reviewed-by: Alexander Thomas <athom@google.com>
2022-11-25 14:18:24 +00:00
Johnni Winther f85185aaa0 [cfe] Handle patterns in switch cases in BodyBuilder
Change-Id: Ib52a0cd077e1cd056cd5150b8b1fddf867aef3ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271706
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-11-25 12:33:40 +00:00
Sigurd Meldgaard 28be06f6d5 Bump pub to 6fdcd and webdev to 637b4
Bump pub to 6fdcdd4357645817e7d7027ee2157ed68ef69c53

Changes:
```
> git log --format="%C(auto) %h %s" 6ac42d7..6fdcdd4
 https://dart.googlesource.com/pub.git/+/6fdcdd43 Support `--native-assets` in kernel compilation commands (#3667)
 https://dart.googlesource.com/pub.git/+/7202dd5e Fix error message for missing transitive dependency (#3196)
 https://dart.googlesource.com/pub.git/+/ab3304e1 Ignore analysis_options.yaml everywhere (#3666)
 https://dart.googlesource.com/pub.git/+/54e0b1eb Only check for sdk updates during resolveExecutable (#3665)
 https://dart.googlesource.com/pub.git/+/327d9ee8 Fix global activate --git-ref (#3656)
 https://dart.googlesource.com/pub.git/+/1485d60c Add env var flag to
override stdout.hasTerminal for output animations (#3658)
 https://dart.googlesource.com/pub.git/+/13ca9de1 Fix escapeShellArgument (#3663)
 https://dart.googlesource.com/pub.git/+/75c671c7 Allow adding from multiple sources (#3571)
 https://dart.googlesource.com/pub.git/+/1acfd4f7 dart pub get --enforce-lockfile (#3637)
 https://dart.googlesource.com/pub.git/+/9810fc6f Suggest using 2.12 as lower-bound SDK constraint (#3660)
 https://dart.googlesource.com/pub.git/+/f481f27a Add a README.md to the pub cache after command ends (#3650)
 https://dart.googlesource.com/pub.git/+/d54d52d3 Have executableForCommand rerun pub get if sdk changed minor version (#3652)
 https://dart.googlesource.com/pub.git/+/ea986525 Delete move.yml (#3648)

```

Diff: https://dart.googlesource.com/pub.git/+/6ac42d7644dedfcc500147ab47886eecab4b1b38~..6fdcdd4357645817e7d7027ee2157ed68ef69c53/

Bump webdev to 637b406f325669507b5c1048c19a7c0083c1bd6e

Changes:
```
> git log --format="%C(auto) %h %s" 3ec168f..637b406
 https://dart.googlesource.com/webdev.git/+/637b406 Support `--native-assets` in `FrontendServerClient` (#1797)
 https://dart.googlesource.com/webdev.git/+/a19d563 Save debug information in `chrome.storage` after a Dart app loads  (#1791)
 https://dart.googlesource.com/webdev.git/+/9cc10d4 Connect to a `chrome.runtime` port to keep the service worker alive  (#1789)

```
Diff: https://dart.googlesource.com/webdev.git/+/3ec168f6815af9d5f11278111d147bc82c0755c3~..637b406f325669507b5c1048c19a7c0083c1bd6e/


Update CHANGELOG


Bump pub to 6fdcdd4357645817e7d7027ee2157ed68ef69c53

Changes:
```
> git log --format="%C(auto) %h %s" 6ac42d7..6fdcdd4
 https://dart.googlesource.com/pub.git/+/6fdcdd43 Support `--native-assets` in kernel compilation commands (#3667)
 https://dart.googlesource.com/pub.git/+/7202dd5e Fix error message for missing transitive dependency (#3196)
 https://dart.googlesource.com/pub.git/+/ab3304e1 Ignore analysis_options.yaml everywhere (#3666)
 https://dart.googlesource.com/pub.git/+/54e0b1eb Only check for sdk updates during resolveExecutable (#3665)
 https://dart.googlesource.com/pub.git/+/327d9ee8 Fix global activate --git-ref (#3656)
 https://dart.googlesource.com/pub.git/+/1485d60c Add env var flag to override stdout.hasTerminal for output animations (#3658)
 https://dart.googlesource.com/pub.git/+/13ca9de1 Fix escapeShellArgument (#3663)
 https://dart.googlesource.com/pub.git/+/75c671c7 Allow adding from multiple sources (#3571)
 https://dart.googlesource.com/pub.git/+/1acfd4f7 dart pub get --enforce-lockfile (#3637)
 https://dart.googlesource.com/pub.git/+/9810fc6f Suggest using 2.12 as lower-bound SDK constraint (#3660)
 https://dart.googlesource.com/pub.git/+/f481f27a Add a README.md to the pub cache after command ends (#3650)
 https://dart.googlesource.com/pub.git/+/d54d52d3 Have executableForCommand rerun pub get if sdk changed minor version (#3652)
 https://dart.googlesource.com/pub.git/+/ea986525 Delete move.yml (#3648)

```

Diff: https://dart.googlesource.com/pub.git/+/6ac42d7644dedfcc500147ab47886eecab4b1b38~..6fdcdd4357645817e7d7027ee2157ed68ef69c53/
Change-Id: I65b928479b44f08305853078b0f34a6b66602709
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271709
Auto-Submit: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2022-11-25 11:13:03 +00:00
Aske Simon Christensen ca131dbf6f [dart2wasm] Fix some errors in FutureOr normalization
This fixes two issues for the cases where `FutureOr` normalizes to
`Future`:

- Normalize to `Future` instead of `_Future`.
- Normalize `FutureOr<Never>?` to `Future<Never>?` instead of
  `Future<Never>`.

Change-Id: I3bcf96c71a7424cecd3872255660fa1513abdfc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271882
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-11-25 09:31:37 +00:00
Konstantin Shcheglov 7759f7fe03 Resolve PatternVariableDeclarationStatement
Change-Id: Ied7bcde49729608028eb5b62102f756b565a858f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-11-24 21:03:07 +00:00
Chloe Stefantsova 8b12c0c6fb [cfe] Desugar BinaryPattern
Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: I98dd7d63c560eb4c48350c32826e51df1491d9d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271708
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-11-24 17:45:05 +00:00
Johnni Winther c251133418 [cfe] Handle record constant equality
Closes #50514
Closes #50515

Change-Id: I942867b3a1fc331428108f63e2b97b8b008c1d55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271921
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-11-24 16:38:53 +00:00
Chloe Stefantsova 1a8b1370a0 [cfe] Don't emit throw of AbstractClassInstantiationError
Change-Id: I4e464bdf1decf8484cd042e973e916b5aa3b8d1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271960
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-11-24 16:35:51 +00:00
Lasse R.H. Nielsen b7b45eb421 Deprecate NullThrownError and CyclicInitializetionError.
Both exceptions are used only in pre-null-safe code.
They can safely be removed when all code has been
migrated to null safety, and non-null-safe code is
no longer supported.

Change-Id: I13624d0da369c2241b8f6d66da01ea91bc0b45f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271920
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-11-24 15:05:13 +00:00
Chloe Stefantsova 88a23c1c57 [cfe] Desugar RecordPattern
Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: Ibe09a7de3a664323afd18e27fc8902fb6c3f4842
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271361
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-11-24 14:56:56 +00:00
Aske Simon Christensen 6f4d84fd60 [dart2wasm] Clarify run instructions
Change-Id: I693a1adf3c028656864014f7c41bad481bb8b106
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271881
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-11-24 14:52:25 +00:00
Johnni Winther bf3e520203 [cfe] Add test for issue 50182
Change-Id: I6b596e46f929c95cf79bdd784a99e0fcc591852d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271707
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-11-24 14:19:58 +00:00
Daco Harkes da74af72c4 [vm] Fix GCC build
https://dart-review.googlesource.com/c/sdk/+/264520 caused the GCC
build to fail with ambiguous overload for ‘operator<<’ with nullptr.

TEST=luci.dart.try:vm-kernel-gcc-linux-try

Change-Id: Idf452b4de9bd956ae0d19d6355273982a7c59330
Cq-Include-Trybots: luci.dart.try:vm-kernel-gcc-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271900
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-11-24 13:02:49 +00:00
Chloe Stefantsova 563ef79195 [cfe] Desugar MapPattern
Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: Ic2b555a4384187b358e001ea29755ca14588decd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271366
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-11-24 13:00:09 +00:00
Ömer Sinan Ağacan 0da441713e [dart2wasm] Don't assign offsets to selectors for dynamic calls
With a06f10c we started to generate direct calls in dynamic invocations
so we no longer need dispatch table entries for members that are only
invoked in dynamic invocations.

Change-Id: I29efd7f1486126c91f4286c84878b16db9c36a05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271880
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-11-24 12:33:46 +00:00
Chloe Stefantsova 722109d61b [cfe] Remove the use of the fall through exception
Change-Id: I6a6dc5e6d676e3d2260c4192a0f3700d8ff403c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262203
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-11-24 11:14:56 +00:00