Commit graph

87848 commits

Author SHA1 Message Date
Konstantin Shcheglov
5fc57dfbb3 Add commas to AST Impl where all named parameters.
So, that it is easier to find ones that don't use named parameters
yet with `^  \w*Impl\([^{]` regular expression.

Change-Id: I1621093e4d41ca43f781d63781dc5883fef12ab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264729
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-18 22:34:41 +00:00
Konstantin Shcheglov
5a0f6c2aef Remove released languge features from experiments.
Change-Id: I3b3398f8c7a932e2b4e0ceace20d10ff0d520150
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264727
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-18 22:31:46 +00:00
Brian Wilkerson
3785d6f59a Convert RefactoringProducer to use coveringNode
Change-Id: Iab2296aeba88085b1ec97afd755e03d4bf8de002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-18 21:05:26 +00:00
Alexander Markov
d7852e4786 [vm] Account for named record fields which can be named like positional
It is allowed to have named fields $N in records unless they conflict
with corresponding positional fields. So when accessing $N fields
dynamically we should look for both positional field and named field.

TEST=language/records/simple/dynamic_field_access_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: Id31dcb82e753aeeaeed74d5d07aac556ae08a7b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264740
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-18 21:03:09 +00:00
Konstantin Shcheglov
e3f77e928f Add BlazeWorkspace.forBuild()
Change-Id: I2b896716c7dc7f53c400e6ea516ecf0439e347b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-18 20:34:17 +00:00
Ben Konyi
177b9a9278 [ Service ] Update @Code to include its corresponding function
Removes the need to make extra requests when building CPU profiles with
code nodes.

TEST=N/A

Change-Id: Iade2bcbbf36cce83046c7123628a215636786967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264780
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-18 19:52:41 +00:00
Brian Wilkerson
c42ab25787 Refactor TestCode to prepare to move it to analyzer
This is the first phase of preparing it to be moved. The plan is for the
extensions to remain in this library along with an export of the new
library in the analyzer package.

The second phase will be to rewrite it to not use string_scanner so that
we don't have to add a dependency to the analyzer package.

Change-Id: I0d4e9c47bdcb7b825a9d3bfc76331a4e575ac664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263443
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-10-18 18:31:53 +00:00
Konstantin Shcheglov
138c956bcd Parse CaseClause for IfElement.
Change-Id: Id0ea8da51b3492768d734884fee43d913f9c69ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-18 18:30:39 +00:00
Brian Wilkerson
1ded24ae31 Allow LintCode to override the default documentation URL
We need this in order to override the default as we start to migrate the
linter docs to the new format. We also need this for internal lints.

Change-Id: I9da7be2e6c657b390ae355cdfcd1e007c70769fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264061
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-18 17:57:41 +00:00
Srujan Gaddam
521cbcdd47 [pkg:js] Disallow external extension members with type parameters
Bug: https://github.com/dart-lang/sdk/issues/49350

Checks to see that external extension members on `@staticInterop` types
do not declare or use a type parameter.

Change-Id: Id8646b599094b748c5490810b64d872065676014
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254103
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-10-18 17:47:29 +00:00
Srujan Gaddam
b6526beeab [pkg:js] Disallow staticInterop generative constructors
Fixes https://github.com/dart-lang/sdk/issues/48730

Change-Id: I4c7f687ec8d2724de0e031aa5ebe887f93843761
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254101
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-10-18 17:47:29 +00:00
Joshua Litt
ea541423d0 [dart2wasm] Perform some missing runtime type normalizations.
This CL also changes the runtime algorithm to fully substitute
interface type parameters before performing type checks. This change is unfortunate, but necessary so that normalization of types works as expected. In the longer term we should cache generated types to avoid redundant work.

Change-Id: I9441ccdea8c6a9ac598cae043937cf683616d227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262821
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-10-18 17:36:41 +00:00
DEPS Autoroller
7972d580f3 Roll Dart Protobuf Support from 1d175bef6043 to ba29983968de (5 revisions)
https://dart.googlesource.com/protobuf/+log/1d175bef6043..ba29983968de

2022-10-18 omersa@google.com protoc_plugin: Reword some of the documentation (#766)
2022-10-18 omersa@google.com protoc_plugin: Improve "is map field" check (#765)
2022-10-18 omeragacan@gmail.com Update CHANGELOG: mention #751
2022-10-18 omeragacan@gmail.com Add CHANGELOG entry for #760, #763
2022-10-18 omersa@google.com Fix `null` handling in proto3 JSON deserializer (#763)

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: I5502c8ee170701888956534cbd92473a24435fea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264664
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-10-18 17:15:30 +00:00
Danny Tuppeny
ffe4a8c864 [analysis_server] Prevent convert method<->getter refactors on SDK/external package files
Fixes https://github.com/Dart-Code/Dart-Code/issues/4221.

Change-Id: I1a017f098d3d72bc19c91cead4c68b2666c5fe01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-18 16:24:16 +00:00
Konstantin Shcheglov
8dc77f6fdc Remove READONLY support from BlazeWorkspace.
It was deprecated in 2019.
https://sites.google.com/a/google.com/git5fordummies/Home

Change-Id: I0b2d4fb0624bc70b7952de5496d280c84172beb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-18 16:06:08 +00:00
Brian Wilkerson
b6d278be10 Clean up quotes in messages.yaml
Change-Id: If09b1b35830c659f3c5bd5615e9966190e5d4b48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263560
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-10-18 15:00:58 +00:00
Sigurd Meldgaard
4768317f2b Bump pub to b9afe9270c24d040b8ae465b4b37ba4f7f4b4cc5
Changes:
```
> git log --format="%C(auto) %h %s" 817e61d..b9afe92
 https://dart.googlesource.com/pub.git/+/b9afe927 Completely switch from pub.dartlang.org to pub.dev (#3611)
 https://dart.googlesource.com/pub.git/+/7b65fa73 update docs for running 'pub token' (#3602)
 https://dart.googlesource.com/pub.git/+/4c9ebd0e Content hashing of archives (#3482)

```

Diff: https://dart.googlesource.com/pub.git/+/817e61d9eb174f77dfd2cb1d1de45826f66ac6bf~..b9afe9270c24d040b8ae465b4b37ba4f7f4b4cc5/
Change-Id: I6d827dd64f822e0194e0e17e95a47f02b744b561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264701
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2022-10-18 14:42:34 +00:00
Paul Berry
cf50ee8eb4 Prototype integration of shared type analysis logic with CFE.
This change replaces the InferenceVisitorImpl.visitSwitchStatement
with a call to the new shared type analyzer, and implements the
necessary callbacks to allow analysis to work end-to-end.

Change-Id: I73a9514428b4ce092762d3ea450545986d0e1ea9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257491
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-10-18 14:33:18 +00:00
Ben Konyi
39168c9ef0 [ CLI ] Fix dart run --enable-experiment
Fixes issue where --enable-experiment options passed after `dart
run` weren't being handled by the VM.

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

TEST=pkg/dartdev/test/commands/run_test.dart

Change-Id: Ia9c585a16756fd4450cfd159a1b9864ebfb6d200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264200
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-18 13:42:32 +00:00
Danny Tuppeny
bc7094dbc1 [dds/dap] Ensure "terminated" event is sent when detaching from processes
Change-Id: I466f97c2d98649b77412396e462bf3ae9c9e7f6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264481
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-18 13:26:35 +00:00
Sigurd Meldgaard
250db68e25 Bump pub to 817e61d9eb174f77dfd2cb1d1de45826f66ac6bf
Changes:
```
> git log --format="%C(auto) %h %s" 28a2503..817e61d
 https://dart.googlesource.com/pub.git/+/817e61d9 Fix publishing (#3610)
 https://dart.googlesource.com/pub.git/+/97f638d0 PubToplevel.directory is never null. (#3587)
 https://dart.googlesource.com/pub.git/+/a3ee2099 Make binstubs offset invariant (#3586)
 https://dart.googlesource.com/pub.git/+/67e44b4b Make >=2.12 <3.0.0 compatible with dart 3 (#3572)
 https://dart.googlesource.com/pub.git/+/c287c110 Warn on `pub publish` if `dart analyze` has messages (#3568)
 https://dart.googlesource.com/pub.git/+/29d7d868 Cleaner pubspec.lock parsing (#3487)

```

Diff: https://dart.googlesource.com/pub.git/+/28a2503d7f4806e6854e3ed0d783f065abfd1b5f~..817e61d9eb174f77dfd2cb1d1de45826f66ac6bf/
Change-Id: I203963479a2bb78db80d8e645066a227febeef46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264680
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2022-10-18 12:17:31 +00:00
Joshua Litt
9277495661 [dart2wasm] Fix paths for snapshot.
Change-Id: I6b26b6171b35d22cdb706d96fdb0045eef7e7264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264100
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Joshua Litt <joshualitt@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-10-18 09:25:33 +00:00
Ömer Sinan Ağacan
54dbb42244 [dart2wasm] Fix truncating int div code gen
Wasm `i64.div_s` result[1] is undefined when the division result is
2^63, and v8 traps with "divide result unrepresentable".

This change follows the checks in native runtime (in
`Integer::ArithmeticOp`) to handle overflowing in
`-9223372036854775808 ~/ -1`:

   case Token::kTRUNCDIV:
     if ((left_value == Mint::kMinValue) && (right_value == -1)) {
       return Integer::New(Mint::kMinValue, space);
     }
     return Integer::New(left_value / right_value, space);

These tests now pass:

- corelib/integer_parsed_div_rem_vm_test/01
- language/operator/left_shift_test

language/operator/arithmetic_test used to fail with the same trap, but
it now fails because of #50228.

[1]: https://webassembly.github.io/spec/core/exec/numerics.html#op-idiv-s

Change-Id: Ib43ac7a53d5cf96c01b016f73240da533ef84516
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264460
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-10-18 07:06:46 +00:00
Sigmund Cherem
770c9d77c5 [typed_data] Fix breakage introduced in recent change.
This fixes a regression introduced by
https://dart-review.googlesource.com/c/sdk/+/254501. The change
accidentally excluded some  clauses. This was not detected by the
CFE (it should be a static error), and as a result unsound
optimizations were made by dart2js.

Fixes https://dart-review.googlesource.com/c/sdk/+/254501

Change-Id: Iff52cba277546f2a9fab3c2c2736410d272dad7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264601
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-10-18 01:16:27 +00:00
Joshua Litt
78f95a427b [dart2wasm] Switch to using declared nullability in subtype check.
Change-Id: Id993392aad23dd5a6c03e84a21323ff529992c6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263146
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2022-10-17 23:07:27 +00:00
DEPS Autoroller
2230bc2064 Roll Dart Documentation Generator from c8bc0655bbd4 to 5b3feb67f7db (3 revisions)
https://dart.googlesource.com/dartdoc/+log/c8bc0655bbd4..5b3feb67f7db

2022-10-17 49699333+dependabot[bot]@users.noreply.github.com Bump actions/cache from 3.0.10 to 3.0.11 (#3224)
2022-10-17 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.0.2 to 3.1.0 (#3214)
2022-10-17 srawlins@google.com Fix enclosingCombo initialization issue (#3212)

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: Ib424a2dfca4c9314faa40fbea3aed8cf891e011a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264581
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-10-17 23:00:38 +00:00
Danny Tuppeny
ae352fe940 [dds/dap] Improve handling of lists in variables requests
Fixes https://github.com/Dart-Code/Dart-Code/issues/4204.
Fixes https://github.com/Dart-Code/Dart-Code/issues/4213.

Change-Id: Ibd95a149e6f620efb690c24623bb6b9d04a794b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263620
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-10-17 21:51:36 +00:00
nullrocket
263b163f47 [dart2js] Exempt native SharedArrayBuffer from structured clone.
Ensure SharedArrayBuffer is exempt from the structured clone aglorithm.

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

Change-Id: I2e541e4e0e1f3b421f76a7ad9bb670b8d60f740f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255765
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-10-17 21:48:13 +00:00
Kallen Tu
fee8a22c31 Clean up VM core libraries by removing dynamic invocations.
Tested: No new behaviour. Covered by prior tests.
Change-Id: I739649a53c3982b673b1144e3c5aa98cc75f98a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263042
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-10-17 21:22:50 +00:00
Joshua Litt
204c03a98e [dart2wasm] Wire up cfe experimental flags.
Change-Id: Iab9b3a5997e63e61a42bc4fb27825b345ae63ab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264060
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2022-10-17 21:01:33 +00:00
Ryan Macnak
30de5494d5 [vm] Rename Dart_NotifyDetach to Dart_NotifyDestroyed.
To reflect its expected usage.

TEST=ci
Bug: https://github.com/flutter/flutter/issues/108601
Change-Id: I898e400d4a6c112130663a03354844cd82ed778c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264561
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-10-17 18:23:59 +00:00
Ryan Macnak
d2a43581a3 [io] Avoid serializing unwritten bytes in async I/O.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/50206
Change-Id: Ibe6c326578ec4a2ca90634714e4628c02a5e5bcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264260
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-10-17 17:42:54 +00:00
Ryan Macnak
63f957a687 [vm] Work around some tests infinite looping on TSAN.
vm/cc/StoreReleaseLoadAcquire
vm/cc/StoreReleaseLoadAcquire1024
began infinite looping after Clang update

TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/50236
Change-Id: I0472e0cae9723bfa89e11289f8ab24e4174209cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264263
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-10-17 17:32:40 +00:00
Sam Rawlins
c3fb570105 Add "Add 'late' hint" feature
Tested with:

* top-level variables
* local variables
* instance and static fields declared in classes and mixins (enhanced enums are not supported pre-null safety)

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

Change-Id: I8a89668fffe64fff508d0aeb36aaebef5c84f223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263460
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-17 15:24:57 +00:00
Alexander Thomas
843cd8e43f [release] Add release notes for 2.18.3
Change-Id: I291c49c56480786aa7ae4dff2b889e70157f62a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264420
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-10-17 13:08:05 +00:00
Joshua Litt
18e41ef31c [dart2wasm] Trivial fix for Int8List.
Change-Id: I352b1d7522dfe2d3f4570e0f4a379ddf883d170a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264264
Auto-Submit: Joshua Litt <joshualitt@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-10-17 09:48:59 +00:00
Ömer Sinan Ağacan
045cb1a711 [dart2wasm] Handle void getters in selector return counts
These tests now pass:

co19/Language/Classes/Getters/void_return_type_t01
language/void/generalized_void_syntax_test
language/void/void_type_usage_test/instance3_argument_void
language/void/void_type_usage_test/instance3_as
language/void/void_type_usage_test/instance3_conditional
language/void/void_type_usage_test/instance3_for
language/void/void_type_usage_test/instance3_literal_map_key_init
language/void/void_type_usage_test/instance3_literal_map_value_init
language/void/void_type_usage_test/instance3_literal_void_list_init
language/void/void_type_usage_test/instance3_null_equals1
language/void/void_type_usage_test/instance3_return_to_void
language/void/void_type_usage_test/instance3_stmt
language/void/void_type_usage_test/instance3_void_init

Change-Id: Iadcff0269360515267e0848bc7256e5bc51104fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263720
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-10-17 09:30:08 +00:00
Ahmed Ashour
c8bda70c66 Remove nbsp
Fixes #50202

Change-Id: I67e2f02f49deaf1bd9dc1f32a35310704f4d921b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264120
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-10-17 08:18:49 +00:00
Paul Berry
ef24f4c915 Migration: make DecoratedType.node non-nullable.
Change-Id: I1bbaf596c26cd059da693f75483f16b4f621b4e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-10-16 23:42:52 +00:00
Paul Berry
5e29849393 Parser: consolidate handleCaseMatch and endCaseExpression.
There was no need for both of these listener callbacks, because they
were always called together.  Since `beginCaseExpression` is actually
used, it makes sense to keep `endCaseExpression` and get rid of
`handleCaseMatch`.

Change-Id: I544096b2c2b2814e8cc0c8606455855cb77c9e60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264102
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-10-15 13:51:59 +00:00
Paul Berry
9aab3c7746 Patterns parsing: add support for guards.
Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I21db09c9d8c1d359e1b125eea2bae2749cdb72fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264101
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-10-14 20:14:20 +00:00
Paul Berry
4cf63fb382 Parser and listener API changes for supporting pattern guards.
These are in their own CL so that it's easy to verify that no
functionalty has changed, even though a lot of parser expectations
files are affected.

In a follow-up CL, I'll add code that actually parses pattern guards.

Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I79f5a02df45e29b69aa4d8348cfdf27042ada9d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264020
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-10-14 15:42:12 +00:00
Alexander Markov
3fa0a2f255 Reland "[vm] Cleanup unused code in ClosureFunctionsCache"
This is a reland of commit 4c1235caab

The underlying problem is addressed in https://dart-review.googlesource.com/c/sdk/+/262429.

Original change's description:
> [vm] Cleanup unused code in ClosureFunctionsCache
>
> TEST=ci
>
> Change-Id: Ia6f24545c7e2d5b0df81cab52585d17556b36c16
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256363
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Auto-Submit: Alexander Markov <alexmarkov@google.com>

TEST=ci
Change-Id: I96bd99174e68818ca8024e72836ebd1c99cdecd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263141
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-14 14:09:44 +00:00
Paul Berry
5923b883db Parser: add support for wildcard patterns.
The bare identifier `_` is treated as a variable pattern wherever it
appears, even though other bare identifiers are sometimes treated as
constant patterns.

Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I475ef627b6d0bf519a1972aa5ec683e2d032f02b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263280
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-10-14 14:04:59 +00:00
Jens Johansen
27e0e84cc3 [parser] Allow parsing top-level getter called get that's async/async*/sync*
Change-Id: I07e9759cdf61e1b633bbc0e7cd961d80ecfedf8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263129
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-14 11:21:48 +00:00
Jens Johansen
7aeda010bf [parser] Follow-up on feedback posted after land of record commit
Follow-up to https://dart-review.googlesource.com/c/sdk/+/262605

Change-Id: I5178f7118af30eaa280dde746ddbf579fff5df40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263127
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-10-14 10:57:39 +00:00
Jens Johansen
c4ea2d95cd [parser] Add comments to calls
Change-Id: Ide38846a6ff93c0bb7714ad89cc2f14accb0ed20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263126
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-14 09:48:38 +00:00
Jens Johansen
b3dbaadc83 [parser] More corner cases for record types
* required is a modifier when followed by [record type] `?`.
* Parse record type as record type if followed by `super` or `?` `super`
  or `?` `this`.
* Typedef with record type follow by `?`.
* Parse record type as record type in get/set with async/sync/sync*.
* Parse record type as record type when followed by `>>=` or `>>>=`
  (for weird formatted use in typedefs).

Change-Id: I19e208497e28780fb1505139c488e943751cce25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-10-14 09:33:58 +00:00
Sigmund Cherem
5501c7f978 [dart2js] Migrate resolution_world_builder.dart
Change-Id: I089cf76ec054cbcc562f51bde43a3931c1dba9be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262743
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-10-14 03:13:52 +00:00
Sigmund Cherem
83dfe0b3fe [dart2js] migrate kernel_world.dart
Change-Id: I44a5395b185035f95167875a57a392ae85f7eb40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262742
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-10-14 03:13:52 +00:00