This should look for `dyn:call` instead of `call`. If it was a non-dynamic call, we would hit an invoke-field-dispatcher instead.
TEST=ci
Bug: https://github.com/flutter/flutter/issues/116405
Change-Id: I98c441fec2eb53ab23ac1dd52db3aa4eaa5cbc6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274265
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
AsmIntrinsifier::OneByteString_getHashCode now uses the CombineHashes
and FinalizeHash Assembler methods introduced in 49f998dc31.
To avoid having to check for 0 again after masking the result of
FinalizeHash to fit the desired bit size, we create a more general
FinalizeHashForSize that also takes the desired bit size of the result.
The intrinsified versions for ARM/ARM64/RISCV are also modified to
remove the special casing for the empty string, and instead just check
the size of the string against the loop counter at the start of the
loop, similarly to X64/IA32. This is less efficient for the empty
string case, but avoids the need to create a version of FinalizeHash
that elides the zero check.
TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simriscv64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-nnbd-linux-debug-simriscv64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-ia32-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-ia32-try,vm-kernel-nnbd-mac-release-arm64-try,vm-kernel-linux-debug-x64c-try
Change-Id: I53db731acb8bf35d16efb55fa2c5a79d8302399f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272800
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Since Dart 2.0 we can never have FallThroughErrors.
The CFE does not synthesize breaks unterminated cases which never
reach the end of the block. For example:
* Call to something that returns never.
* Nested complete switch which returns from every branch.
In these cases we need to construct a correct control flow in the VM,
even though it is dead code. Because the CFE does not make the outer
switch a labelled statement, we cannot find a jump target in the VM.
Therefore, throw something (just not a FallThroughError). This should
never be hit at runtime, because it's dead code.
When the CFE emits synthetic breaks, we can remove this workaround.
TEST=build SDK and run default suites.
Bug: https://github.com/dart-lang/sdk/issues/50595
Change-Id: I595dd3baf7253b0ac4931445bd5b6da49e84cae4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273740
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
```
import 'dart:typed_data';
@pragma("vm:never-inline")
fetch(l, i) => l[i];
main() {
const n = 16*1024*1024;
final l = ByteData(16 * n).buffer.asFloat64x2List();
for (int i = 0; i < n; i++) {
fetch(l, i);
}
final sw = Stopwatch()..start();
for (int i = 0; i < n; i++) {
fetch(l, i);
}
print(sw.elapsedMilliseconds);
}
```
on x64
before 1137ms
after 101ms
BUG=https://github.com/dart-lang/sdk/issues/50636
TEST=ci
Change-Id: I90ef8ccfa1161d4d8bb076a3c1a0e3c7d6521289
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274263
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Right each `Pointer.fromFunction()` invocation will lead to creation of
a new ffi trampoline function & it's following JITed code. In AOT we
have exactly one ffi trampoline per target/native-signature/exceptional-return
combination.
=> This CL ensures we have only one such function.
Furthermore each `Pointer.fromFunction()` will currently perform 2
runtime calls in JIT: One to create a `Function` object, the other to
JIT that function & register callback metadata.
=> This CL ensures we won't do a runtime call to get a function, instead
do it at compile-time (as in AOT)
Furthermore we eagerly assign a callback-id to the unique/deduped ffi
trampoline callbacks. Only when the application requests a pointer, do
we populate metadata on the `Thread` object.
This CL doesn't (yet) change the fact that in JIT mode we have
isolate-specific jit trampolines (that will call now shared ffi trampoline
functions).
We also avoid baking in C++ runtime function pointers in generated
code. As a result we can now preserve ffi trampolines across AppJIT
serialization.
As a nice side-effect, we remove 100 lines of code.
TEST=ffi{,_2}/ffi_callback_unique_test
Issue https://github.com/dart-lang/sdk/issues/50611
Change-Id: I458831a47b041a088086f28f825de2a3849f6adc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273420
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
The JIT support for dynamically unboxing has been removed in [0]. As
such all double/float32x4/float64x2/int32x4 objects are immutable and
can therefore be shared across isolates.
[0] https://dart-review.googlesource.com/c/sdk/+/256211
TEST=ci
Change-Id: Ifd4e7c2444415b2e3b5269d9fbeb6570cc5d6768
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273680
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
- Flip flag to make strong null safety the default
- Remove code that auto detects null safety mode from source files,
it is necessary to specify --no-strong-null-safety to opt out.
- Retains sniffing of AOT/JIT snapshots and kernel files to determine
null safety mode, the opt out has to be done when generating these
file.
TEST=ci
Change-Id: If2c9608eedb7c46d9c3cd85e261ee9640e0d28eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261140
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
At the end of a scavenge, ObjectPtr::IsRawNull was used on what is either a pointer into old-space or a pointer into from-space. If a pointer into from-space, the header may be a forwarding pointer. When IsRawNull interprets this is an object header, the bits in the ClassIdTag position will sometimes happen to equal kNullCid, causing the pointer to be incorrectly interpreted as null instead of a forwarding pointer and thus leaving behind a dangling pointer into from-space.
This separate null check can simply be removed because null is always an old-space object.
TEST=splay_{weak/c_finalizer/dart_finalizer}_test
Bug: https://github.com/dart-lang/sdk/issues/50578
Bug: https://github.com/dart-lang/sdk/issues/50612
Change-Id: Ifc7dc19c36703222a9302a8dbb68982fdbbc91fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273560
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
RegExp code objects keep backtracking and registers stacks in object pools, can't be shared between isolates.
BUG=https://github.com/dart-lang/sdk/issues/50082
TEST=one_regexp_many_workers
Change-Id: Ic7db8d7a75a0951178b2f4800f96224d52506545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
When the heap limit is reached, directly unreachable objects are reclaimed but objects that will be unreachable after a finalization are not, and there needs to be enough headroom between opportunities for finalizers to run (returning to the event loop).
So only do the finalization thing with the upper, high-mutation part of the splay tree and remove it from the lower, write-once part. The high-mutation part is what's more interesting for GC stress testing.
Bug: https://github.com/dart-lang/sdk/issues/50597
Change-Id: Id02b38b0ac1e9bb640954ef1b686ce3eef8370af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273300
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
4-byte ldar zero extends, so can just use kObjectBytes here.
TEST=ci
Change-Id: I3b3aa792350100fd24c474c85d8ea1613c9f197b
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273242
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Allows embedders to programmatically request heap snapshot from a
running isolate group instead of relying on a vm-service or hidden
internal Dart APIs
Additionally we allow to include snapshot writing functionality into
PRODUCT builds using DART_ENABLE_HEAP_SNAPSHOT_WRITER define.
TEST=vm/cc/DartAPI_WriteHeapSnapshot
Bug: b/259115846
Change-Id: Ic3ef76e5fb9adcf8f23a1959f5238742b64ecde2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273181
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Lower the threshold for converting from a linear to a hash-based cache
on most architectures from 500 to 10.
Due to register pressure, the InstantiateTypeArguments stub on IA32
continues to go to the runtime for hash caches, and so we do not
lower the threshold for converting to a hash-based cache there.
The following are benchmark results for those benchmark that use enough
Instantiations to trigger the use of hash-based caches. In the following
tables, "Results 1" denotes the benchmark results from only this change,
whereas "Results 2" include from comparing to the results prior to
4f925105cf, when only linear caches were used.
Dart AOT:
* InstantiateTypeArguments.Instantiate100
Arch | CPU | Results 1 | Results 2
-------|----------------|-----------------------
ARM | Odroid-C2 | 382.8% | 381.5%
ARM | Raspberry Pi 4 | 486.7% | 449.2%
ARM64 | Odroid-C2 | 328.1% | 372.8%
ARM64 | Raspberry Pi 4 | 1283% | 1281%
ARM64C | Raspberry Pi 4 | 2353% | 2811%
X64 | Intel Xeon | 568.7% | 584.9%
* InstantiateTypeArguments.Instantiate1000
Arch | CPU | Results 1 | Results 2
-------|----------------|------------------------
ARM | Odroid-C2 | 743.7% | 3821%
ARM | Raspberry Pi 4 | 486.7% | 3218%
ARM64 | Odroid-C2 | 584.7% | 3222%
ARM64 | Raspberry Pi 4 | 430.7% | 8172%
ARM64C | Raspberry Pi 4 | 491.4% | 16699%
X64 | Intel Xeon | 954.1% | 5528%
Dart JIT:
* InstantiateTypeArguments.Instantiate100
Arch | CPU | Results 1 | Results 2
-------|----------------|-----------------------
ARM | Raspberry Pi 4 | 315.7% | 295.1%
ARM64 | Raspberry Pi 4 | 1070% | 1058%
ARM64C | Raspberry Pi 4 | 1769% | 2095%
X64 | Intel Xeon | 507.4% | 496.2%
* InstantiateTypeArguments.Instantiate1000
Arch | CPU | Results 1 | Results 2
-------|----------------|-----------------------
ARM | Raspberry Pi 4 | 565.2% | 2550%
ARM64 | Raspberry Pi 4 | 406.8% | 7375%
ARM64C | Raspberry Pi 4 | 379.6% | 12996%
X64 | Intel Xeon | 807.9% | 4459%
During work on this change, an issue was found where cache lookups
in the stub on ARM64C always failed and went to runtime, even with
the old linear-only caches, hence the much larger performance gains
in those rows above.
TEST=vm/cc/TypeArguments_Cache_{Some,Many}Instantiations
Fixes: https://github.com/dart-lang/sdk/issues/48344
Change-Id: I3d29566ba0582502954c9fc59626ceb8fd40317a
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simriscv64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-tsan-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-nnbd-linux-debug-simriscv64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-ia32-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-ia32-try,vm-kernel-nnbd-mac-release-arm64-try,vm-kernel-linux-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270702
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 86233b55bc.
Reason for revert: https://github.com/flutter/flutter/issues/115719
Original change's description:
> [vm] Skip filtered class earlier in source report.
>
> The main benefit of this is that it avoids cls.EnsureIsFinalized for
> skipped classes. In some cases (eg very small tests with dependencies
> on very large 3rd party packages, such as flutter) this can reduce
> coverage collection time by 20%.
>
> Change-Id: Id756af7f2d2ecdd07a5d1d05a400cea4de7ec408
> Bug: https://github.com/flutter/flutter/issues/100751
> TEST=CI
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266640
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/flutter/flutter/issues/100751
Change-Id: Ie1e9f29fa6e3966f25040aebad8cb1d55b50a745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273100
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This reverts commit c870932e45.
Reason for revert: We have a build failure on arm64c
../../third_party/dart/runtime/vm/virtual_memory_compressed.cc:143:35: error: out-of-line definition of 'Contains' does not match any declaration in 'dart::VirtualMemoryCompressedHeap'
TEST=ci
Original change's description:
> [vm, gc] Assert the whole object is in to-space, not just its beginning.
>
> TEST=ci
> Bug: https://github.com/dart-lang/sdk/issues/50564
> Change-Id: I60e7637600a1a7a99d546e8c674901175a119ba5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272863
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I62c83c8e8fa5b263bdc53d2afcf27b1fdd07c087
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/50564
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273060
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Auto-Submit: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
These elements were unintialized in the uncommon case that the new array was large enough to get its own page.
Broken in 188dfbd52b.
TEST=ci
Change-Id: I8b07da992aa11eed9c80b6eac3a7fd6716cb3abc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272961
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
When a FinalizerEntry's target gets promoted, the associated external size needs to also get promoted. We were handling the cases where the FinalizerEntry itself was either already old or remained new, but not the case where it was promoted. Failing to promote the external size meant that when the finalizer was collected, external size was subtraced from old space that was still being attributed to new space, so the old space total external size became negative.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/50537
Change-Id: Id2fe2d748311de73f04de367c9cd153d87b74ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272350
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Closes https://github.com/dart-lang/sdk/pull/50567
Co-authored-by: Jakub Vrána <jakub@vrana.cz>
Tested: Standard CQ
GitOrigin-RevId: b916722ddc03d2b57bae6f51122ee1e7af2486b4
Change-Id: I4f638e7262009744504f0b263bf7a8e23549e5bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272380
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Functions returning non-nullable records of 2 fields can now return
them as separate values on 2 registers. This postpones and sometimes
eliminates creation of record instances. As other unboxing
optimizations of return values, this optimization is only
performed in AOT.
Pair of values for an unboxed record are represented using
kPairOfTagged representation, which can be now used for the input of
Return and for the output of StaticCall/InstanceCall
PolymorphicInstanceCall/DispatchTableCall instructions.
In order to combine separate values for Return, a new MakePair
instruction is added. Extracting separate values from the result of
a call is implemented using existing ExtractNthOutput instruction.
Benchmarks (AOT mode):
MultipleReturns.Forwarded.Record +45-57%
MultipleReturns.Forwarded.RecordNamed +43-57%
MultipleReturns.NotInlined.Record +58-79%
MultipleReturns.NotInlined.RecordNamed +53-76%
TEST=runtime/tests/vm/dart/records_return_value_unboxing_il_test.dart
TEST=benchmarks/MultipleReturns/dart/MultipleReturns.dart
Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I7117b19a134c1db0ba5117a1ef093867f9ba20e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269100
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Ensure padding around data and length fields for these strings is zeroed-out, allowing for comparison to be done in word-sized chunks.
For configurations where the hash is not in the header, swap the length and the hash in string class so that the length is adjacent to the data.
x64
===
LongStringCompare.2.3000reps 109.2%
LongStringCompare.32.1000reps 526.4%
LongStringCompare.1024.30reps 670.1%
===
ia32
===
LongStringCompare.2.3000reps 90.68%
LongStringCompare.32.1000reps 274.5%
LongStringCompare.1024.30reps 211.4%
===
arm64
===
LongStringCompare.2.3000reps 89.28%
LongStringCompare.32.1000reps 454.5%
LongStringCompare.1024.30reps 677.7%
===
arm
===
LongStringCompare.2.3000reps 68.76%
LongStringCompare.32.1000reps 330.9%
LongStringCompare.1024.30reps 426.8%
===
BUG=https://github.com/dart-lang/sdk/issues/50190
TEST=string_equals_test
Change-Id: Ia4ab9bcb4daca5d4f403e0ece364bb6aafb68577
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269600
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Previously, the VM used a linear array to cache previous instantiations
of a type arguments object. Now once the cache hits a certain number
of occupied entries, the VM changes to using a hash-based approach.
The InstantiateTypeArguments stubs have not yet been updated to
traverse the hash-based cache, so once the cache has grown too large,
all attempts at instantiations, even those that are in the cache, go to
the runtime. Thus, until the stubs are updated, this is only an
improvement if the cost of traversing the linear cache dominates the
cost of making a runtime call. Our benchmarks see a ~40% performance
regression for hash-based caches of size 100 but a ~400% performance
improvement for hash-based caches of size 1000. Thus, we currently
split the difference and set the maximum size of linear caches to 500.
TEST=vm/cc/TypeArguments_Cache_ManyInstantiations
Bug: https://github.com/dart-lang/sdk/issues/48344
Change-Id: I7f1376943523bb5bcd8b175cfb1936779ea73d60
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simriscv64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-tsan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265325
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
All `Pointer`s will now have the `Never` type argument at runtime.
TEST=tests/ffi(_2)/*
Bug: https://github.com/dart-lang/sdk/issues/49935
Change-Id: I83c8bba9461c2cab22992ba2e3cf42b7b5f43c36
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-precomp-win-debug-x64c-try,vm-kernel-mac-debug-x64-try,dart-sdk-mac-arm64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272201
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This CL introduces new embedding APIs for supporting heap sample
profiling. A registered sampling callback is invoked approximately every
N bytes based on an exponential distribution, providing information
about the isolate group the allocation occurred in, the user visible
name of the allocated object type, a weak persistent handle to the
allocated object, and the size of the allocation.
Sampling is triggered using artificial TLAB boundaries to cause
allocations to be sampled to take the allocation slow path where the
registered callback can be invoked with the allocation information.
Only new space allocations are currently traced, with old space
allocation support to be added in a future CL.
TEST=Dart_HeapSampling
Change-Id: I22bcdeec6e823bc1ab44898d4c596fbed7169fa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264520
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Add AwaitExpression.runtimeTypeCheck to support easy backend
implementation of runtime type check.
In response to https://github.com/dart-lang/sdk/issues/49396
TEST=pkg/front_end/testcases/general/issue49396.dart
Change-Id: I13b9b14566ebc34cdb0811c16a262421417b68e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270723
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
These have always been able to return non-Instances.
TEST=ci
Change-Id: I13e46aae8705ea1f79ec0618cdb815a8ed9c0fdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270461
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>