Commit Graph

152 Commits

Author SHA1 Message Date
John McCutchan bcf6eb7099 Remove dart_debugger_api.h
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1190103003.
2015-06-17 14:56:55 -07:00
Lasse R.H. Nielsen babcd4e9c0 Revert "Make EfficientLength public, as EfficientLengthIterable."
It's still not a good solution for detecting an Iterable with an efficient
length. It's not inherited by, e.g., a DelegatingIterable wrapper or similar
generic Iterable transformers.

Keep this as an internal optimization for quickly detecting the most common
efficient-length Iterable classes (List, Set, Queue, Map.keys/values), but
don't make it public.

A *real* solution would be adding a hasEfficientLength getter to Iterable, or
adding an efficientLength getter that may return null if it's not efficient.
This would something that a wrapper can attach to.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1154263003
2015-05-29 12:52:45 +02:00
John McCutchan 51d8bae199 Revert "Hide Isolate pointer from embedder"
This reverts commit 014e694ba7.

Revert "Fix fall out from hide isolate pointer change"

This reverts commit 966aafbc81.

Revert "Fix build"

This reverts commit d7b03ba7b0.

BUG=

Review URL: https://codereview.chromium.org//1140263005
2015-05-19 11:41:42 -07:00
John McCutchan 014e694ba7 Hide Isolate pointer from embedder
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1130753006
2015-05-18 14:06:10 -07:00
lrn@google.com 92c526b2a2 Make EfficientLength public, as EfficientLengthIterable.
R=iposva@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//1104063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45556 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 09:00:45 +00:00
lrn@google.com 0e22f7402f Move implementation from IterableBase to Iterable.
Keep IterableBase around, but just extend Iterable.

There is no good reason to have IterableBase different from Iterable. The only argument is to be consistent with ListBase, but that's also inconsistent with, e.g., Stream.
ListBase only exists because List uses the default List constructor, so it's not a good super-class. As a usability-tradeoff, the ListBase class exists as a super-class.
Iterable doesn't have the same problem, so applying that "trade-off" has no up-side.

(A better long-term solution would be to be able to designate another constructor as the default "super()" constructor to call, so List could be used as a superclass).

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1025573005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45096 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-13 12:26:15 +00:00
turnidge@google.com 03fbeff0bf Go back to old naming for implicit functions to fix the build.
Investigate offline.

BUG=

Review URL: https://codereview.chromium.org//1063763003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44926 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-06 20:04:45 +00:00
turnidge@google.com fb591fc36a Continue improving the documentation for the vm service protocol.
Clean up the protocol a bit as I go.

---

Addendum:

Clean up inconsistencies between field and function ownership in the protocol.

Change the names of implicit closure functions (!)

Review URL: https://codereview.chromium.org//1057333004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44923 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-06 19:24:47 +00:00
fschneider@google.com 431f96710c Re-enable and adjust skipped VM debugger tests.
They were skipped because of a long-resolved issue. This required changing
the set of reported variables according to the current debugger implementation.

I adjusted the test to check for substring for the expected function names:

Dart_ActivationFrameGetLocation returns Debugger::QualifiedFunctionName nad
and Dart_FunctionName returns Function::UserVisibleName.
Should the two be made consistent instead?

cc/IsolateInterrupt was skipped on x64 for unknown reasons. It seems to pass fine
(tested locally)

R=hausner@google.com

Review URL: https://codereview.chromium.org//1018373002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44597 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 09:25:46 +00:00
koda@google.com c7e9e048ed Rename Thread -> OSThread.
It's a collection of static utility methods for primitive operations on OS threads.

Make room in the namespace for upcoming class that will represent all the complex state of a VM thread.

Review URL: https://codereview.chromium.org//796063006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42895 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 02:30:07 +00:00
hausner@google.com 9aa128c9f2 Remove deprecated debugger code
R=asiva@google.com

Review URL: https://codereview.chromium.org//790793006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42534 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-20 00:20:03 +00:00
fschneider@google.com a49870e721 VM: Remove use of IterableMixinWorkaround from _List, _ImmutableList and _GrowableList.
_List, _ImmutableList and _GrowableList now extend ListBase which uses ListMixin.

Note that typed data lists are still using IterableMixinWorkaround for now.
They will be changed in a separate CL since it involves a few more changes
to the VM.

BUG=dartbug.com/13647
R=lrn@google.com

Review URL: https://codereview.chromium.org//730543002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42061 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 10:38:51 +00:00
jacobr@google.com bb133370ce Add ActivationFrame_GetFramePointer method and test.
BUG=
R=asiva@google.com, hausner@google.com

Review URL: https://codereview.chromium.org//545263002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40171 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 18:17:03 +00:00
iposva@google.com 14ecdbd66a - Separate the thread implementation used in bin/ and vm/
to allow us to make VM specific changes.

R=asiva@google.com

Review URL: https://codereview.chromium.org//463993002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39172 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 23:19:53 +00:00
asiva@google.com a8195aeb5c Change the Dart API call Dart_FInalizeLoading to accept an additional argument
which makes completion of deferred library futures optional.

R=hausner@google.com

Review URL: https://codereview.chromium.org//407143004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38463 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 16:56:14 +00:00
hausner@google.com 7dd12c92f4 Fix test Debug_BreakOnUnhandledException in checked mode
TBR=srdjan

Review URL: https://codereview.chromium.org//391213005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38317 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 22:33:34 +00:00
hausner@google.com d6664499a9 Debugger test to ensure break on exception works
Tests that the debugger is only called on exceptions when the exception is
unhandled or when it wants to be notified on all exceptions.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//396993008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38316 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 22:30:33 +00:00
rmacnak@google.com 0c7531c941 Implement Evaluate without creating temp classes by storing an eval function's script in the function's data field.
This means Evaluate doesn't burn through CIDs, mitigating the problem where class table entries are treated as strong references. More generally the whole tangle of objects created during eval is collectable, and running eval in a loop doesn't lead to heap growth.

http://dartbug.com/18284

R=hausner@google.com

Review URL: https://codereview.chromium.org//379353003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38140 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 23:23:01 +00:00
rmacnak@google.com 5afea71262 Setup R10/EDX to be valid Oops before stub calls so when the debug stub saves them to the stack the GC doesn't try to deference out of the heap.
BUG=http://dartbug.com/19331
R=asiva@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//335443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37297 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-12 23:50:48 +00:00
zra@google.com ea99b1e6f8 Adds debugger patching to arm64.
Also other small fixes.

R=regis@google.com

Review URL: https://codereview.chromium.org//274043003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36003 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 23:20:14 +00:00
hausner@google.com 12c56b29c7 Eliminate unused url mapping parameter in dartutils
Change the LibraryTagHandler used in unit tests to match
the real tag handler better, eliminating special treatment
of url canonicalization. This required changing the library
url of tests so tests don’t get loaded using dart scheme urls,
since builtin.dart doesn’t handle dart: urls.

R=iposva@google.com

Review URL: https://codereview.chromium.org//270503007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35987 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 18:25:41 +00:00
johnmccutchan@google.com ef666553a1 Add runtime and native entry tags
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).

R=asiva@google.com

Review URL: https://codereview.chromium.org//227433004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
zra@google.com 2fe51715e5 Begins work on ARM64, first assembler test.
Most new code is in constants_arm64.h and
{assembler,disassembler,simulator}_arm64.{h,cc}

The rest of the CL just #def's out tests, modifies status files,
and adds UNIMPLEMENTED functions, etc.

R=regis@google.com

Review URL: https://codereview.chromium.org//221133002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34654 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 17:39:32 +00:00
turnidge@google.com bb6003d9b7 Fix line number table generation for multiline strings with interpolation.
Share the line number table generation code between debugger and vm service.

R=hausner@google.com

Review URL: https://codereview.chromium.org//219993004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34606 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 18:16:27 +00:00
hausner@google.com 040093eb26 Handle stepping requests after isolate interrupt event
Adding test case provided by jacobr.

Fix issue 17008

R=jacobr@google.com, regis@google.com

Review URL: https://codereview.chromium.org//175533003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32938 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 22:40:11 +00:00
hausner@google.com baf16bac5e Make safe points in generated code invisible to the debugger
- remove some PC descriptors that are part of implicit, synthesized
  code, e.g. generated null checks in == methods, implicit constructors,
  implicitly generated code in user constructors, etc.
- ignore single step callbacks on PC descriptors that are part of
  synthesized code.

R=regis@google.com

Review URL: https://codereview.chromium.org//137003006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31966 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 21:49:42 +00:00
hausner@google.com c571528323 Make return statements single steppable
Replace the code smashing breakpoints at function returns with a call
to a runtime stub that checks whether the debugger is single stepping.
The call to the stub is only emitted in unoptimized code.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//106053011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31435 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-02 23:31:52 +00:00
asiva@google.com a576fec3c0 Allow the native resolver to setup whether it needs the Dart API scope to
be setup automatically or not when a native function is invoked.
This would allow the embedder to treat some native functions as leaf
functions whose invocation can be very light.

R=hausner@google.com, zra@google.com

Review URL: https://codereview.chromium.org//117723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31286 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 17:47:56 +00:00
turnidge@google.com b640712e6b Handle vmservice messages while at breakpoint.
Allow rudimentary inspection of breakpoints from vmservice.

R=hausner@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org//113513004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31233 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 17:45:17 +00:00
hausner@google.com 55c283a672 Transmit breakpoint id on paused event
Breakpoint callback get an additional parameter to receive the id of the breakpoint that was hit, or 0 if the debugger pauses due to stepping.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//110913002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31029 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 17:41:05 +00:00
hausner@google.com 0673063f57 Add closure object type to debugger wire protocol
R=devoncarew@google.com

Review URL: https://codereview.chromium.org//61153006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30289 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 19:42:14 +00:00
iposva@google.com 25b81b3e8b - Fix string conversion warnings.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//70613002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30204 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-12 19:43:44 +00:00
hausner@google.com 14489dd0f0 Add Dart_GetClosureInfo
Will be used by debugger wire protocol.

R=regis@google.com

Review URL: https://codereview.chromium.org//65383007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30162 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 18:22:05 +00:00
turnidge@google.com 2ad40bc29b When a value has been optimized away by the compiler, set its value to
"<optimized out>".  This will make it less confusing for people using
the debugger.

- Added constant_dead() to the flow graph.
- Added Symbols::OptimizedOut().

R=fschneider@google.com

Review URL: https://codereview.chromium.org//27339003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28671 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:35:07 +00:00
turnidge@google.com b4b7e5899c Allow access to context variables in optimized/inlined frames.
R=asiva@google.com

Review URL: https://codereview.chromium.org//27226004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28669 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:17:36 +00:00
turnidge@google.com 99ce6672cf Fix a typo in debugger.cc that was causing variable bounds checking to
be done on the frame context instead of the variable's context.

Update the unit test.

R=hausner@google.com

Review URL: https://codereview.chromium.org//27038005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28594 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 17:35:35 +00:00
turnidge@google.com fb6249ec3b Add unit tests to cover stack inspect in the presence of closure calls
for both optimized and non-optimized code.

Fix an assert which was broken.

R=iposva@google.com

Review URL: https://codereview.chromium.org//27054002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28538 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 18:15:32 +00:00
turnidge@google.com afb372d9e1 Fix checked mode failure
Review URL: https://codereview.chromium.org//26842003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28470 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 19:00:31 +00:00
turnidge@google.com b15b2931e0 Allow the debugger to inspect local variables from optimized and
inlined frames.

------------

Most remaining deoptimization code from the code generator moves to
DeoptContext.  This allows the code to be reused by the debugger.
There is some rework of the code along the way.  The remaining code in
the code generator is simpler.

Implement the ability to deopt a frame to an Array.  Each inlined
frame accesses its locals from this array at some fixed offset.

Refactor the Debugger::CollectStackTrace code.  New code is int
Debugger::CollectStackTraceNew.  There is a flag --use_new_stacktrace
which can be used to revert back to the old version.  I intend to
remove this flag shortly, after any dust clears.

Added a unit test which makes sure that we can inspect locals from
optimized and inlined frames.  Tested this code in the dart editor
debugger as well.

R=iposva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//26255004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28468 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 18:15:53 +00:00
hausner@google.com fcb84c8dc9 Fix expression evaluation in library context
- Use correct source for patch functions when class
  finalizer reports error
- Reinstate support for class in Dart_EvaluateExpr

R=regis@google.com

Review URL: https://codereview.chromium.org//25284003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28064 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 18:49:32 +00:00
rmacnak@google.com 89d5616468 Never return a Dart_Handle on a dart::Class from the embedding API.
R=asiva@google.com

Review URL: https://codereview.chromium.org//24210003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27715 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 18:29:56 +00:00
jacobr@google.com d9f7cc5099 Add "function" as an argument to Dart_ActivationFrameInfo
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//23609032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27440 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:45:42 +00:00
hausner@google.com fe9e202f8b Fix debugger expression evaluation for top-level functions
The temporary class that holds the expression to be evaluated
must be marked as finalized.

Added Jacob's closure tests.

Fixes issue 13192.

R=jacobr@google.com

Review URL: https://codereview.chromium.org//23825006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27338 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 15:30:52 +00:00
hausner@google.com f82de66060 Evaluation of expression in context of library top-level
Third and final part of expression evaluation in the context
of an (object|class|library).

R=iposva@google.com

Review URL: https://codereview.chromium.org//23514020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26898 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 23:24:23 +00:00
hausner@google.com a105ba48fc JSON string decoding for VM debugger
The VM must properly decode JSON strings it receives.

R=regis@google.com

Review URL: https://codereview.chromium.org//23439002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26668 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 20:59:16 +00:00
jacobr@google.com 605b33c1bc fix cpp11 compile errors
R=asiva@google.com

Review URL: https://codereview.chromium.org//23072026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
hausner@google.com d62ea57f8e Evaluate expression in context of an object
This is the core functionality needed for the debugger.

Review URL: https://codereview.chromium.org//23067006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26328 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 22:17:09 +00:00
asiva@google.com 56533b8374 Added unit test cases to try and reproduce issue 12137 (Things
work as expected)

R=srdjan@google.com

Review URL: https://codereview.chromium.org//22287004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25805 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 00:11:55 +00:00
asiva@google.com 50cc2b4a1e Fix for issue 12136 (do not try to copy type arguments if the base class
has no type arguments).

R=regis@google.com

Review URL: https://codereview.chromium.org//20575003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25688 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:27:25 +00:00
asiva@google.com 5f0c327096 Add Dart_GetSupertype to the dart debugger API so that the dartium
debugger interface can use this instead of Dart_GetSuperClass.

R=regis@google.com

Review URL: https://codereview.chromium.org//18238003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24648 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 19:46:42 +00:00