This makes it easier to maintain and extend this benchmark.
Benchmark results should not change by this CL.
Deletes the legacy version of this benchmark.
Satisfies lints in this benchmark.
Closes: https://github.com/dart-lang/sdk/issues/37581
Change-Id: Icf03d0f4f0e668f9d4a843b11d8ef1565b404ca4
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284142
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Change-Id: I7c49fa13f67eb0f2f662f1a393cdf5614644604a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284483
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This will allow them to be used with other compiler backends, including
dart2wasm.
Change-Id: I42182545eeb035af8a3a6e2eba209ba2601a52d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281923
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
This is a reland of commit 1be893c507
Patchset 2 fixes the failure that was in
pkg/dds/test/dap/integration/debug_variables_test.
TEST=CI
Original change's description:
> [VM/Service] Start indexing positional record fields at 1
>
> TEST=CI
>
> Fixes: https://github.com/dart-lang/sdk/issues/51451
> Change-Id: I0e00e0ffb35aeb40affbbd5544542723bafc747c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284722
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>
Change-Id: I4cdee610646b3389d7d02ee6d905a66ae6e0329d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284862
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Revisions updated by `dart tools/rev_sdk_deps.dart`.
dartdoc (dba6f94..e4cdbd6):
e4cdbd6f 2023-02-21 Janice Collins Record rendering simplification (#3344)
http (c13a3f8..1500a71):
1500a71 2023-02-23 Devon Carew contribute a pull request labeler workflow (#875)
e2c4e6f 2023-02-21 Brian Quinlan Add a link to cronet_http_embedded from cronet_http. (#874)
markdown (4befe66..ecbffa9):
ecbffa9 2023-02-22 Kevin Moore Use latest lints, require Dart 2.19 or later (#524)
shelf (707c8b2..e3cfe79):
e3cfe79 2023-02-22 Devon Carew contribute issue templates and a pull request labeler (#332)
test (e56c643..2cc4144):
2cc4144e 2023-02-22 Nate Bosch Avoid exceptions for iterable getters (#1954)
f7fe4f06 2023-02-22 Nate Bosch Include stack trace for exception in has (#1953)
ba8e43af 2023-02-22 Nate Bosch Only grab the first failure in softCheck (#1949)
34df652b 2023-02-22 Nate Bosch Flush stdin before test (#1950)
ae015ef6 2023-02-22 Nidal Bakir Add Concurrency Testing section to README (#1944)
4e23d036 2023-02-21 Nate Bosch Mention .having and .has in migration guide (#1948)
438c2274 2023-02-21 Nate Bosch Annotate `has` with `@useResult` (#1947)
3ddecafd 2023-02-21 Nate Bosch Add async examples to README (#1946)
tools (a53933c..c7518f7):
c7518f7 2023-02-22 Elias Yishak Update to regex to look for underscore delimited labels (#12)
webdev (ae7eb80..1e7f9b7):
1e7f9b7 2023-02-22 Anna Gringauze Create copying sdk configuration provider (#1984)
26910ba 2023-02-22 Anna Gringauze Pass SdkLayout to the frontend server (#1986)
784e28b 2023-02-22 Anna Gringauze Remove unnecessary awaits (#1982)
3cbaf37 2023-02-22 Elliott Brooks (she/her) [MV3 Debug Extension] Support Bolt workflow (#1983)
0f893e6 2023-02-22 Anna Gringauze Move project definitions into a separate class (#1975)
a942b5f 2023-02-22 Anna Gringauze Add unnecessary_lambdas lint (#1978)
3774cf8 2023-02-21 Anna Gringauze Add 'avoid_void_async' lint (#1977)
705e0ac 2023-02-21 Elliott Brooks (she/her) [MV3 Debug Extension] Show a warning if multiple Dart apps are in a single page (#1976)
Change-Id: Iea264a18a154e71cd0990e1363951648bec5ceba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This fixes b/269188397 in Cider because now unlikned data is present
in both ByteStore and UnlinkedUnitStore, or absent in both. Before
this change we would get it from UnlinkedUnitStore, but expected
that these bytes were also requested from ByteStore, so we attempted
to release them (and got "underflow" of reference counter).
Also, we now put the unlinked data into UnlinkedUnitStore not only
after reading bytes, but also after building it. So, we second use
will get it from the store, not the third.
Change-Id: I89bf554511d3be82f67ef1f237061ba8a4693592
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284745
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This removes the old algorithm for exhaustiveness checking and
ports the relevant tests to use the new algorithm.
Change-Id: I7aee3c991e2735299ab4ddc743848b4845fb9250
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284882
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Adds @ObjectLiteral annotation to denote object literal constructors,
and implements it in all the backends. For dart2js, this involves
modifying the SSA and for dart2wasm, we create a one-per-shape
forwarding procedure to a specialized JS method that returns the
literal. This also modifies @anonymous semantics in dart2wasm to
be consistent with the other backends.
CoreLibraryReviewExempt: Backend-specific, just adding annotation.
Change-Id: I4d7a9ea9ed097f4f378709b40f8bd74f02e26b23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283922
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
This adds support for generic types in exhaustiveness checking.
There are two main obstacles:
1) Types that are not Dart subtypes might be related in the context
of exhaustiveness. For instance
sealed class A<X> {}
class B extends A<num> {}
method<T>(A<T> a) {
switch (a) {
case B(): ...
}
}
Here B is not a Dart subtype of A<T> but must still be a subtype
in the context of exhaustiveness since T could be num at runtime.
2) It is non-trivial to compute the subtypes of a generic sealed class
that is both sound and precise enough to be useful. For instance
sealed class A<X> {}
class B extends A<num> {}
class C<X> extends A<X> {}
class D<X extends num> extends A<X> {}
class E<X extends E<X>> extends A<X> {}
Computing the subtypes of A<F> for some type F, we would like to
exclude B (assuming F is not a supertype of num) because it
cannot be inhabit A<F>, and include C<F> so that we recognize
that C<F> exactly covers all C instances of A<F>. We would also
like to include D<F> but if we don't include the added `extends
num` bound, we might conclude that D<num> is _not_ sufficient to
cover D<F>. And what to do about E, can we even come up with a
type that represents the valid values?
The solution is threefold:
1) We add an 'overapproximate' function of types, which
replaces all type variables with their default types. This will compute
A<dynamic> for A<T>, A<int> for A<int>, A<List<dynamic>> for A<List<T>>,
and E<dynamic> for E<T extends E<T>>. This is similar to instantiate-
to-bounds, but is recursive.
We use this to test whether a type without type variables is a potential
subtype. For instance testing B <: overapproximate(A<F>) = A<F> shows
that B _cannot_ be a subtype of A<F>, and testing
B <: overapproximate(A<T>) = A<dynamic> shows that B _can_ be a subtype
of A<T>.
2) For finding subtypes of a sealed type, we recognize the case
when a type is a trivial subtype in which all type variables are passed
directly to the superclass, for instance like C<T> in the example. For
other cases we overapproximate the this type of the subclass.
3) To ensure that the [StaticType] can be subtype in the normal Dart
sense but also handle the overapproximation when computing sealed
subtypes, a new [WrappedStaticType] is added. This bridges the subtype
relation such that for instance B, when created as a sealed subtype
of A<T>, is both a subtype of A<num> (as it normally is) and of A<T>,
which it is by construction.
Change-Id: I9970c46009938ef15625e1193faf916b7544ce0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284681
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This reduces the memory increase of linearization from ~800MB to ~100MB while still maintaining ~11.5% improvement in runtime.
Change-Id: Ifb30deed9c0104c68adc39a849c656d41229b62d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284600
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Implements the proposed spec for dart-lang/language#2830 and along the way, fixes another change with anonymous mixins erroring in on-clauses.
Change-Id: I15ed7370f9099d9de89d80f5844db76f58fbd216
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284481
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Only resume and confirm breakpoint works one isolate at a time. Pausing large number of isolates at once could exhaust thread pool leading to test timeout.
Fixes https://github.com/dart-lang/sdk/issues/48523
TEST=ci
Change-Id: I7e3a85b797315d7d7f022923d51a5a1a45879880
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284421
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This is a reland of commit f17e9732c5
Original change's description:
> [analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed.
>
> Change-Id: Ia1393851dffaab55c31d04d4e81bfae83a7bd67f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283126
> Commit-Queue: Kallen Tu <kallentu@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Change-Id: Ic8185f38477b2eeff624ee391868d7260e0ed4cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284486
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
This replaces the [Library] parameter from bounds checks and
type inference methods with a `isNonNullableByDefault` parameter,
enabling usage of these algorithms in library-agnostic code, like
features only available post-nnbd.
Change-Id: Id565d00e1c20d25e7e3388badbb2d7f11c015802
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284642
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
This will make compilation server related commands more consistent with
other commands in the CLI.
In order to make use of the compilation server for faster runs, users
will still need to pass `--resident` to `dart run` until we decide if we
want this functionality made more visible.
Fixes https://github.com/dart-lang/sdk/issues/50969
Change-Id: If9855ce1cc614c1c3ea6c4426dd4fad8f45c2495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284500
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
`firstMember.beginToken.previous!.offset` isn't safe when `firstMember.beginToken` is the first Dartdoc, because it's `previous` is null.
Change-Id: I4944da3ffd8b7b43dd5c48db1e8738d787d205a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I15018b1c50b7c3a75b9b0c958ee7cb439b3cd350
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284482
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This unit test makes sure that parenthesizing a variable pattern
doesn't destroy its ability to track the flow analysis consequences of
a boolean expression.
No code changes were are required, since the implementation passes the
test. But prior to
https://dart-review.googlesource.com/c/sdk/+/282482 this test would
have failed, so it seems reasonable to include it as a unit test to
prevent regressions.
Change-Id: If5595a346757e608bc133846062ec37f47bc3e1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284485
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This brings it in sync with the existing implementation in Cider.
In Cider we cannot enfore no-putGet-when-data-exists because of possible
race condition, when data did not exist during `get` by isolate1, but
was put shortly after by isolate2, before isolate1 computed data and
attempted to `putGet`.
Change-Id: I36d9083f204be48e529e675a3f046784375f6fbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
It turns out that some time ago I got rid of the logic that depends on
this; the associated functionality is still there, but it's tracked
automatically by flow analysis via
`_PatternContext._matchedValueInfo`, so we no longer need to track it
in the shared analysis logic.
Change-Id: Ia38e0baf5f599c929aa2000aade41473b997f80a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284480
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
also fix a couple of typos in service.md
TEST=re-ran generate script
Change-Id: I6fb6dbbc3780af14e5721817e20ec0e6370bfc1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284440
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Parameter name hints should always come before any other hints at the same position:
```
f(a: <int>[]);
^ ^^^^^
```
Change-Id: I8ae06c562e80df441fee9d3a8079c0048d01f903
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284641
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
with a distinction between `inlineClassMember` and `extensionMember`.
Fixes#51338
Change-Id: I169c285537754137d5b32effc9697c2b9f4eb5c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283864
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>