This uses the context type when creating the space for a cast pattern
to include the implicitly covered subtypes in the space. This is done
when the context type is a sealed type which means that we can reason
about which of the subtypes of the sealed type that are implicitly
handled by the throw of the cast.
Change-Id: I3a4f14bf6ca82f59a2c2a3c27bb472a8f38c1613
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289222
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
The Maps are all JSON, so they become `Map<Object?, Object?>`.
Most other types get a `Object` or `Object?` type argument, and a
few also get `dynamic`.
Change-Id: I097318defed55360b5b0d910bd2d085a121e97b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287673
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
- Adds a new flag, `--suppress-analytics` to the `dart` command to
disable both the unified and the legacy analytics for a single
session while deprecating the existing flag, `--[no-]analytics` used
for disabling the legacy analytics on a single pass.
- Pipelines the flag from `dart` through `dart analyze` and `dart fix`
to the execution of the analysis server.
- Updates all applicable uses of `dart analyze`, `dart fix`, and the
analysis_server binary entry points in the SDK to disable analytics
for the test infrastructure.
Bug: https://github.com/dart-lang/sdk/issues/49445
Change-Id: I1302cad7e04b21454aa7d9e8ee72a876b231377d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287661
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Having this hard coded means that older SDKs will forever put in a bad constraint, which will ultimately cause webdev to fail initially for all new projects created by those SDKs.
Bug:https://github.com/dart-lang/sdk/issues/51732
Change-Id: Icfbeda77662f62124e350b0f55c5a59b864c689f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289260
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
The recent change [1] improved availability of static types.
While that change improved performance on a lot of benchmarks,
it also caused a regression of SkeletalAnimationSIMD
benchmark in JIT mode.
The benchmark regressed because:
* When inlining a recognized method in call specializer,
compiler checks if an extra CheckClass instruction should be
inserted using FlowGraph::CheckForInstanceCall.
* CheckForInstanceCall has been looking only at the static type of
the receiver. When static type is absent, it is calculated from cid.
For a method lookup, cid is more precise compared to a static type.
So, when static type becomes available since [1], cid was no longer
used and extra CheckClass instructions were inserted to the IL.
* During inlining, extra CheckClass instructions increased callee size
and a useful inlining didn't happen, prohibiting other optimizations
and causing the regression.
This change fixes CheckForInstanceCall to look at the cid
first before looking at the static type.
[1] https://dart-review.googlesource.com/c/sdk/+/287222
TEST=SkeletalAnimationSIMD benchmark
Change-Id: I8cb496dee443eab9db828f1e28ba1efe7ea3f8ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289020
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Instead of finding the current library through the parents relation
we use the static type context which already had access to the
library.
Change-Id: Ia2116160b24b701ffa0794b9ccc9a59506c3adc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288840
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This removes the "unset" values and uses nullable types instead.
The names and uses of the pattern fields are normalized, using
`matchedValueType`, `requiredType` and `lookupType` consistently
between [Pattern] subclasses.
TEST=existing
Change-Id: Ic79ce17075aa8ce252e1c223b59bef660f32bb7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288704
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Change-Id: I00752198daceccf41d688f5aeb3bb8595e91d78b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289040
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Currently users can enable analytics using the unified analytics package in VS Code, but there is no option the disable from the UI. Adding this allows users to disable analytics by running `dart --disable-analytics`.
Change-Id: Ieff4281ab3fbdccee7ec7a05b185f5c4f9da6f76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289082
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
This passes the [StaticType] for the context of a pattern to the
pattern converter. This is used to restrict the static type of the
created space. For instance when creating the space for an untyped
wildcard pattern, the context type will be used instead of the
nullable-object (top) type. For other patterns, if the context type
is a subtype of the type for the pattern itself, the context type
will be used instead.
This has the benefit that when checking for unreachable cases we will
not take a too broad case to mean that it has some that it could match.
For instance in `Foo(:var hashCode)` the space for `var hashCode` would
have been the nullable-object type, and if the preceeding case was
`Foo(:int hashCode)`, the reachable check would fail to see that all
cases are covered since nullable-object is not a subtype of int.
With this change, such cases are now handled.
Change-Id: I5b6248bf79c8cf0b365eee2f3ca78090c3f43512
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288902
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Revisions updated by `dart tools/rev_sdk_deps.dart`.
args (9305d5a..7a5e3b0):
7a5e3b0 2023-03-14 Devon Carew update readme; add contributing doc (#237)
benchmark_harness (a6a0891..725534a):
725534a 2023-03-14 Kevin Moore Spelling fixes, latest lints, move to minilibs (drop parts) (#85)
csslib (b671738..d32bdd4):
d32bdd4 2023-03-14 Devon Carew refactor the package example (#170)
dartdoc (98fa859..7fde7a4):
7fde7a4d 2023-03-13 dependabot[bot] Bump github/codeql-action from 2.2.5 to 2.2.6 (#3363)
http (805a147..74f9d3d):
74f9d3d 2023-03-09 Brian Quinlan Add conformances test that verify that the Client works in Isolates (#889)
ee03604 2023-03-09 Brian Quinlan Add a flag to allow the default Client to be tree shaken away. (#868)
2039fb3 2023-03-09 Brian Quinlan Fix a reference count race with forwarded delegates. (#888)
shelf (e3cfe79..9a792b4):
9a792b4 2023-03-13 Kevin Moore Update format for latest v3 SDK (#340)
c8094b7 2023-03-13 Kevin Moore Update no-response.yml - once a day (#339)
webdev (cfe9753..a15fde0):
a15fde0 2023-03-15 Anna Gringauze fix matching record types (#2032)
05031da 2023-03-14 Anna Gringauze Update build_daemon constraint and log errors (#2029)
49013b8 2023-03-09 Elliott Brooks (she/her) [MV3 Debug Extension] Fix authentication issue for the Dart Debug Extension (#2026)
c8d4439 2023-03-09 Elliott Brooks (she/her) Support `Set` inspection in DWDS (#2024)
442639d 2023-03-08 Elliott Brooks (she/her) Handle unexpected extension debugger disconnection events without crashing app (#2021)
yaml_edit (6abc42a..fbc5cb3):
fbc5cb3 2023-03-09 Kevin Moore Require Dart 2.19, update to latest lints
c9e82f0 2023-03-09 Mohamed Ishad Fix YamlEditor.update method leaving trailing spaces at eol (#42)
Change-Id: Ia79a056cfaf7e51e73fdc6fd353e5f1938e6881a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289023
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
* Was missing a json_annotations import in the first lib.
* Indentation.
Change-Id: Ib0c4ffad18871a23796676e3cd4d297017fd47b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288982
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Unboxing of records in return values is switched to use inferred record
shape instead of a static type. This is more accurate, as
static return type 'Object', 'dynamic' or a type parameter would
not prevent record unboxing.
TEST=runtime/tests/vm/dart/records_return_value_unboxing_il_test.dart
TEST=pkg/vm/testcases/transformations/type_flow/transformer/unboxed_records.dart
Issue: https://github.com/dart-lang/sdk/issues/49719
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I56528e114bc2de94c4a1ec09c48eb5b9ed3c3d3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288824
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: I8f9de631a5fc33a811b1a4355337a0efd6c1ce00
CoreLibraryReviewExempt: dartdoc comment only changes to core libraries, reviewed by Lasse
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288600
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>