The use of the helper removed the creation some unneeded temporary
variables in extension access which is reflected in the expectation
changes.
Change-Id: Ice6afcb223b7740c2555a076c3ddae9a9d4f092d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122394
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Previously, any attempt to promote type A to type B produced type B if
B was a subtype of A, and failed otherwise. But in order to support
promotion of type parameters, we need the ability to produce a fresh
"intersection type" (e.g. `T & int`). The new
`TypeOperations.tryPromoteToType method` makes this possible by giving
the client the opportunity to synthesize the new type when necessary.
Change-Id: If671d5d865f38469a878329180c3a1c94e25a42c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122582
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Passed library name instead of URI to "checkDeferredLoad" in the
generated JS. The URI was only used to report errors on library load at
runtime - the user should be able to to find the URI in the dart import
statemement instead.
Closes https://github.com/dart-lang/sdk/issues/37623
Notes:
- The URI is also stored in the deferred library's source map. If finding
this information on load failure is too inconvenient, we might consider
storing the URI in the main source map as well, and making sure that the
URI is loaded from the source map on load failure at runtime, for better
error reporting for users who have access to the source maps.
- Not sure how much work is needed for this to be done, so leaving this
until the need arises.
Change-Id: I90caa560e7c57c61e810b9ca4cfc648cddba5905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122200
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
readIntoSync does not document what the return type of the function is, though it could be infered from the behavior of the non-sync method.
Change-Id: Ie62b5b4e5ea469a0dc841219f1515ac917325355
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122409
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
Allows for reuse of the standard helpers that create types with and without
NNBD.
Change-Id: I8e16483e704efb47173f56c126311f7d57ece8a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122487
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Rationale:
Using constant, small collections inside subscripts avoids
growing collections too much due to allocating new elements
for every literal. This also allows using non-flat data
structures again in our nightly testing.
https://github.com/dart-lang/sdk/issues/38710
Change-Id: If4bdc72f88f8c7d181709e829d35105a54cf8889
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122423
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
The front end implementation is in a previous CL
(https://dart-review.googlesource.com/c/sdk/+/122415). This CL
contains the analyzer implementation and the integration tests.
Note that the analyzer implementation of null shorting is incomplete,
so some corner cases couldn't be tested. I'll be fixing this in
follow-up CLs.
Change-Id: I0935ee4c67b24f8bf7c70cbb7ec56dd826fbf73a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122416
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Shared snapshots have been disused by Fuchsia deduping.
Reused instruction has been disused by Flutter code push.
Change-Id: Ia4cb570935c233a9365d521ca04a477c5550ef83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This should cycle vm-kernel-precomp-mac-release-simarm_x64 green again.
#gardening
Change-Id: I48b12d7cd015fff75756dc2e2a28ca4f2d98fcbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122390
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: I5d8b02df2d2dad6b53e6365a9d004bed07f4c59f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122387
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Currently the switchable calls require there to be a unique PC -> Code
-> Function mapping to re-construct the arguments descriptor which was
lost when transitioning from unlinked to monormophic.
=> This prevents instruction deuplication in bare mode for those
functions, because the PC -> Function mapping is amgiguous (the
frames don't have a Code object on the stack we can use)
This CL preserves the (name, args-descriptor) per switchable call site when we
go from unlinked to monomorphic state by remembering it in a map. When
transitioning out of monomorphic we can use this map to re-construct the
name and arguments descriptor (and delete the map entry).
Flutter gallery release size impact:
* arm64: total -2.33 % (-3.62% RX)
* arm: total -1.72 % (-2.65% RX)
From local testing it seems like running flutter gallery in profile mode
and connecting via observatory the memory consumed by UnlinkedCall
instances seems minimal.
Change-Id: I55902e6f11c9941493c610ed18f26bc5fc3dcf59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121421
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Previously, it was the caller's responsibility to call initialize()
for any variables declared in a catch block. Now this is done
automatically.
Change-Id: If9c586e12f7d114517476e56e984d16a570648e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122413
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Previously, it was the caller's responsibility to determine if the
subexpression of an "is" expression was a read of a promotable
variable. Now, the caller calls isExpression_end regardless of what
the subexpression is, and flow analysis determines whether promotion
should happen or not.
Change-Id: Ibba689935580d4e9c5ab79e5afb534c173386232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122411
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Binary operations and parenthesized expression are shorted which they
shouldn't be. Also, so complex expressions, like compound assignment,
are not handled because they need to be encoded in a more high-level
internal expression to support choosing the receiver based on shorting.
Change-Id: I0bdeabdc21da7d80f533ea0880662bfb11341c6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121856
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This reverts commit 7eeaeade6b.
Reason for revert: This change requires some changes to he Flutter license script before it can be rolled into Flutter, Since changes on the Dart side are mounting up I am reverting this change so the roll can move forward and then we will reland this change with the right fixes to the license checking script.
Original change's description:
> Reland "Update BoringSSL to 4dfd5af70191b068aebe567b8e29ce108cee85ce."
>
> Change-Id: I7bdc0f0d55af2ecced789f1aa8f37b804641eaf4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121887
> Reviewed-by: Jonas Termansen <sortie@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
TBR=sortie@google.com,rmacnak@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I548844e9d58559e6ed5796dff08f3ab0644c6dc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122410
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
It was used by task model, so is not used anymore.
Change-Id: Ic0031adc8d1784d4e881489318d2a9efe954b9da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122282
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>