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>
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>
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>
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>
That should allow us to "implement"
6f85cb83cf again in two steps:
* first we remove the dart:profiler as a required library, but retain it in the platform
* (we wait for stuff to roll, both in flutter and in google3)
* we remove it completely (i.e. not retaining it in the platform, removing the source etc)
Change-Id: Ieb77c2ba909300c05f3923c2edba7cab7d34fae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115244
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This reverts commit ecbea5a58e.
Reason for revert: broken with bare instructions and ABI bot
Original change's description:
> [vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).
>
> To do this, we add writable data sections (currently uninitialzed) to ELF and Asm snapshots
> and allow Instructions to have patchable relocations against (the start of) these sections.
>
> Issue https://github.com/dart-lang/sdk/issues/37295 (see also for design & discussion).
>
> Change-Id: If20bfa55776f4044aaa6bb8ea2101d2ada41842c
> 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
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110221
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,sjindel@google.com
Change-Id: I9787da6d42575ca4f5ae0a698052a19ac4275afd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
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-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115240
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
To do this, we add writable data sections (currently uninitialzed) to ELF and Asm snapshots
and allow Instructions to have patchable relocations against (the start of) these sections.
Issue https://github.com/dart-lang/sdk/issues/37295 (see also for design & discussion).
Change-Id: If20bfa55776f4044aaa6bb8ea2101d2ada41842c
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
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110221
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
These equality checks are showing up in a profile-run of the type flow analysis.
For this particular benchmark, time went down ~10% from ~32.2s to ~29.5s.
Change-Id: I158f1db0d0816aa347f89ae0228f7a9a5158318f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115203
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Skip test that fails to compile because theres an error triggered by
constant evaluation because we're not compiling for a web-platform.
This should turn the bot green.
Change-Id: Icb7a4d5a55f14c146f03e17d06d518f615189e27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115205
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Library dependencies are serialized in bytecode as extended annotations.
Fixes the following tests with bytecode:
co19_2/Language/Metadata/before_export_t01
co19_2/Language/Metadata/before_import_t01
service/library_dependency_test
Change-Id: Idfbac6fcd56318d994d179864f0f5fd7d95089a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114928
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Since both throw and rethrow statements share the same 'Throw' bytecode opcode
(differentiated by an operand), we make the opcode not implicitly 'debug
checked' anymore.
Instead, we emit a 'DebugCheck' opcode for the throw statement only.
This fixes the following test:
service/async_single_step_exception_test
Change-Id: I4e540ea0a640fda5365d51933ce4e5125548e2f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114754
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This emulates behavior of AST-based flow graph builder which would
insert DebugStepCheck if RHS is LoadLocal.
As-expression generated by AST-based flow graph builder results
in LoadLocal (unless it's casting to a top type).
Fixes service/next_through_is_and_as_test with bytecode.
Change-Id: Icb809d42daf2a4ebbad22bfa92bc737406144489
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114740
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Removing source information for this call prevents the debugger to set a
breakpoint in compiled bytecode on this call which occurs prior to the first
DebugStepCheck in the function.
However, this change uncovered a bug in debugging interpreted bytecode:
The first source range of an async_op function gets split into 3 ranges, with
the middle range specifying a NoSource token position. The debugger does not
set a breakpoint in the first range, because DebugCheck is not yet encountered,
which is correct, but it failed to look for another range (the 3rd one) with the
same token position.
Change-Id: I11dcc75d115cb57b37f62afd83c783cf563b63e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114700
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
The extra DebugCheck is skipped depending on the initializer expression,
similarly to VariableSet.
This matches how AST-based flow graph builder inserts DebugStepCheck for
VariableDeclaration.
Test: runtime/observatory/tests/service/async_star_step_out_test.dart
Change-Id: Id1b11813b533996e219891f416e7008a994dbc51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114593
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This fixes the following tests in bytecode mode:
service/step_through_switch_test broke
service/step_through_switch_with_continue_test
Change-Id: I3f6f835185b9dae86e5ebebfdd4484b4d1cb6af0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114549
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
* Set parent for TypeParameters created in createExpressionEvaluationComponent.
* Resolve references from bytecode to an expression evaluation class
using real class. Expression evaluation class could be referenced
from type parameters.
* Avoid registering expression evaluation classes in hierarchy. They
shouldn't be discovered through direct subclasses or implementors,
as expression evaluation classes don't have cids.
* Add :function_type_arguments_var local variable to bytecode local
variables info, so expression evaluation can find function type
arguments which are in scope.
Change-Id: I515431a989b4d02af4ecf90579931dd59d3acadd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114182
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>