This CL handles expression compilation inside extension methods better.
It is now possible to evaluate "this" and other methods defined in the
extension.
https://github.com/dart-lang/sdk/issues/46757
TEST=service tests added.
Change-Id: I3c71eb23117e26b01961f32103f4046f0b537976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212286
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Now that support for native extensions (aka dart-ext:*) has been
removed, the kernel loader is guaranteed not to call out to embedder
anymore (it did so before for loading shared libraries).
This allos us to clean up some code as well as extend the scope of our
NoActiveIsolateScope.
TEST=ci
Change-Id: I5c8c9ee47298fdd316583ba3aed74772c1c7783f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212296
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Every known user of the coverage report just wants the line numbers. At
the moment they have to do a second RPC to get the Script object, so
they can translate the token positions into line numbers.
Slower test times with coverage are usually caused by the extra time it
takes to run the RPCs. So reporting the line number directly will halve
the time it takes to get coverage, for most users.
Bug: https://github.com/flutter/flutter/issues/86722
Change-Id: I7b8d436669713ebc7b7096790a02593b9cb94dda
TEST=CI
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211081
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
TEST=This CL skips a test that times out and OOM.
Cq-Include-Trybots: luci.dart.try:app-kernel-linux-debug-x64-try
Change-Id: I99bd5e00e1dae672a252e932cd5501b2ac933019
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211401
Reviewed-by: William Hesse <whesse@google.com>
We launch the subprocess with --complete-timeline which will collect and
buffer all timeline events in-memory. This works ok if we don't have too
many events and if we have enough memory.
On ia32 in particular the JIT's kernel-service runs from kernel file
(not from an app-jit trained snapshot). That means it's slow and
possibly produces many more timeline events since kernel-service isolate
has to JIT all of the CFE in order to compile the test script.
On ia32 we only have 2 or 3 GB of memory available. So this could lead
to OOMs to due the timeline buffer getting too large.
(See issue below for more information)
This is an attempt to fix that by first compiling the testee to kernel,
so the subprocess can be run immediately from kernel instead of first
needing to compile via CFE.
Issue https://github.com/dart-lang/sdk/issues/43504
TEST=Tries to make flakily timing out less flaky.
Change-Id: I46a674ce7a8c44a716a543c73703d40f690f396e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210723
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Fix labels for sentinel, transition_sentinel, ImmutableArray, LinkedHashMap and LinkedHashSet.
Display unlimited children when look at successors, as the worst case is the size of the field table. For predecessors and dominators, the worst case is the whole heap.
TEST=ci
Change-Id: I6fcfdfb0833d58c9ac4f586b823244d817aeba27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209841
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Allows for function objects to be displayed in an understandable fashion
in developer tooling (e.g., a DevTools program structure inspector).
Also adds 'implicit' property to @Function which specifies whether or not a function was defined implicitly (e.g., getter/setter).
TEST=service/get_object_rpc_test.dart
Change-Id: I2da1aa15c58635046b905e205bfd29d654bbde2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203200
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
The JIT support has progressed and is no longer unstable. We'll
therefore remove the experimental flag and rely on the same
--enable-isolate-groups flag as in AOT mode.
Issue https://github.com/dart-lang/sdk/issues/36097
TEST=Existing test suite.
Change-Id: Iff0dd5b64d9b6ab91ad9ffc0ae445efc802d3908
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207122
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
events on Developer stream.
Also removes intrinsic implementations for UserTag_makeCurrent to allow
for service events to be sent on UserTag change.
TEST=DartAPI_UserTags,pkg/vm_service/test/user_tag_changed_test.dart
Change-Id: I5dc9ee77c0048590d3c6e33a652eee5bc3bf522a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204440
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
The Incremental Kernel Compiler (IKG) will produce kernel files without
metadata.
Right now the VM will make all closure calls dynamic calls if the
call-site attribute metadata is not present. This causes closure code
to run significantly slower due to dyn:call forwarders and the type
checks it will perform.
This change takes - in addition to the metadata - the new
FunctionInvocation.kind into account - which also tells us whether a
function invocation is based on a real function type.
Fixes https://github.com/dart-lang/sdk/issues/46320
Fixes https://github.com/dart-lang/sdk/issues/45421
TEST=vm/cc/StreamingFlowGraphBuilder_TypedClosureCall
Change-Id: Ie1136c3727fc8b5e3e3b9822a1db9479fa9da689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203302
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Trying to evaluate an expression on some internal VM stuff one should
get an error, but instead gets a FormatException because the VM sends
invalid json.
This CL fixes that by returning after the error.
A test that previously got the exception is also added.
TEST=Test added.
Change-Id: Idc9332b6ee1eb3e6fc37145b28967056e5df6882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202766
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Token position and script reference information are cheap to provide and
make it possible to tie objects to scripts without requiring additional
requests for full objects.
TEST=Existing
Change-Id: I917714149a72a53081fee5626ccad858e86f5313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201864
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
https://github.com/dart-lang/co19/issues/1090
TEST=Standard tryjobs, all changes are in test code only.
Change-Id: Ie73174447ab165827335652cf035f85b7510ab55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201564
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
For yielding functions (async, sync*, async*) we need to look for
annotations on the outer function instead of the synthetic inner
function associated with the handler frame.
Fixes https://github.com/dart-lang/sdk/issues/45673
TEST=runtime/observatory{,_2}/tests/service{,_2}/notify_debugger_on_exception_yielding_test.dart
Bug: https://github.com/dart-lang/sdk/issues/45673
Change-Id: I8b1718b3614852f6f8db98811177b21fe587fea1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198408
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
There is a synthetic try/catch within a try/finally block.
When trying to assess whether an exception is caught, the debugger
should skip such generated try/catch blocks. Otherwise, it considers
that try/finally actually handles the exception, which is wrong.
Fixes https://github.com/dart-lang/sdk/issues/45684
TEST=runtime/observatory{,_2}/tests/service{,_2}/regress_45684_test.dart
Change-Id: I60e8837204cf97ee1ab02ffd03364e7f69857004
Fixed: 45684
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196124
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
objects
It's possible for scripts to appear in multiple components provided by
the front end in certain situations (e.g., mixin applications in
different libraries). Previously when trying to set a breakpoint, if
multiple scripts were found matching the target URI the debugger would
give up and not set the breakpoint.
This change allows for multiple Scripts to be associated with a
BreakpointLocation.
Fixes https://github.com/flutter/flutter/issues/66832
TEST=runtime/observatory_2/tests/service_2/sdk_break_with_mixin_test.dart
Change-Id: I935721f4753675a9a2051a71cc1720e590f8d4f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195664
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.
Fixes: https://github.com/dart-lang/sdk/issues/28793
TEST=Manually tested common user journeys.
Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
In AppJIT mode we run from a snapshot and won't have an incremental
compiler available. That also means expression evaluation is not
supported.
The specific test that was failing was
service_2/evaluate_activation_in_method_class_test/service
though this CL skips all evaluation tests.
The CL also align the service and service_2 status files more.
TEST=Only updates status file to skips tests.
Change-Id: I8dbb3aeeb686370d898c59da3729f5e0c52df411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194685
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Adds a convenience getter to ServiceProtocolInfo which transforms the VM
Service HTTP URI into a valid web socket URI that can be used to connect
to the VM service.
Fixes https://github.com/dart-lang/sdk/issues/42968.
TEST=runtime/observatory/tests/service/developer_server_control_test.dart
Change-Id: Ib15de1f1a9b26ac5cf45f55a53014761a6fa7900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194209
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
This change adds a `setBreakpointState` RPC which allows for breakpoints
to be enabled or disabled without needing to remove and recreate
breakpoints.
Fixes https://github.com/dart-lang/sdk/issues/45336.
TEST=set_breakpoint_state_test.dart
Change-Id: I1a04e6028d4e4560fdb8d3d26420c9a05da06b4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193896
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Allows developers to perform arbitrary filtering or analysis of instances, such as finding the largest strings, degreeses of duplication, histograms of various properties, etc.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/44479
Change-Id: I0b4005b5778038945e5f1b2d7858806c8e0dbbff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176381
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Stephen Adams <sra@google.com>