The final TryAllocateDataLocked will consider all free list buckets and a new page. These cases are all covered by the preceding TryAllocateSmallLock (free list small buckets) and TryAllocateDataBumpLocked (free list large buckets and new pages), so this retry will always fail.
Change-Id: I9ba3174d588085130273ee6e7920888d3abca0ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135581
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Fix instance checks for types that are internal to the type system.
Fixes: #40610
Change-Id: I0c6c1bb4d64f25a97c53bd64a3940cf3e9f45c88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135580
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This prevents them from being called dynamically.
Moreover, it prevents asFunction from being called on a non-NativeFunction type argument, simplifying the amount of manual checks.
Note that this CL had to change the CFE and analzyer, and their tests (including mock_sdk) as well.
This can potentially be a breaking change, as the extension methods are only visible when `dart:ffi` is imported, while methods on objects are always visible.
Issue: https://github.com/dart-lang/sdk/issues/35903
Change-Id: I1e291f154228d5d9a34b21a022088bf493f6557d
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135463
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This also removes a hack in StackTrace::ToString() which was skipping
over the parent function (though this was handled only in some cases).
Issue https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ic4232fdd05c998e2c6843339d77a75cbad2aaffd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135682
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
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>