Commit graph

90360 commits

Author SHA1 Message Date
Johnni Winther
eaedc90684 [_fe_analyzer_shared] Improve handling of map patterns
This adds improved support for map patterns. A new [Restriction]
class replaces the [TypeBasedStaticType.identity] properties and
allows not only for unique values as subtypes but also subsets of
values as subtypes. For map pattern the subsets are defined by
a [MapTypeIdentity] based on the type arguments of the map pattern,
its constant key values and whether it has a rest pattern.

Change-Id: I32b95f519cc161975af17ea82beacbc27ad5bbe1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287464
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2023-03-09 17:22:36 +00:00
Konstantin Shcheglov
04f7a2a910 Simplify implementation of FindNode.singleX getters.
Change-Id: I434cf2371dee4269747b21413d6d15cbd4fa4e3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287672
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-09 17:00:48 +00:00
Chloe Stefantsova
b16acf4f35 [cfe] Provide pre-desugaring node to flow analysis to fix promotion
Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: I2a70518975c809f28f0d0f72f7365492ca7d6e83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287601
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-09 15:58:49 +00:00
Lasse R.H. Nielsen
c974c70f31 Add boolean parse
Closes https://github.com/dart-lang/sdk/pull/51026

Co-authored-by: Renato Burton <renatoburton96@gmail.com>
GitOrigin-RevId: e85a56ce338476b38eac890fac2b8ca193ca42e8
Change-Id: I60f92c594830ef0438ecd92b4c83cec609054326
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279746
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-03-09 15:14:32 +00:00
Modestas Valauskas
e0fedb81a1 Replace identifierNotFUNCTION with identifier.
Closes https://github.com/dart-lang/sdk/pull/51675

GitOrigin-RevId: 420ce80ffed652776cc612aaa7209a81df4fe222
Change-Id: I870ffe0d63eb0bbcbfe8f5db6be940c6a470750d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287667
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-03-09 14:50:46 +00:00
Sigurd Meldgaard
a06ade1d14 Bump pub to d69493e5163553bde53c0889b7479dee02f550bf
Changes:
```
> git log --format="%C(auto) %h %s" 048e3ad..d69493e
 https://dart.googlesource.com/pub.git/+/d69493e5 Don't allow non-null-safety constraints in the root pubspec (3800)
 https://dart.googlesource.com/pub.git/+/3514d7e7 Fail gracefully when tar file contains duplicate entries (3805)
 https://dart.googlesource.com/pub.git/+/0b3b8b44 Give full error even in summary mode (3804)
 https://dart.googlesource.com/pub.git/+/09c29722 Allow adding and removing dependency overrides (3716)
 https://dart.googlesource.com/pub.git/+/7184d1b5 accept 'topics' property in pubspec.yaml (3796)
 https://dart.googlesource.com/pub.git/+/cd106dfd Improve usage text of get (3792)
 https://dart.googlesource.com/pub.git/+/019d61cb Handle bad git revisions (3791)
 https://dart.googlesource.com/pub.git/+/e3ff7a99 Use 'pkg' and 'packages' to trigger suggestions for the pub command (3731)
 https://dart.googlesource.com/pub.git/+/ea24bf22 Better error when path dependency has no pubspec.yaml (3787)
 https://dart.googlesource.com/pub.git/+/da2a0144 Drop --use-data-isolate-strategy flag for tests (3788)
 https://dart.googlesource.com/pub.git/+/a565858e Improve documentation of `pub token` and subcommands (3778)
 https://dart.googlesource.com/pub.git/+/dd320459 Add test for publishing and consuming files with unicode characters in name (3785)
 https://dart.googlesource.com/pub.git/+/c4226d9f Fail tests on errors thrown by test PackageServer (3784)
 https://dart.googlesource.com/pub.git/+/12019939 Consider pubspec_overrides.yaml when publishing (3782)
 https://dart.googlesource.com/pub.git/+/d8a97497 Allow addition of tokens for insecure localhost repositories (3777)

```

Diff: https://dart.googlesource.com/pub.git/+/048e3ad2b5e1b4ebe6883addbc95722be6904a7b..d69493e5163553bde53c0889b7479dee02f550bf/
Change-Id: I92af981e9cb6aaedfcd75a7327dfef071645306b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285908
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-03-09 13:48:51 +00:00
Oleh Prypin
732d1cc0a4 Revert "Add more interface and final modifiers to dart:core."
This reverts commit 4f8333e80e.

Reason for revert: causes breakages in google3

Original change's description:
> Add more `interface` and `final` modifiers to `dart:core`.
>
> Make intent explicit for classes which are intended as interfaces,
> or which are not intended to be subclassed.
>
> Mainly classes which are pure interfaces are marked as such,
> and platform-specific classes not intended for subclassing
> are made `final`.
>
> The `final` classes includes `BigInt`, which is written to assume
> that arguments inherit its private members
> (it runs `_ensureSystemBigInt` on arguments).
>
> It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
> which are just intended as stand-alone implementation classes for accessing
> platform-specific functionality.
>
> Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: I94ff95f72410a4e1ae80744971c4c920fecc1493
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287760
Reviewed-by: Martin Kustermann <kustermann@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-03-09 13:09:57 +00:00
Lasse R.H. Nielsen
4f8333e80e Add more interface and final modifiers to dart:core.
Make intent explicit for classes which are intended as interfaces,
or which are not intended to be subclassed.

Mainly classes which are pure interfaces are marked as such,
and platform-specific classes not intended for subclassing
are made `final`.

The `final` classes includes `BigInt`, which is written to assume
that arguments inherit its private members
(it runs `_ensureSystemBigInt` on arguments).

It also includes the `Expando`, `WeakReference` and `Finalizer` classes,
which are just intended as stand-alone implementation classes for accessing
platform-specific functionality.

Change-Id: Ib770c265edff127a289a67fe72d15b9ff0499407
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287180
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-03-09 12:31:08 +00:00
Chloe Stefantsova
615e44821a [cfe] Support private field names in object patterns
Part of https://github.com/dart-lang/sdk/issues/49749

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

Change-Id: I712ad8b5aa87a27614f76da42fb10d4c9e9a03da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287740
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-03-09 11:53:29 +00:00
lauren n. liberda
d9e8662145 fix //build/config/linux/pkg_config.gni
Closes https://github.com/dart-lang/sdk/pull/51614

GitOrigin-RevId: eeb9417653fcdda384bd26de58b3cf2b508be348
Change-Id: I0b9d3b06afdad29667281403e646edc4a06a2b0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286603
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-03-09 11:44:44 +00:00
Brian Wilkerson
e2d8a5e66e Compute and report to analytics the flutter version
Change-Id: I1432d52f0708370cfe78accb216d93de4ce4479a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287244
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-03-09 05:02:39 +00:00
Alexander Aprelev
63bea106d6 [vm/regexp] Name generated Regexp function with actual expression.
Currently all generated Regexp functions share the same name making profile information with RegExp functions harder to use.

BUG=https://github.com/dart-lang/sdk/issues/51624
TEST=ci

Change-Id: I67acf73df4be301dbcb17a60b8be1793002897b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287247
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-03-09 03:49:58 +00:00
Robert Nystrom
2496c1a69a [flip-patterns] Fix web switch tests.
Update two tests to Dart 3.0 semantics:

- Switch case constants can be types that don't have primitive equality.
- Switch cases don't need breaks.

Change-Id: Icdea5b66cf12f675580a85b9d49c09db589e29d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287400
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-03-09 01:13:09 +00:00
Konstantin Shcheglov
b1b1f47b95 Issue 51561. Fix for a mixin field inference.
Bug: https://github.com/dart-lang/sdk/issues/51561
Change-Id: Ie8654a4e3bb73dd41c7f6fa291fe531a5dcc9fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-08 22:45:15 +00:00
Brian Quinlan
b04cb92b73 Await the benchmark reports
Change-Id: I9de7fdbadcf454b1d2069580a0e5c96722b3c7ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287620
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-03-08 22:38:21 +00:00
Ryan Macnak
5c76d099a6 [build] Use relative paths.
go/remotely-cacheable

TEST=ci
Change-Id: Idee4ab56de2df15e90c5e4106b6200bf82e76155
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287320
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-08 22:10:42 +00:00
Keerti Parthasarathy
a94d2e277c Wire up another case for add_const fix.
Bug: 49960
Change-Id: I2b18aaab92c012c01485f3b73f47c80f134f1f1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-03-08 22:06:39 +00:00
Alexander Markov
8ff777e61f [vm] Fix equality of uninstantiated generic closures
Equality of uninstantiated generic closures should match equality
of corresponding instantiated generic closures.

We cannot use identity for equality of instantiated generic closures
as distinct instantiations of the same generic closure should be equal.
So, identity shouldn't be used for uninstantiated generic closures
neither.

This change fixes equality for uninstantiated generic closures
and also updates closure hashCode correspondingly.

TEST=language/closure/instantiation_closure_equality_test
TEST=co19/LanguageFeatures/Constructor-tear-offs/equality_*

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

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Ieafc052de4a4f5f9ffcd2d9d26cb36a209c0e127
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287581
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-03-08 21:44:56 +00:00
Konstantin Shcheglov
18d414d24d Add 'get sinceSdkVersion' to Element.
Bug: https://github.com/dart-lang/sdk/issues/34978
Change-Id: Ibabcbb9f4dcd5ecb0300af05a494dc2e5af14fb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287241
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-08 20:29:57 +00:00
Konstantin Shcheglov
424d56f34c Class modifiers changes for mock SDK, fixes for analyzer, analysis_server tests.
Some of these changes were in the flip CL.
https://dart-review.googlesource.com/c/sdk/+/285080

Change-Id: I3f9d7905aeaedc25f2008410a2b48ff74ef2d74f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-08 18:31:31 +00:00
Aske Simon Christensen
4733f9b754 [dart2wasm] Fix accesses to type arguments in sync* functions
Fixes the `Iteration` benchmark.

Change-Id: I947c413524a3d55d19f56d0bfbb45dc5125e972a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287467
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-03-08 17:02:22 +00:00
Kallen Tu
9e1c3b4c26 [flip-modifiers] Make tests and outline extraction tests mixins.
Change-Id: Ic0d393eb1df282f25cfa45ee81ef5ccffef3060a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287242
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-03-08 16:11:30 +00:00
Aske Simon Christensen
f288058d6b [dart2wasm] Enable records and patterns in benchmarks
Also omit debug info from the Binaryen output, since we are not using it
for anything and the upcoming code size benchmarks will need it removed
anyway.

Change-Id: I57ddd7c8f1fa8ed725a69ed36e949109742da75d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287466
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2023-03-08 15:52:13 +00:00
Ömer Sinan Ağacan
979e8dc932 [dart2wasm] Fix instantiation closure equality
The test fails in VM, which is reported as #51660.

Change-Id: Icb0f5493f282aa017980478a038b48dd09c5030c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286933
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-03-08 15:42:26 +00:00
Daco Harkes
11929b6f68 [vm/ffi] Change late Finalizable implementation #2
https://dart-review.googlesource.com/c/sdk/+/286782 omitted to treat
captured variables.

We should treat captured variables the same as other variables. We
might decide to inline the body of a closure, in which case we should
not eagerly execute initializer statements for fences.

TEST=pkg/vm/testcases/transformations/ffi/finalizable_late_initializer.dart

Closes: https://github.com/dart-lang/sdk/issues/51511
Change-Id: I80744d347926087f467c561d76eca17d3a108983
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287460
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-03-08 15:40:52 +00:00
Konstantin Shcheglov
6e019dcd0b Rename resolution tests to AstNodeNameResolutionTest style.
Any variations are after 'Test', e.g. 'TypeNameResolutionTest_WithoutNullSafety'.

Change-Id: If3316cabf058936dedc294c85b4b9417a6923ebd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287248
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-08 15:20:08 +00:00
Ömer Sinan Ağacan
fa90dcc640 [dart2wasm] Fix awaiting non-future values
New passing tests:

- co19/Language/Statements/For/Asynchronous_For_in/execution_A05_t05
- language/async/await_test/02
- language/async/await_test/03
- language/async/await_test/none
- language/await/nonfuture_test
- language/await/started_immediately_test

Change-Id: I5d5e13f846aa2415abb9788ef341b1d86170937c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286921
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-03-08 14:53:40 +00:00
Ömer Sinan Ağacan
0ad9f2ec66 [dart2wasm] Move covariance checks from async inner to wrapper functions
New passing test: language/async/covariant_type_test

Fixes #51601

Change-Id: Id5e807b463db67d0e44842e375d35604e35398cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286462
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-03-08 11:22:51 +00:00
Martin Kustermann
91ea353298 [gardening] Make new standalone/io/exit_works_with_blocked_isolate_test be a nop in the training run
TEST=Fixes standalone/io/exit_works_with_blocked_isolate_test in app-jit mode

Change-Id: Icd4f43dfe524b5a9f8569a520a661289214bfddf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287461
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-03-08 10:22:46 +00:00
Vyacheslav Egorov
56ad16f4de [vm] Make VM strict about min required Mac OS X version.
Refuse to initialize VM if current Mac OS X version is below
MAC_OS_X_VERSION_MIN_REQUIRED, which was configured in build
time through mac_sdk_min GN argument.

TEST=tested manually by changing return value of MacOSXVersion

Cq-Include-Trybots: luci.dart.try:dart-sdk-mac-arm64-try
Bug: https://github.com/flutter/flutter/issues/121739
Change-Id: I9d913516077dbb196e8d6ebd7fe9f3914de7c748
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286932
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-03-08 09:08:39 +00:00
Nicholas Shahan
d77e22a20b [dart2js] Update tests matrix entries
- Update options for existing configurations.
- Add one new configuration for running _2 test suites.
- Rename builders and update to run new configurations.

Tested: Tested with led runs.
Change-Id: I87de456b6b2e53d9e211cbd716fef18910aba69c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281348
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-03-08 08:40:57 +00:00
Kevin Moore
252adbc593 Rename pkg/dart2wasm/dart2wasm.md -> README.md
Improve discoverability on Github, etc

Change-Id: I675d06a1b3e8e38e3bc521840b3a0a4eef21291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287243
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2023-03-08 07:46:15 +00:00
Johnni Winther
d451cb64c0 [_fe_analyzer_shared] Only show fields of interest in exhaustiveness tests
Only the fields of a scrutinee type that are used in the cases are
now shown in the test expectations. When the field is not present,
for instance when the scrutinee type is nullable, or the fields are
only present on (some of) the subtype of the scrutinee type, the
fields are shown to be missing with a `-`.

Change-Id: I2d36b230e979dc929d083cfb8f9cdb9f1143d380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287280
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-03-08 07:14:47 +00:00
Sam Rawlins
8a9188aae5 [analysis_server] Avoid future-of-implicit-dynamic types
This clears all of the implicit `Future<dynamic>` types in lib/.

Also a few `extends XyzVisitor<(implicit) dynamic>` are made into
`extends XyzVisitor<void>`.

Also a few raw Stream, StreamController, and Completer types.

Change-Id: I2471cc56d2d2d0545e5e103fff3189e745a54b49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287245
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-08 06:22:57 +00:00
Stephen Adams
66e4f27384 [dart2js] Temporarily disable inlining of methods with labeled statements
Bug: 51646
Bug: 51652
Change-Id: I3d7a722420a6ead288e19ed7a5fc017b32d6a545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287300
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-03-08 04:13:38 +00:00
Sam Rawlins
49a3fb4f96 [analyzer] Separate the HTML parser utility from the DOM
With the parser code in the same library as the DOM classes, the
`pkg/analyzer/tool/messages/generate.dart` program, which generates all
of the diagnostic classes and diagnostics, _depends_ on a library
with a `parse` method which depends on these diagnostic classes (in
order to report errors while parsing HTML). This means that if
there is any existing error (like an unknown identifier) in the
existing error codes, it is impossible to generate the error codes.

Since we don't need the `parse` method to generate diagnostics, we
split up the library and remove the indirect dependency.

Separating the parser code out removes the loop.

Change-Id: Ifb9e9fd979e341ae64a1ed49aaf3758d3dcf1dee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-08 03:06:19 +00:00
Joshua Litt
25779cc933 [js] Ensure dartify / jsify have inverse semantics.
CoreLibraryReviewExempt: Minor change to the internal of a web backend specific API.
Change-Id: I450e9410af7e006b853e2d8f26dc5ede1d95f4e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245621
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-03-08 00:07:42 +00:00
Kallen Tu
627253ed83 [flip-modifiers] Make more tests use mixin instead of class.
Change-Id: I27ee447599941e7f266ae56bd6663fe1936394fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287223
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-03-07 23:59:39 +00:00
Brian Wilkerson
b815ddc2b8 Attempt to fix the windows bot
Change-Id: I23ac16a4a3acdc5efaddf997133aa54d4f366a95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287240
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
2023-03-07 22:35:13 +00:00
Konstantin Shcheglov
c084056d45 Add a few @Since annotations for mock SDK.
Change-Id: Ie2d726918b16f38261c2c848a59a0f3f1e4b3675
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287060
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-07 21:44:57 +00:00
Michael Thomsen
47b180ea89 Update wasm readme
Change-Id: Ib084c9ed28eabcdf55e1b43c6d6ef2af82e6fe76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286931
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2023-03-07 21:22:38 +00:00
pq
4c7e87888d update @reopendocs
Fixes: https://dart-review.googlesource.com/c/sdk/+/286860

Feedback welcome. I expect we'll want to iterate more on this but I see Erik's new content as a distinct improvement.


Change-Id: Iba385be6c411f2e5e3f1bd490b437dbea86e07aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286860
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-03-07 21:21:01 +00:00
Devon Carew
eadfedec50 [deps] rev async, dartdoc, html, http, http_multi_server, source_map_stack_trace, stream_channel, test, tools, watcher, webdev, yaml, yaml_edit
Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (8deaa40..f454380):
  f454380  2023-03-02  Natalie Weizenbaum  Add `StreamExtensions.listenAndBuffer()` (#235)

dartdoc (77d5994..98fa859):
  98fa859c  2023-03-05  dependabot[bot]  Bump cli_util from 0.3.5 to 0.4.0 (#3360)

html (0b8025c..08643e9):
  08643e9  2023-03-02  Devon Carew  prep for publishing 0.15.2 (#205)

http (1500a71..805a147):
  805a147  2023-03-02  Kevin Moore  Fix some spelling (#884)
  5a2f036  2023-03-02  Kevin Moore  Move to pkg:dart_flutter_team_lints, require Dart 2.19 (#883)
  35b2cef  2023-03-02  Bahaa Fathi Yousef  Corrected the spelling of "Implements" in "/http/lib/src/io_client.dart" (#871)
  bb86cf3  2023-02-27  Brian Quinlan  Provide access to NSURLSession.sessionDescription (#881)

http_multi_server (2cd5355..7bd190c):
  7bd190c  2023-03-06  Kevin Moore  Require Dart 2.19, enable and fix new team lints (#51)

source_map_stack_trace (a60ef54..45ea368):
  45ea368  2023-03-07  Kevin Moore  Require Dart 2.19, use pkg:dart_flutter_team_lints (#35)

stream_channel (0850515..a20ccd4):
  a20ccd4  2023-02-28  Kevin Moore  move to pkg:dart_flutter_team_lints lints, fix code, bump min SDK (#87)

test (1307cc5..92da93a):
  92da93a8  2023-03-06  Devon Carew  dogfood the new setup-dart action (#1964)
  e49818ec  2023-03-01  dependabot[bot]  Bump github/codeql-action from 2.2.1 to 2.2.5 (#1963)

tools (28b7be8..a1c3506):
  a1c3506  2023-03-07  Devon Carew  dogfood the new setup-dart action (#25)
  fb46723  2023-03-07  Elias Yishak  Update pubspec.yaml (#24)
  5a72344  2023-03-06  Elias Yishak  Add `DashEvent` for toggling telemetry collection + send event whenever toggled (#23)

watcher (0ca6638..5968409):
  5968409  2023-03-07  Kevin Moore  blast_repo fixes (#139)
  e8f771a  2023-03-07  Kevin Moore  Require Dart 2.19, use new team lints (#138)

webdev (deb801b..c007560):
  c007560  2023-03-06  Elliott Brooks (she/her)  [MV3 Debug Extension] Show warning when clicking on debug extension for non Dart app (#2015)
  1a010dc  2023-03-06  Devon Carew  dogfood the new setup-dart action (#2017)
  07743a3  2023-03-06  Anna Gringauze  Fix exception mapping from JS to dart (#2004)
  eb63b31  2023-03-03  Elliott Brooks (she/her)  Create a Dart Debug Extension issue template (#2014)
  85f35d4  2023-03-01  Devon Carew  update publishing automation integration (#2002)
  e748045  2023-02-28  Anna Gringauze  Prepare to release webdev 3.0.1 (#2000)
  5355050  2023-02-27  Elliott Brooks (she/her)  [MV3 Debug Extension] Ignore page reloads for detecting navigation away from app (#1994)
  4e08276  2023-02-27  Anna Gringauze  Prepare to release dwds 18.0.0 (#1993)
  fc54d68  2023-02-27  Anna Gringauze  Fix expression evaluation failures on empty scopes (#1998)
  496a2b4  2023-02-27  Anna Gringauze  Temporarily disable publish verification (#1996)

yaml (a6d8781..1ad2f49):
  1ad2f49  2023-03-01  Kevin Moore  Require Dart 2.19, migrate to dart_flutter_team_lints, make associated fixes (#138)
  4d369fd  2023-03-01  Kevin Moore  benchmark: fix output.json (#137)

yaml_edit (998eea2..0668eb5):
  0668eb5  2023-03-02  Jonas Finnemann Jensen  Wrap recursively, prepare release (#28)
  a4ff857  2023-03-01  Mohamed Ishad  Update CHANGELOG.md (#37)
  2fdfbdb  2023-02-28  Mohamed Ishad  Fix for issue #23 (#34)
  494ad7c  2023-02-25  MikiPaul  fixed typo (#36)

Change-Id: I101c94575c20fca55c7440e84668413207073a32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287162
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-03-07 21:13:36 +00:00
Sam Rawlins
27984095de [analysis_server] Avoid Future-of-implicit-dynamic in tests
* 99% of these are `Future ` --> `Future<void> `
* There are some `test_` methods which declare a return type of `Future` which
  is non-idiomatic, I think, but in order to create a pragmatic consistency, I
  added `<void>` to the few test methods in these libraries. Later if we
  desire, we can remove all of the return types.
* Also a few `Completer ` --> `Completer<void> ` and
  `Stream ` --> `Stream<Object?> `
* There are many remaining cases in `lib/`

Change-Id: I41cd51bab6886788e15ac7065dd21e95e789d09f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-07 21:12:58 +00:00
Alexander Markov
55ddbe534a [vm/aot/tfa] Avoid using null as an initial value of non-nullable and late variables without initializer
TEST=pkg/vm/testcases/transformations/type_flow/summary_collector/vars.dart

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Ie6b3bdf7069e7d6389e3a729f23b9e1912a4eed2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285061
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-03-07 20:31:14 +00:00
Mark Zhou
a92274cae8 [ddc] Rolling internal dart_library.js into SDK
Change-Id: Ifb1cf1aed53b04eaa0a258668eab6b4b8f19df80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286609
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2023-03-07 19:44:26 +00:00
Mayank Patke
6414db5327 [dart2js] Disable kernel transformer when using modular analysis.
Mutating the kernel AST can cause serialization and deserialization to
go out of sync when modular analysis is enabled, crashing dart2js.

Change-Id: If19afabacf1cb120a6804bd12ef268316de41f1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286862
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-03-07 19:36:10 +00:00
Sam Rawlins
3c633384d3 Add a script which generates a testing package
This script has a decent description at the top, and decent comments
throughout.

Change-Id: I455c0e7b5354563750636e31a53db2caacdbf687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-07 18:54:28 +00:00
Johnni Winther
6e16dad3c0 [_fe_shared_analyzer] Use internal constant-to-text
This chances the analyzer and CFE representation of constant values
to use the internal constant-to-text which doesn't include the
node type and in most cases resembles the source code corresponding
to the value.

For now, this is for creating less noise in the test. For the release
of the feature we need a more thorough handling since these texts
can be user facing when producing error messages.

Change-Id: I5b83d8b0c030e4ffb66422057acf5511619368e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287200
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-07 18:52:23 +00:00
Ryan Macnak
c023db4dd0 [vm] Fix false-positive in const field removal detection.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/51526
Change-Id: I86dfa625a218dd58c2c009081230ca0d0729e807
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286959
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-07 18:19:07 +00:00