This reverts commit 79e0f19f2d.
Reason for revert: Breaks tryjobs because pre-approvals didn't get applied across builders.
Original change's description:
> [infra] Update checked-in SDKs to 2.9.0-10.0.dev
>
> Change-Id: I350c35cd11ab2365e0e2a844c13b92ebc1fa39c9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149285
> Reviewed-by: William Hesse <whesse@google.com>
TBR=whesse@google.com,athom@google.com,askesc@google.com
Change-Id: Ia814e2d6cc7276293a5fca03b499377c37109647
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149324
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
The first compilation result is leaked in two ways:
1) Directly by saving the component in a variable; and
2) Via an unfortunate context thing, probably a variation of
http://dartbug.com/36983. I will update that bug with a reproduction
example later.
The reason this creates a (big) leak is illustrated with an example:
* Say the first component (A) has 10 libraries in it. Each of these
libraries has parent pointers and points (currently) to A, which again
points to all of the 10 libraries.
* We then do a recompilation, say 5 libraries are reused and 5 are new.
They are put into a component (B). We really should have 10 libraries,
the 5 old ones and the 5 new ones (and for simplicity lets say these are
the ones in B). Notice that the 5 old ones will have their parent
pointers updated and also still be in the list of libraries in A.
We keep 15 libraries alive because we have the 10 original ones saved via
A and the 10 (where 5 is new) saved via B.
* We then do a recompilation, say 2 of the same libraries as was also
recompiled before, these end up in compnent C which has 5 libraries from A,
3 libraries from B and the 2 new ones. All of these libraries will have
their parent pointers updated to point to C.
* Because we saved A we keep all the 10 libraries in A though.
Because we saved A and some of the libraries in A had parent pointers
updated to point to B we also keep B and all libraries in B.
Because we keep B and some of the libraries in B had parent pointers
updated to point to C we also keep C and all libraries in C.
So instead of only having the 10 "live" libraries, we have 10 + 5 + 2 = 17
libraries, a leak of 7. With more compilations this keeps happening and
the leak keeps growing.
This CL stops the leak by not holding on to A (which, in turn, stops holding
on to B etc.)
Change-Id: If4f8b1e240b7c39f084df9cb2690570ff26fa9b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149280
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Before this change we would replace unboxed definitions (those with
representation not equal to kTagged) which is too loose and causes issues
in subsequent passes, which assume that replacements have normalised
representation.
After this change we make sure that replacement has a matching
representation.
Closes https://github.com/dart-lang/sdk/issues/35371
Fixes https://github.com/dart-lang/sdk/issues/41971
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I48543893562acf4f8516651196eba7c0c0769a22
Fixed: 35371,41971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103139
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
In the past, negative text offsets were used for instructions shared
by multiple code objects. This is no longer the case.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I85085a06b8c955abb21573caea5554e839154979
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149281
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This reverts commit 9a588de9f4.
Reason for revert: The tests need additional fixes before they can be enabled, and this CL makes it harder to land the support for running
the tests on tryjobs.
Original change's description:
> [co19] Enable tests migrated to null-safety
>
> Change-Id: I738f5be6fe60aa4addb925101eb7f2912627ec8b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148527
> Reviewed-by: Sergey Grekhov <sgrekhov@unipro.ru>
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: William Hesse <whesse@google.com>
TBR=whesse@google.com,athom@google.com,sgrekhov@unipro.ru
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: If758a0041214693aa6cd90f76b3e1a4f4db78c5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149283
Reviewed-by: Alexander Thomas <athom@google.com>
Fixes https://github.com/dart-lang/sdk/issues/42049
We should enable, and test this feature in these tests, I think.
But for now I just need the tests to start passing. I haven't wrapped
my head around how mock-y / end-to-end-y migrate_test is.
Change-Id: I7a2e2034b2a1f42b71d78f4776ee8711071f01f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Our platform .dill files show machine agnostic paths of the form:
org-dartlang-sdk:///sdk/lib/foo/
and with the unfork:
org-dartlang-sdk:///sdk_nnbd/lib/foo/
This change makes the path agnostic of the sdk_nnbd sources as well:
org-dartlang-sdk:///lib/foo/
So that source-mapping tools can find the sources if needed (our sdk_nnbd vs sdk
is not visible on published sdks).
Fixes https://github.com/dart-lang/sdk/issues/41949
Change-Id: Iceea8a917fb9a6e5f305d22ba6ee0927354d4d8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148881
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Adds tests for JS objects with functions with positional and
optional parameters. It does not include named arguments as those
should be statically disallowed.
Change-Id: I24acadc8160d3515bb79b00dc6ab28b528e2b039
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148221
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This doesn't improve the scores in the small app I've been using, but
it does move forward all of the old relevance computation support that
I could find into the new relevance computations.
The other thing done in the old relevance support is some filtering.
For example, in an extends clause, mixins will be filtered out. This
would improve the relevance scores (by reducing the number of
suggestions) but it doesn't seem like it ought to be done as part of
the relevance computation. We should think about a good way to better
filter the suggestions.
Change-Id: Icc671ff033cc5a2d2356c61555844b944d8890b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149204
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Apply the same naming used in the ddc module format to amd modules.
Change-Id: Ib766c20cb35c3c6e11a345e45cba5c49f3a34b3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148941
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
https://github.com/dart-lang/sdk/issues/41905
This repo is added for code generation for dart:html. There are
various instances of APIs being unsupported for some browsers,
and this repo provides metadata on which ones are unsupported.
Change-Id: I6740c022cec46352017c38f7c298581695ad33e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149051
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
In --enable-isolate group is
* turned off, then we have 1<->1 mapping between isolate and isolate
group, so moving the locks should have no impact
* turned on, then we have N<->1 mapping between isolates and isolate
group, mutators need to use the same locks to guarantee exclusive
access (e.g. to symbol table, type canonicalization, type arguments
canonicalization, ...)
This is a follow-up to share the program structure in AOT mode across
multiple isoltes.
In order to move the existing `Isolate::type_canonicalization_mutex_` to
`IsolateGroup` (and thereby make all mutators use the same lock), we need
to remove the `RunWithMutatorsStopped()` usage in the runtime entry.
=> Without this it can lead to deadlocks.
In order to remove usage of `RunWithMutatorsStopped()` we will change
access to the cached type arguments array to use load-acquire barriers
in generated code and store-release barriers in runtime code.
A nice side effect is that it reduces `sizeof(dart::Isolate)`.
Closes https://github.com/dart-lang/sdk/issues/41912
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: Ifd42691524fe41ffe8bb4e2623c5b8c1151de973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148539
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This is a reland of 9c50efcf07
There are no changes to the original CL.
Fixes for bugs revealed by this change are in separate CLs:
* Crash in disassembler
https://dart-review.googlesource.com/c/sdk/+/148942
* Crash in --print_instructions_sizes_to
https://dart-review.googlesource.com/c/sdk/+/149043
Original change's description:
> [vm/aot] Enable tree-shaking of write-only fields by default
>
> Tree-shaking of write only fields is implemented in
> https://dart-review.googlesource.com/c/sdk/+/143286
> This change just enables it by default.
>
> Flutter gallery in release mode
> armv7 app.so size -0.41% (gzip -0.24%, brotli -0.20%)
> armv8 app.so size -0.38% (gzip -0.23%, brotli -0.29%)
>
> Issue: https://github.com/dart-lang/sdk/issues/35310
>
> Change-Id: Iaae3e893b4a6bf4d468d6cd05aba5f8ee8810afc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148543
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
Change-Id: I609db3fec8b0798f55aa2067127dfdc90a21ead4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149044
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This adds tracking of how often type parameters are declared and how
often import prefixes are used.
It also removes the code to convert to and from JSON because we don't
need it.
Change-Id: I7f3b19e9f82bd8aa1b327797726839ff63837795
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Validates that the .dill files provided for dependencies and the SDK
support sound null safety when compiling for strong mode.
Change-Id: Id1f7547a6bc473b901bfce62145cc918353c8ea4
Issue: https://github.com/dart-lang/sdk/issues/41694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149080
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This reverts commit 97d9412996.
Reason for revert: This causes some, probably temporary, issues internally. Reverting for a day or two.
Original change's description:
> Use allowed_experiments.json when building SDK summary.
>
> Change-Id: I3fd73d9890d62cc7b3c19e061069979a6b65c9b7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149052
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
TBR=scheglov@google.com,brianwilkerson@google.com
Change-Id: I9c8142bfc5728dd773830b653bb31d28b5e81628
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149201
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The old RangeError.range message was confusing:
RangeError (index): Invalid value: Not in range 0..2, inclusive: 9
The comma makes the message hard to parse. I've seen a number of
people misinterpret "inclusive" as describing the invalid value (9)
instead of acting as a modifier on the range.
https://github.com/dart-lang/sdk/issues/29586 has a lot of
bikeshedding about this, but in the interest of mitigating confusion
sooner, I propose changing it to:
RangeError (index): Invalid value: Not in inclusive range 0..2: 9
I'm intentionally trying to improve the message with minimal
disruption to the structure of the error message. Although I'd much
prefer that "Invalid value" and the actual value be adjacent instead
of being interrupted by the explanation, such restructuring is rather
non-trivial. RangeError allows the "Invalid value" message to be
customized, and rearranging terms could produce even worse
constructions.
I also considered:
RangeError (index): Invalid value: Not in range [0, 2]: 9
And while I like that that is brief and clear, I chose not to use it
for people who are unfamiliar with interval notation and who might
mistake it as a Dart List.
Bug: https://github.com/dart-lang/sdk/issues/29586
Change-Id: I0f23b195437e4053ae5f76b5d303123979a8c9fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146024
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Test Profiler_ArrayAllocation used the non-existing List.empty()
constuctor.
This fix replaces it with the semantic equivalent List.filled(..).
TBR:bkonyi
Change-Id: I70913803a4d3585cb19a39375b14c1184f047644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149160
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Instead of maintaining separate list of static fields which
needs to be flushed into list of retained fields in Iterate()
keep track of which precompilation phase we are in - and add static
fields into the retained set only if we are in the fixpoint
code generation (aka Iterate()) phase.
Apply the same treatment to selectors as well.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I2c7c7bdf268eaee9623ab1be5cf3eb022991a7c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148403
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Previous variant of the code did not handle FutureOr<T> and Comparable<U>
correctly - variables of these types can contain a smi value if T can be a
subclass of num or if U can be num.
Rename HasNonSmiAssignableInterface to CanReceiverBeSmiBasedOnInterfaceTarget
to better conway its meaning.
Fixes https://github.com/flutter/flutter/issues/57398
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I67b29908e057632e62c46fb327a5c805fcc78d74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149063
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
If there is an exception when checking if a resource exists, it is similar to it not existing. Open to feedback here though, perhaps the issue should be handled more specifically to Windows path requirements.
Bug: https://github.com/dart-lang/sdk/issues/37403
Change-Id: Ic5d4ed0cb22619897c3ccaf46feaadd297b55472
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148701
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Conceptually, this makes sense because a type is not intrinsically top
or bottom or raw, but only in the context of a type system. This also
makes these predicates much more maintainable and puts them in a form
identical to the one at the RTI level.
Change-Id: I83154a82cef6cbaa9c4d0f27cb95f01473c1e015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149049
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
We were passing arguments as just a `Map` and forcing the Message to
handle the String conversion, but the caller is much better equipped to
do it and prevents the dynamic typing.
Change-Id: Icc4ab91edf233b81a64aa3b03462b541349fa751
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149048
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Trampolines which are generated in use_bare_instructions mode should be
taken into account when dumping sizes in --print_instructions_sizes_to.
This change fixes failing pkg/vm/test/snapshot/instruction_sizes_test on
Windows after https://dart-review.googlesource.com/c/sdk/+/148543.
Change-Id: I343f82699407ba54d9ccb9a9800875c61a6e8df3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149043
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Defer representation of function reference until codegen pass.
Not using opaque HForeignCode allows GVN and dead code removal to work.
Change-Id: I481094acca49c8b47d4ed9813a5150cbc8c9e4ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145340
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
If we don't pass the flag explicitly, the code in these tests will be
compiled in NNBD strong mode due to the language version of the
entrypoint.
Change-Id: Id6ed574ad932cf7fb6d9681e1d514e79fb3cbe04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148647
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>