Breakpoints are still set in compiled bytecode.
When the interpreter is used, breakpoints are set in both interpreted and
compiled bytecode, as before.
This fixes service/breakpoint_async_break_test in app-jit mode.
Change-Id: Ia60f6f99497821b476b664fe8b86ee4aa15748a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116840
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Previously, BytecodeLocalVariablesIterator::IsDone() returned true
when iterator was standing at the last entry.
As a result, if the last entry is a scope without variables, then it was
ignored and bytecode flow graph builder would not get a correct context
level for that scope.
The fix is for IsDone() to return true only after stepping past the last
entry.
Fixes service/async_generator_breakpoint_test/1 with bytecode.
Change-Id: I768eec9a0e43342cc0f155a6c35cb3de50f3d14a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116880
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Fix an AOT call specialization that broke this relationship.
When printing environments in the FlowGraphPrinter, also print the
underlying value for any PushArguments.
Change-Id: I39803b7d995abac720702ea4b9d6a78fcbc45d4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115981
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit c8f3f132ad.
Revert "[vm] Fix CoreSnapshotSize and StandaloneSnapshotSize to account for the image page size."
This reverts commit 1d6ab52f38.
Bug: b/140791872
Change-Id: I34c42310e3ec4a09048967f34a0e1ddc6a67ea93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116688
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Rationale:
OSR was happening in a field initializer, but the kernel
binary flow graph builder assumed this never happened.
With regression test.
https://github.com/dart-lang/sdk/issues/38248
Change-Id: I91243b4422cac76ec7ee2460d466bd0e1cf608ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116558
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
In interpreteted bytecode mode, _AsyncAwaitCompleterStart does not use
_ClosureCall to invoke the async_op function. Adjust expectations in debugger
when collecting async stack trace.
Refactor computation of try_index in interpreted mode.
Fixes service/pause_on_unhandled_async_exceptions_test in interpreted mode.
Change-Id: Id13c36e2616e55911f77eb4db2591861d337d24a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116556
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
This function has been unused for a long time.
Also, computing fingerprints for bytecode function causes bytecode to be loaded, which can lead to an old enum class being initialized with enum values for the new enum class, causing a forwarding loop when migrating enum values.
Change-Id: Iad9b2bb11aaf161d66f7752cb99cc4b4fc9fb310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116442
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
LoadClassById no longer tags class_id register as side-effect. This change
was missing for arm64 in ef9d699f.
Change-Id: I92278b01ec2211dc9be860c1a5386ecd4253fb0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116526
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Right now there is only one mutator working on a heap and it can
therefore access the heap's weak maps without locking. The GC is the
only other user of the weak maps and it accesses it within a safepoint
operation scope.
Once we move the heap to the isolate group there can be concurrent
accesses to the weak maps. As a preparation step this CL adds locking
around the non-GC API.
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: I84acce24612b12a7393154cab816f0eff9c7589a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116201
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This CL moves heap related information (namely instance sizes and
allocation stats) out of the [ClassTable] into a [SharedClassTable].
Both classes are always in sync (i.e. they have the same number of entries).
This CL also changes GC related code to start using the size information
from the new [SharedClassTable].
In a futher step we will move the heap as well as this shared class
table out of the [Isolate] and into [IsolateGroup].
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: Id54a89c9251ad3bbc13e60d32dc4f7bcc7f1d805
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116064
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This fixes service/pause_on_unhandled_async_exceptions_test in compiled bytecode
mode, but not yet in interpreted bytecode mode.
Improve debugger verbosity.
Change-Id: I89e32179b0a3f043716d5117f958bf6a0de3ccac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116483
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Instead of always implying debugger stop at StoreStaticTOS bytecode,
bytecode generator now explicitly generates (or omits) DebugCheck bytecode.
This is needed to match behavior of AST flow graph builder of omitting
extra debugger stops when RHS expression is not trivial.
Fixes service/debugging_test with bytecode.
Change-Id: Id2e70998efb2a32a101fba4133ffa6a259ab1eb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116443
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This includes types and names of local variables.
Fixes vm/cc/IRTest_TypedDataAOT_FunctionalGetSet with bytecode.
Change-Id: I6130f19b4028f4930dbfcb282b90dd2ec4f963e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116082
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Version 10 of bytecode format was introduced Jun 20 2019 in
da8cb470cc.
Change-Id: I9c895b101ad18b5fc62e8aa736b6811e73efba7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116121
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
System.gc() considered harmful.
Change-Id: I227a092e7734176b55c269f4f611ef1d4293da99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116044
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
VM no longer relies on distinct ICData entries in constant pool, and
it no longer creates actual ICData objects.
This change introduces new DynamicCall constant pool entry which is
* de-duplicated;
* stores arguments descriptor inline instead of allocating a separate
constant pool entry and referencing it by index;
* reserves extra slot in constant pool (like other call constants), so
we can eventually remove creation of extra UnlinkedCall objects.
Change-Id: I8d21954803ca5be5b6fc8335b700e8a9086245cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116120
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Variable descriptors constructed from bytecode have all variables of
enclosing functions, even shadowed by the current function.
Pick the variable with the highest context level.
This fixes service/regress_28443_test.dart failure in bytecode mode.
Change-Id: Ifd0db566b5e74d29075ed17e91810ffe6953af77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116140
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Since Dart 2, library prefixes are always loaded eagerly on the VM.
Also remove reload check for deferred prefixes. This check was added to avoid behavior of library prefixes giving spurious "not loaded" errors after a reload, but now this error can never occur. Resolves a difference in reload between AST and bytecode modes, since bytecode mode isn't surfacing the deferred property.
Change-Id: Ide5fb6cac2efc90ca1b108a35bc09d342cbd60de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116051
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Should have been part of c8f3f132ad.
Change-Id: I2a346f66490e6e97d846d4646ca7042be0b19cb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116101
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Until now it was possible to register classes with a default size (16 bytes on 64-bit)
and later on change the size for the cid.
This CL changes this to ensure the size information in the class table
for a given cid is either 0 or the final instance size (and adds an
ASSERT for it)
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: I94c61c6a1566c13dec7b9eb80c9ae0dadf0e6b6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115861
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Use with caution.
Change-Id: Ic2a3055ede694406596596d57ba54909a6985cde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116080
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Compare c3043367cd, which did the same for the kernel loader.
Causes tests involving libraries with data URIs to fail the same way during reload testing with ASTs and bytecode.
Change-Id: I7ade75e427eefa666b89c48ced70b574160fceb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115764
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Rationale:
The representation mask should not be used to
do the truncation, which is more subtle around
the sign bit. With regression test.
https://github.com/dart-lang/sdk/issues/38147
Change-Id: I9745f6d73f4761eb6210e0b60b2b0504994f5cbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115607
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
The original change is in Patchset 1.
The dependency contains the fix for the non-bare-instructions bot.
Change-Id: Iab02ab0736a2ee9144b667d2777ca526341b2a36
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-bare-linux-release-x64-try,vm-kernel-precomp-mac-debug-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115241
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Handle allocation is extremely common, and it always already has a call to VMHandles::Allocate[Zone]Handle, so we save a lot of binary size by avoiding inlining the TLS and initialization code.
-488k (-2.04%) out/ProductX64/exe.stripped/dart
-256k (-5.07%) out/ProductX64/exe.stripped/dart_precompiled_runtime
Change-Id: I677005c9653c87597ba20144b4326b66d0bf0ee5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115608
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Generated rethrow statements do not require a 'DebugCheck', but explicit rethrow
statements do, so that user breakpoints can be set on rethrow.
Add a IsDebuggable flag on bytecode closures and set it properly.
Remove unused code in a service test.
Add verbosity to debugger.
Change-Id: Ia436cbe62e38cfaec6f9fdf7f8cc2ee5607228e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115602
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Rationale:
Two safe non-speculative cases were missing,
causing AOT to crash on some fuzzing sessions.
Note fuzzer is regression test here.
https://github.com/dart-lang/sdk/issues/38145
Change-Id: I12c633d66e387c703f1bcf0b6eebd50165bb2970
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115445
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
When running from a dill file with AST on the VM with bytecode, we should
ensure that bytecode class declarations are loaded when class is referenced
from a type in AST. Otherwise we could attempt to finalize a type without
proper class declaration.
This change fixes pkg/vm/test/transformations/protobuf_aware_treeshaker/treeshaker_test
with bytecode.
Change-Id: I7a9975e1af6b9e04575f41c5e78b1c2154106e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115460
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>