This reverts commit 40eaf81834.
Reason for revert: This CL seems to cause an OOM error in Flutter tests, the Flutter HHH bot also shows failures starting with this CL. Please see https://github.com/dart-lang/sdk/issues/40627 which has an ASAN dump indicating a double free.
Original change's description:
> [vm/concurrency] Remove redundant isolates list, ensure shutdown procedure waits until the isolates actually got deleted
>
> Issue https://github.com/dart-lang/sdk/issues/36097
>
> Change-Id: If24affbb838eff8d80e5d448eac7455b3ffcb3a1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135062
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
TBR=kustermann@google.com,aam@google.com,rmacnak@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I7329a9cccc788e7ae2794639e0c76071fd4d9aa2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135792
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This one was literally only used for a single test. :-/
Change-Id: I316e17ecaf9a839b3c6f27ec86971a67ab52bbfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135782
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Now that they're farther along, there's little need to keep them
separate.
Change-Id: I3dedcf34b97cf5f0645fe429b357a459850d65d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135740
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
There might be a better way to get this information, but if we have a
constructor invocation the identifier is resolved to a class element
rather than a constructor element. This is an attempt to be able to tell
the difference between those two cases.
Change-Id: I6086d53c108686a42162108f764758bb97cffc3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135761
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
So, it is reported even when hints are disabled.
Change-Id: Id2df8faa5421fac00e01755a70aedf3d3f570f10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135492
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This will allow us to see whether any legacy co19 tests are expected
to fail when we unfork the SDK.
Change-Id: If3c1b86a86094e4754e0cff44238edd6d0c5f752
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135623
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Note: This is mostly just the DDC developer patch file.
Change-Id: I98277304b2fbe8fa939dc7e6fb4bd9e0c199b2b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135535
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
NullCheck pc descriptors are added to all dispatch table calls where the
receiver may be null (and the selector is not one implemented by null).
All null entries in the table go to the NullError runtime entry, which
reads the NullCheck pc descriptor to get the name of the called member
for the error message.
Change-Id: I9d2847d0ccdfdb735b06e879916920ec299f39bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134294
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The instruction sequences for dispatch table calls have three versions,
depending on the selector offset relative to where the dispatch table
register is pointing:
- Optimal: Zero offset
- Small: A small range of positive and negative offsets
- Large: Larger positive offsets
The exact limits for small offsets depend on the target architecture.
This commit changes the dispatch table layout algorithm to favor
offsets corresponding to smaller instruction sequences for selectors
with many callsites.
As a result, == (which is by far the most abundantly called selector)
gets the zero offset, and most commonly used selectors (such as [],
iterator, current and moveNext) usually get small offsets on ARM and
ARM64 targets (where the range of small offsets is reasonably large).
Change-Id: I4be9ef8e709c71681b5743084f280ce1673bc0ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132663
Reviewed-by: Martin Kustermann <kustermann@google.com>
For each selector, count the number of calls to the selector that are
both reachable and polymorphic according to the TFA. Only include
selectors in the table with non-zero counts.
This reduces the dispatch table size by 30% in dart2js and by 49% in
Flutter Gallery (312k memory use reduction on ARM64).
Call counts are transferred in a dedicated metadata block with
per-selector information. This mechanism also prepares for transferring
other per-selector information in the future.
Change-Id: Iba15aa4d6c50e67e53c3fd8e542123d3fc98bd07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132603
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Some visitor methods were missing in the TFA transformation, causing
some call sites (such as PropertySet) to not be instrumented with
metadata communicating the analysis results.
Visiting all instance call sites (including PropertySet) is also needed
by table dispatch to collect correct summary information on selectors.
Change-Id: I488d5cd10700666dab05bd5c5304010aa90b1943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135319
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This reverts commit be38459b98.
Reason for revert: Comments in other pieces of the code state that kMinInt should be able to flow into SubImmediateSetFlags.
Original change's description:
> [vm] Arm Assembler simplify code for SubImmediateSetFlags
>
> See https://dart-review.googlesource.com/c/sdk/+/124136/9/runtime/vm/compiler/assembler/assembler_arm.cc#3203
>
> Change-Id: I8d2a1bb781f22d6aae0e02eacf042a203a44790d
> Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-product-arm-try,vm-ffi-android-release-arm-try,vm-kernel-linux-release-simarm-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-bare-linux-release-simarm-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm_x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134333
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,dacoharkes@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Idb6ec6e55256c3a4894179a844d118a41378a074
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, vm-ffi-android-product-arm-try, vm-ffi-android-release-arm-try, vm-kernel-linux-release-simarm-try, vm-kernel-precomp-android-release-arm_x64-try, vm-kernel-precomp-bare-linux-release-simarm-try, vm-kernel-precomp-linux-debug-simarm_x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135645
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Dependency might reside in path with one name but come from a repository
with completely different name.
Change-Id: Ic96ba2d5e32a8a5eeb3fdc44cae732ae35eac22d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135643
Reviewed-by: Jens Johansen <jensj@google.com>
This reverts commit 3d1b8b26c2.
Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.
Original change's description:
> [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
>
> These methods are no longer necessary and all objects should be created
> using Dart_New instead.
>
> Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
After 81d4ac07d4 ([CFE] Use package config v2)
landed the HHH bot hasn't been able to compile.
Hopefully this CL fixes that issue.
Change-Id: Ia3bb983f5a2ccf2539e59452b58058970bb6af1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135641
Reviewed-by: Jens Johansen <jensj@google.com>
Although the old code does not involve deeply nested invocations, it does create one local variable per node, which requires a very large frame. Instead, flatten the tree into a list and re-inflate the tree interpretatively.
Change-Id: I9bbb8f0fe100f1d69daa14a92aa69412c668472b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135444
Reviewed-by: Ben Konyi <bkonyi@google.com>
- Format consistently with a header sentence.
- Use `JavaScript` over `JS`, and surround references to the `@JS()`
annotation with backticks.
- Drop the word "efficiently" since it isn't true of the more commonly
used API `jsify`.
- Add a note about preferring `@anonymous` interop classes over `jsify`
with a map.
- Remove mention of `JsObject` since this isn't what gets returned.
- Clarify that Dart objects can't be used from JavaScript, this is
mentioned at the library level but it worth repeating on `jsify`.
Change-Id: If7582db6440d96f20bb5b4e11bcc0ffe047d9d0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135525
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
Note: This is the DDC convert patch.
Change-Id: I4dbdcc146756a32ddfc12c5bf9e0cc1592f40b69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135442
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
That's the only thing in language_2/async_no_suspend.
A little weird, but I think it's worth copying it just to minimize the
diff between the two test directories.
Change-Id: Iac7078d8e44ac63331c38bd6465a654880bbeb98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134905
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
In order to be backwards-compatible existing Dart API should create
lists using legacy types (instead of lists of non-nullable types).
Issue: https://github.com/dart-lang/sdk/issues/40176
Change-Id: Ie5460b41b2c5e9ecfb124bce1ab43fd466930ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135531
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
These methods are no longer necessary and all objects should be created
using Dart_New instead.
Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
Reviewed-by: Ryan Macnak <rmacnak@google.com>
1. Remove limitation of http response status code check. It used to be [100, 599]. Extends range to [0, 999] to allow users to use customized status code.
2. Rephrase some http exceptions to be more informative.
3. Possibly a bug in isHead setter, where it is only allowed to set to true.
Bug: https://github.com/dart-lang/sdk/issues/38898
Change-Id: I77d8d66eb8333dec1f53742821860b802f74f680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134763
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This now looks in mixins (which were ignored before) and finds matches
from interfaces, reporting the interfaces separately from the superclass
and mixin chain.
Change-Id: Id5f3379261e1ec184dc347abb371693481b65680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135528
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
- Cleanup some instances of `core.Type._check()` from generated code.
- Remove assertions to avoid a bootstrap ordering issue.
- Ensure testing for FutureOr in the SDK before async.FutureOr has been
loaded returns false.
- Make the Null Safety strict mode option false by default.
Issue: #40266
Change-Id: I109432ed5226d8187b600c1d4ba6264d9b2f6a9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135380
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This is a reland of bffc9d101e
Original change's description:
> [vm/nnbd] Enable type testing stubs in NNBD weak mode
>
> According to the current NNBD spec we should use legacy subtyping rules
> when running in weak mode (disregarding nullability and accepting 'null'
> in type casts). So we can reuse exactly the same type testing stubs as
> we used before (in NNBD weak mode).
>
> Change-Id: I387660fc2c8b36eb993239de9e34cc2bf9f7bb93
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135381
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>
Change-Id: Id40fe1465e480caaca1ab568664d2c45c96539a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135526
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Change-Id: I7a06dbeacbf389ecfb343528652c9ec2ba545745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>