This adds dependencies on the perfetto, protobuf, and protobuf-gn repos on fuchsia.googlesource.com.
Change-Id: Ib196587e4cacb7e95c5ca284539fcd578d09d16b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278200
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This method is used for declared variable patterns, list patterns, map
patterns, record patterns, object patterns, and wildcard patterns to
cause the value being matched to be promoted.
As a temporary measure it's also used for cast patterns; this will be
fixed in a later CL.
Change-Id: Iccc9ce4a53e2a10753847f9ecade091f1b230111
Bug: https://github.com/dart-lang/sdk/issues/50419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279653
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The tables of subtypes and "factor" results used in testing the shared
analysis logic were becoming unwieldy and difficult to maintain.
Replace them with implementations of the subtype and factor algorithms
from the spec.
Change-Id: Ic607c3fda45a69661e094292a38a7bc8fd22859a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279748
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The internal Dart Ids can be 64 bit integers, and are passed to Dev Tools as integers. This is causing errors fetching requests as the ids can overflow once they get to dev tools.
Interaction between `getHttpProfile` and `getHttpProfileRequest` are already performed in https://dart-review.googlesource.com/c/sdk/+/279122/3/pkg/vm_service/test/get_http_profile_test.darthttps://github.com/flutter/devtools/issues/2860
TEST=The original tests test the surface of the RPCs that are updated here. Any tests that needed tweaking have also been fixed
CoreLibraryReviewExempt: Changes are only to http profiling
Change-Id: Ie560dde7629f91f4221c1fe18d153cd999691086
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279122
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This helps to improve the code quality in for-in loops
where iterable has a known List type.
Closes https://github.com/dart-lang/sdk/issues/48433
Tested: tests updated due to line number changes in list.dart
CoreLibraryReviewExempt: no public API changes
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: Ia5d815009a699061961c331cf43e68d2c96fc58b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279518
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Inlined functions might contain call-sites which can be devirtualized
in the context of the caller. To achieve that we add a pass which
calls canonicalization on all dynamic calls (and their data
dependencies) between rounds of inlining.
More specifically this helps cases which require interleaving
some redundancy elimination and inlining to remove the cost of
abstractions. The primary example is for-in loop with an array of
a known type which usually requires inlining `get:iterator` and
propagating iterable value through interator's fields to specialize
and inline `get:length` and `operator[]` on the `Iterable`.
See https://github.com/dart-lang/sdk/issues/48433 for example.
TEST=vm/dart/devirtualization_during_inlining_il_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: I1fae50484a111f8c21c81bcf0c3d6a63a856338a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279517
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
* Add rule forwarding stores to non-late final fields to
consequitive loads.
* Allow specialization of InstanceCall with an empty ICData in AOT
mode.
Additionally rewrite regression test for 836c04f using explicit
block building. The source based test was too fragile and sensitive
to various optimizations.
TEST=vm/cc/IL_Canonicalize_FinalFieldForwarding,vm/cc/IL_Canonicalize_InstanceCallWithNoICDataInAOT
Bug: https://github.com/dart-lang/sdk/issues/48433
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: Icb766d48ebaed6626c8d010f528fa6d82c432930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279515
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Don't upload riscv64 checked-in SDKs unless a dev version is specified.
This means gclient will not have a checked-in SDK for riscv64 checkouts
unless pinned to a dev version of the checked-in SDK.
Change-Id: I718c022228a8430d5d6b27f8a3d0f728b616c553
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279707
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Actually, for `Expect.fail`, the return type is kept as `void`, as
changing this to `Never` would apparently change a lot of static
analysis of language and co19 tests. It seems the `@alwaysThrows`
annotation is no longer (or was never) relied upon for static
analysis (usually around dead code analysis).
Bug: https://github.com/dart-lang/sdk/issues/49583
Change-Id: I6d9daaa1d290ab0322a529faaf9574fe83b9cd25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279742
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This is consistent with the analyzer implementation and more intuitive
to work with.
In a follow-up CL I'll be adding logic that performs additional
manipulations on record types, and this change will make that CL
easier.
Change-Id: I4a0592e240a98f62d3730068600a84adeddfe09d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279656
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is a reland of https://dart-review.googlesource.com/c/sdk/+/279180.
This removes the anonymous constructor lowering, as the jsify
semantics are not the same as what we have today, since we do no
conversions today. This avoids the breakage in Flutter where we
convert a Uint8List in jsify.
Change-Id: I7eb4ffbd3258abdf6c1aea2035f7dab0336d4851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279231
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Right now the analyzer clears out the string canonicalization cache
after each file parse.
Similarly when the analyer serializes various information into
*.{unlinked2,linked,resolved} files & deserializes them again, it will
only have canonicalized strings per unit.
This means that strings that are common across compilation units will
exist many times in the heap, thereby increasing memory consumption of
the process.
This CL tries to avoid that by
* Using one string canonicalization cache across CFE & Analyzer
* Making the string canonicalization cache remember how often an entry
was used
* Pruning the cache instead of clearing it: We keep the most frequently
used elements while maintaining a cache that is <= 5 MB.
* Change analyzer code to use the string canonicalization in various
places to avoid many duplicate strings in the heap.
When running analyzer on flutter (and it's transitive code), the
analyzer itself has a heap of around 610 MB.
This CL reduces the memory consumed by strings from ~43 MB to ~33 MB
(~ 20 MB are alone dart source files which are unique). We do this at
the expensive of maintaining the string cache, which costs around 2 MB.
That leads to 8 MB of savings.
TEST=ci
Change-Id: Ic28d70492ab0d376e10714c7ecf2c258c790a022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255245
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Closes https://github.com/dart-lang/sdk/pull/50860
GitOrigin-RevId: b27066c37f93c8c6d1123d6ebd6a4c0afcf59844
Change-Id: I15fa4aea1dad45daf168e34d1c4450320ec9b40a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277742
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This reverts commit 391ce71a0f.
Reason for revert: This seems to be the root cause of test failures
on unrelated CLs. It also seems that this is one reason that can
make app-jit snapshots no longer deterministic.
More information will be posed on:
https://github.com/dart-lang/sdk/issues/51125
Original change's description:
> [vm] Use a weak set to represent dependent code.
>
> Fixes a scaling limitation where compiling N functions using the same guarded field or CHA guarded interface will result in O(N^2) comparisons when registering the dependencies.
>
> TEST=ci
> Change-Id: Ic48f29fa0ce8f43a6f60bc00fa95a60763d333a0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278943
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I823365b2c30906c40f77c6ef186b636b7fdc5691
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279760
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
A variable or wildcard pattern should only promote the scrutinee if
the expression is being matched is the scrutinee. If the variable
pattern is a subpattern, no promotion should occur.
E.g. promotion occurs here:
f(Object? x) {
if (x case int _) {
// `x` is promoted to `int`
}
}
But not here:
f(Object? x) {
if (x case num(sign: int _)) {
// `x.sign` is known to be an `int`, but `x` is simply a `num`.
}
}
Change-Id: Iaa5bab8ce5b81db9d5496ac0bf2ee10473302371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279641
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Delete some very old historical files
Change-Id: I9fffc84d0c1a6b0e4731d360418599390d5470df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279649
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
with `UNNECESSARY_NAN_COMPARISON`
Fixes#50481
Change-Id: I29f2a924a62cbfd5c90c9578338d111a40d9207c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>