John McCutchan
d295b9c311
Remove many features when building product mode
...
Move all JSON printing code from object.cc to object_service.cc.
Not compiled in:
- Service protocol
- Debugger
- Debugger API
- JSONStream
- ObjectIdRing
- Profiler service
- Object JSON printing
Size of dart_bootstrap before: 5670365 bytes
Size of dart_bootstrap after: 5287631 bytes
Reduction in size: 382734 bytes.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1660063002 .
2016-02-05 09:55:51 -08:00
John McCutchan
d77d376124
Replace intptr_t with TokenDescriptor
...
- Use TokenDescriptor instead of intptr_t for all token positions.
- Use TokenDescriptor in raw_object instead of int32_t.
- TokenDescriptor is a POD with an int32_t (this shrinks the size of AST and IR nodes by 32-bits on 64-bit architectures).
There are some cleanups I plan on doing as a follow up CL:
- Replace TokenDescriptor::value() with TokenDescriptor::TokenPos()
R=iposva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1644793002 .
2016-02-02 10:15:44 -08:00
Regis Crelier
7f57ebcfa1
Remove signature classes from the VM.
...
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1584223006 .
2016-01-19 16:32:59 -08:00
John McCutchan
77101d63e3
Source positions for constructors and lots of async machinery
...
- Rework token position address space.
- Use ClassifyingTokenPositions::kMethodExtractor for the token position of a method extractor.
- Plumb token positions through all of Ast Transformer.
- Plumb token positions for temporary expressions, etc in Flow Graph Builder.
- Add token positions for parts of the await machinery.
- Move ClassifyingTokenPositions into token.h.
- Remove default token position of Scanner::kNoSourcePos for many IR instructions.
- A couple of unit tests.
- Use synthetic token positions for synthetic AstNodes.
- Fix SLEB128 encoding / decoding + test
- s/Scanner::kNoSourcePos/Token::kNoSourcePos.
- Remove >= 0 and < 0 checks against token positions and use helpers instead.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1589643002 .
2016-01-19 15:01:08 -08:00
Siva Annamalai
01b69ebabc
Move ApiLocalScope out of class ApiState into class Thread so that the API local handles and zone etc. are thread specific instead of being Isolate specific.
...
R=zra@google.com
Review URL: https://codereview.chromium.org/1473403003 .
2015-11-25 11:07:22 -08:00
Srdjan Mitrovic
5039117f50
Remove isolate parameter when allocating handles
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1401643002 .
2015-10-12 15:51:06 -07:00
Todd Turnidge
dee6ddf966
Support column-based breakpoints in the VM and Observatory.
...
BUG=
R=hausner@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//1312763010 .
2015-09-09 09:01:13 -07:00
Ivan Posva
4bd7cdc75c
- Ensure that HandleScope is initialized with a thread. (Remove
...
deprecated isolate based API.)
- Update all code impacted by this change. E.g. DARTSCOPE
- TEST_CASE now passes the current thread as a parameter to the unit test.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1310463005 .
2015-09-01 17:18:55 -07:00
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
Zachary Anderson
fcd4c59430
Fixes crashes in VM isolate shutdown.
...
If null is not initialized before the VM Isolate's ObjectStore, the
ObjectStore's fields are initialized to kHeapObjectTag, which causes
a crash in VM Isolate shutdown.
There is also a crash when the VM Isolate is signaled with the
shutdown event, so this CL removes adding a Debugger to the
VM Isolate, so that there is no need to shut it down, and send
the signal.
NB: This change does *not* actually enable shutdown. It just fixes
crashes that would happen if it were enabled.
BUG=
R=iposva@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1168933002 .
2015-06-17 10:14:18 -07:00
Ryan Macnak
74dfae69e3
Reapply "Per-closure breakpoints; restructure breakpoint implementation to keep a list of conditions."
...
Fix copying breakpoints over to a new location when a latent location is resolved.
Fix bad assumption that BreakpointLocationAtLine always returns non-null result.
Review URL: https://codereview.chromium.org//1149983003
2015-05-27 09:59:33 -07:00
Ryan Macnak
e674f0dc62
Revert "Per-closure breakpoints; restructure breakpoint implementation to keep a list of conditions."
...
This reverts commit d37149ad3b .
Review URL: https://codereview.chromium.org//1145053004
2015-05-21 17:20:57 -07:00
Ryan Macnak
d37149ad3b
Per-closure breakpoints; restructure breakpoint implementation to keep a list of conditions.
...
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//1146173003
2015-05-21 16:52:08 -07: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
d7b03ba7b0
Fix build
...
BUG=
Review URL: https://codereview.chromium.org//1146523004
2015-05-18 15:59:42 -07:00
John McCutchan
966aafbc81
Fix fall out from hide isolate pointer change
...
BUG=
Review URL: https://codereview.chromium.org//1146523003
2015-05-18 15:13:35 -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
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
hausner@google.com
f96ae9969e
Support breakpoints in deferred libraries
...
This CL introduces latent breakpoints, which are bp in urls that are
not yet loaded. When the VM loads additional scripts through deferred
libraries, latent breakpoints get set.
R=iposva@google.com
Review URL: https://codereview.chromium.org//808643004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42510 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 16:35:37 +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
hausner@google.com
549f9d467c
Detect compile errors when setting breakpoint
...
When the VM is started with the —-debug option, it compiles the main
function eagerly to set a one-shot breakpoint. So far we silently
dropped errors during the compilation, which is wrong. This change
propagates the error to the caller.
Fixes issue https://code.google.com/p/dart/issues/detail?id=20558
R=regis@google.com
Review URL: https://codereview.chromium.org//470353003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39390 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 22:34:07 +00:00
hausner@google.com
4258c115b4
Handle load errors in deferred code
...
IO errors on the URL of a deferred library are forwarded to the Future
that handles the deferred load. Syntax errors and finalization errors
are lethal, killing the isolate.
Review URL: https://codereview.chromium.org//419103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38800 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:09:33 +00:00
asiva@google.com
97b903c665
Fix for issue 19817
...
- do not try to finalize classes on every Dart API call which could
potentially result in calls to dart code
- Invoke Dart_FinalizeLoading after all loads are done to ensure that
classes are finalized
R=hausner@google.com
Review URL: https://codereview.chromium.org//411633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38471 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 20:08:15 +00:00
rmacnak@google.com
7922795cac
Remove assumption in Dart_GetClosureInfo that func->cls->script = func->script,which was broken in r38140.
...
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//393683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38219 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 23:01:53 +00:00
turnidge@google.com
78f3f14635
Add pause/resume for isolates in vmservice/observatory.
...
Improve the isolate view and isolate summary.
Details:
- Rig DbgMsgQueueList so it can run even when the debugger hasn't started.
- Add <action-link> element for pause/resume actions.
- Introduce new flex-percentile css classes.
- Add <isolate-run-state>, <isolate-location>, <isolate-shared-summary>, and <isolate-counter-chart> elements. Counters are now displayed as a pie chart instead of as text.
- Reorg <isolate-view> and <isolate-summary> substantially.
- Add shared style sheet to <script-view>.
- Combine pause-on-start/pause-on-exit with other debugger pause events and present a consistent representation for these in the vm service. Reorg how pause events are shown in <isolate-run-state>.
- Give the user a nicer message when an isolate is still loading.
- Move the /resume command to /debug/resume. Implement this with a bool in the Isolate class which is used to smuggle resume requests from the vm service to the dart embedding api.
- Add the /debug/pause command to the vm service
- Break the DebuggerEvent struct out into its own top-level class. Add JSON printing.
etc.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//271153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36366 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-20 17:09:08 +00:00
hausner@google.com
3f40651e3a
Support evaluation of expressions in context of a stack frame
...
This change adds a debugger API function to evaluate an expression
in the context of a particular stack frame. The expression can
refer to local variables accessible in the frame, but it cannot
alter the variables.
R=regis@google.com
Review URL: https://codereview.chromium.org//249533003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35340 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 22:56:23 +00:00
hausner@google.com
ea84b80f47
Add class id to debugger stack trace
...
Add the class id of the origin class of each activation frame’s function.
Top-level functions have no class id. The wire protocol for an activation
frame now looks like this:
CallFrame = “{“ functionName “:” String “,”
[ location “:” Location “,” ]
[ classId “:” Integer “,” ]
locals “:” NamedObjList “}“
R=devoncarew@google.com
Review URL: https://codereview.chromium.org//242453011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35232 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-21 23:16:41 +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
fschneider@google.com
16857e0b13
Revert r32930 (Add more timing information in the VM to track time...)
...
It caused severe performance regressions that should be addressed.
TBR=asiva@google.com
Review URL: https://codereview.chromium.org//177733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32959 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 12:15:55 +00:00
asiva@google.com
6d313d3797
Add more timing information in the VM to track time spent is dart code Vs native code.
...
R=johnmccutchan@google.com , turnidge@google.com
Review URL: https://codereview.chromium.org//137483010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32930 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 21:30:29 +00:00
regis@google.com
7830430adf
Implement eager instantiation and canonicalization of type arguments at run
...
time using a cache in uninstantiated type arguments.
Remove InstantiatedTypeArguments class.
Fix a bug in optimized code: do not update unused type test cache for Smi.
Fix a bug in optimized code on ARM and MIPS in type test cache lookup.
R=iposva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//154393003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32447 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 19:54:33 +00:00
turnidge@google.com
b891e78325
Post-meetup feature extravaganza.
...
Remodel the top-level isolate summary page.
Add variables to stack frames in the stack trace.
Stop putting small integers and bools in the object id ring.
Rework how we pass down null references (and null-like references like
uninitialized values).
Collect all isolate timers by default.
Change the lifetime of IsolateSpawnState so that we can refer to it
later to know how an isolate started up. Stop pretending that
IsolateSpawnState is a void*. Clean up vestigial IsolateStartData.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//145323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32128 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 18:40:12 +00:00
hausner@google.com
0c434b3073
Rename kDummyTokenIndex to kNoSourcePos
...
Addresses comment to previous change list.
R=regis@google.com
Review URL: https://codereview.chromium.org//144343002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31969 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 23:46:26 +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
rmacnak@google.com
0b2ed441d9
Revert "De-mangle private identifiers returned by the debugger API."
...
Review URL: https://codereview.chromium.org//79773003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30489 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 23:48:24 +00:00
rmacnak@google.com
e47066f327
De-mangle private identifiers returned by the debugger API.
...
BUG=http://dartbug.com/14892
R=asiva@google.com
Review URL: https://codereview.chromium.org//76423004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30436 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 01:40:17 +00:00
rmacnak@google.com
af3f18fa84
Add an API function to get a debugger stack trace from an error handle.
...
BUG=http://dartbug.com/14322
R=asiva@google.com
Review URL: https://codereview.chromium.org//51793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30323 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 23:42:23 +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
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
jacobr@google.com
761c1de735
Fix to asiva's code review comments on TBR Cl.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//49613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29390 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 20:23:19 +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
cac607707a
Make Dart_ScriptGetTokenInfo account for line_offset() and col_offset()
...
Cleanup bugs in wrapExpressionAsClosure Fix bug in how setters were handled and filter out 'this' from local variables list.
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//23526056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27581 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 20:52:22 +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
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
2642b1e522
Evaluate expression in the context of a class
...
Allows debugger to evaluate an expression in the context of a
static method of a class.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23102019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26617 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 22:42:41 +00:00
hausner@google.com
8e9139da08
Fix debugger stack traces
...
This change fixes the lookup of exception handlers that are
contained in activation frames that are not user-visible
(e.g. frames in dart library code).
Fixes issue 12318 (https://code.google.com/p/dart/issues/detail?id=12318 )
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23000011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26445 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 17:22:30 +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