asiva@google.com
80e281a078
Fix for issues 6080 -
...
- Read the saved context from the entry frame when straddling across C++ frames while iterating over a stack trace in the debugger. This ensures that the correct context is setup in the ActivationFrame structure in these scenarios (instead of the empty context).
- Read the saved context from the caller's frame when iterating over a stack trace in the debugger. The compiler saves the context in the caller frame before invoking closures, we read this saved context when iterating the stack trace.
Review URL: https://codereview.chromium.org//12179020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18235 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 22:43:16 +00:00
asiva@google.com
109cbae3dd
Minor cleanup of activation frame creation code. Get the code object while iterating the frames as that is way faster than doing a code lookup later.
...
Review URL: https://codereview.chromium.org//12225031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18162 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 01:45:56 +00:00
asiva@google.com
f4fe42c280
Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
...
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
hausner@google.com
c3a133777d
Add function for one-time stop at function entry
...
Adds function Dart_OneTimeBreakAtEntry()
Used by debugger clients to stop at the beginning of the program without setting a user-visible breakpoint.
Review URL: https://codereview.chromium.org//11926026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17332 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-19 00:03:30 +00:00
srdjan@google.com
d56766f251
More ^= to |=
...
Review URL: https://codereview.chromium.org//11941021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17308 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:43:19 +00:00
vegorov@google.com
a77fc9701c
When requested to extract a method M from class C inject a method extractor (consisting of a single AST node CreateClosure) as a getter get:M into C.
...
This allows to cache and optimize method extraction requests as normal method invocations and at hot method extraction sites that significantly decreases overhead of method extraction which previously required two trips into runtime system and was not cached at all.
BUG=
Review URL: https://codereview.chromium.org//11642003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17261 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 11:54:45 +00:00
hausner@google.com
79f4b5b61b
Simplify exception handler table
...
Sort entries and drop the try_index field. This simplifies lookup
of exception handlers when walking the traces on exceptions.
Review URL: https://codereview.chromium.org//11970024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17179 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 01:10:42 +00:00
hausner@google.com
cfb3b53aac
Check whether exceptions are caught
...
The debugger can now determine whether an exemption will be caught or not.
Review URL: https://codereview.chromium.org//11946020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17167 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-16 22:16:09 +00:00
hausner@google.com
e8a293c05a
Allow optimized code when debugger is active
...
The debugger allows the VM to optimize code unless there is a breakpoint inside the
function. Whenever a new breakpoint is set (explicitly or implicitly by stepping)
all optimized code is discarded.
Review URL: https://codereview.chromium.org//11780005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16815 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-08 18:57:19 +00:00
hausner@google.com
016b84310a
Handle optimized code blocks in debugger stack trace
...
Removed an old restriction that debugger activation frames
are expected to be non-optimized code. Fixes bug 5944.
Review URL: https://codereview.chromium.org//11776007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16665 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-05 00:46:23 +00:00
asiva@google.com
7022b39e35
Convert all symbol accessors to return read only handles so that it is not necessary to create a new handle in the code that uses it.
...
Added a few more strings to the symbols list.
Review URL: https://codereview.chromium.org//11667012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16584 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 19:31:59 +00:00
hausner@google.com
a2d682d1d8
Improve line info accuracy in debugging
...
Review URL: https://codereview.chromium.org//11696005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16550 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-28 18:51:58 +00:00
hausner@google.com
6b51661ec2
Fix bug 5944
...
Ensure both closureized and regular function are deoptimized when
setting a breakpoint.
Review URL: https://codereview.chromium.org//11669017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16464 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 01:09:44 +00:00
hausner@google.com
2d02548fb0
Ignore nested breakpoints
...
Fixes issue 5945.
When stepping into core library code, it is possible to hit a breakpoint
recursively when the debugger executes dart code to evaluate values.
This change ignores nested breakpoint and exception events.
Review URL: https://codereview.chromium.org//11644085
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16458 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 23:37:26 +00:00
asiva@google.com
7ea520f10f
Create read only handles for empty_array and sentinel objects
...
(trying out a basic framework and will extend it to others once this
works).
Review URL: https://codereview.chromium.org//11648006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16416 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 02:33:05 +00:00
asiva@google.com
2c6de68680
Changed the API in DartEntry for invoking dart code from C++ to make it more compatible with the requirements of the runtime.
...
Deleted all the code duplication that was added to circumvent the old DartEntry API requirements.
Review URL: https://codereview.chromium.org//11613009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16288 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 21:36:01 +00:00
srdjan@google.com
d6772016eb
Cleanups based on Kevin's and Florian's suggestions.
...
Review URL: https://codereview.chromium.org//11481002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15850 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 17:59:53 +00:00
hausner@google.com
5e47a858f3
Set BP in closurized function if necessary
...
If a function has been closurized, and both the regular function as well as
the closurized function are already compiled when the user sets a breakpoint,
then two code breakpoints have to be installed.
Fixed issue 2318.
Review URL: https://codereview.chromium.org//11446020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15764 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 00:09:36 +00:00
srdjan@google.com
c0315644f3
Pass handles not raw objects into methods.
...
Review URL: https://codereview.chromium.org//11441021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15748 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 19:50:50 +00:00
kmillikin@google.com
8c4e214722
Pass IC data and arguments descriptor to IC miss runtime functions.
...
Before, we obtained them by pattern matching backwards on the machine
instructions at the call site. This previous approach becomes unwieldy when
we need to use to use multiple instance call patterns.
R=vegorov@google.com
BUG=
Review URL: https://codereview.chromium.org//11438017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15737 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 15:35:18 +00:00
srdjan@google.com
7c6a68f2a4
Simplify CodePatcher::GetStaticCallAt.
...
Review URL: https://codereview.chromium.org//11411072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15101 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 19:17:02 +00:00
srdjan@google.com
a6dae8cd4a
First part of static call cleanup: store static call targets into code object, referenced by code-offset.
...
Review URL: https://codereview.chromium.org//11418046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15091 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 16:39:07 +00:00
asiva@google.com
ceed3e5beb
- Add support to interrupt a running isolate with the following command:
...
<=== InterruptCmd = "{" RequestId "," command ":" interrupt "," params ":" "{" isolateId ":" Integer "}" "}"
===> InterruptCmdResp = "{" RequestId "}"
- Send isolate events over to the debugger client in the following format:
===> "{" event ":" isolate "," params ":" "{" reason ":" created "," id ":" Integer "}" "}"
===> "{" event ":" isolate "," params ":" "{" reason ":" shutdown "," id ":" Integer "}" "}"
===> "{" event ":" paused "," params ":" "{" reason ":" interrupted "," callFrames ":" StackTrace "}" "}"
- Added id ";" Integer, to params in all paused events messages
- create per isolate debugger message queues, instead of the global static one
- Add 'i' command in ddbg to exercise the interrupt feature
- Add support for handling isolave event messages in ddbg
Review URL: https://codereview.chromium.org//11028040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13333 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 23:10:28 +00:00
asiva@google.com
6076250adb
1. Create a port when a debugger object is created for an isolate, use this
...
port as the unique ID to represent an isolate in the debugger message
format.
2. Switch the Event handler API to use an isolate id instead of the isolate
object itself.
3. Add a unit test case for isolate debugger event handling with an
interrupt of isolate to ensure that interrupting the isolate runs
the interrupt event handler.
Review URL: https://codereview.chromium.org//11052006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13207 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:13:37 +00:00
asiva@google.com
27e1b05914
Add isolate event handler setup in order to be able to propagate isolate
...
events (create/shutdown/interrupted)
Review URL: https://codereview.chromium.org//11026011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13130 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 18:09:55 +00:00
hausner@google.com
201bce4219
Support for show/hide combinators
...
- Add a new VM object called a Namespace.
- A Namespace is a library, and two list of names to hide/show.
- Convert Library and LibraryPrefix to contain Namespace
objects instead of Libraries in their import list.
Review URL: https://codereview.chromium.org//10967052
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12804 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 20:46:56 +00:00
devoncarew@google.com
fdae229dcc
Fix for http://code.google.com/p/dart/issues/detail?id=5085 - break-on-exceptions in the debugger can recurse.
...
This CL turns off the break-on-exceptions behavior when evaluating Dart code in the debugger (in particular, the toString() method).
Review URL: https://chromiumcodereview.appspot.com//10928149
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12275 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 18:01:50 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
ajohnsen@google.com
3a6daefd99
Expose remaining 'errors' in an unified dart:core.
...
This is a follow-up on my previous move of AssertionError.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10896007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11513 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 11:57:37 +00:00
ajohnsen@google.com
a04ecc7678
Unify AssertionError.
...
BUG=
Review URL: https://chromiumcodereview.appspot.com//10882056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11448 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 14:39:50 +00:00
hausner@google.com
028f8c78d1
Suppress "Waiting for debugger..." message on cosole
...
Less noise in the debugger console window.
Also put the verbose debugger output under command line flag
instead of compile time flag.
Review URL: https://chromiumcodereview.appspot.com//10874065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11328 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 17:57:57 +00:00
iposva@google.com
99d563982c
- Support for patching of class methods and fields.
...
Review URL: https://chromiumcodereview.appspot.com//10827288
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10616 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 00:38:01 +00:00
regis@google.com
6f5281c404
Get rid of ast node ids.
...
Rename cid to deopt_id.
Review URL: https://chromiumcodereview.appspot.com//10832150
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10306 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 20:24:03 +00:00
turnidge@google.com
2803d78dfd
Change the zone allocation api.
...
Instead of passing a size in bytes to the allocation function, we now
have a templatized Alloc function:
zone->Alloc<Type>(len)
This is better for security, as we can check for integer overflow in
the size computation before performing the allocation. Before, we
often failed to check this.
Review URL: https://chromiumcodereview.appspot.com//10836061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10254 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 21:51:44 +00:00
hausner@google.com
2db691aa14
Better breakpoint management
...
If a function is already compiled, make a source breakpoint at
the actual breakpoint line number, which may be different from the
requested line number.
Fixes an issue that was brought up in bug 3782.
Review URL: https://chromiumcodereview.appspot.com//10839002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10027 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 22:37:10 +00:00
asiva@google.com
ec7f44f025
Create frequently used symbols in the vm isolate
...
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +00:00
hausner@google.com
e3b118f88e
Don't return private fields from imported libs
...
Fix for issue 4098 (dartbug.com/4098)
Review URL: https://chromiumcodereview.appspot.com//10783038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9722 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-17 21:18:44 +00:00
regis@google.com
d95cbc8d7f
Use VM type cast and save handles.
...
Review URL: https://chromiumcodereview.appspot.com//10693071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9317 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:42:53 +00:00
hausner@google.com
11d2c19fc4
Make sure breakpoints are enabled
...
With my previous checkin it became possible that internal
code breakpoints became disabled. Now make sure that when
one of these breakpoints is re-used, it becomes enabled.
Review URL: https://chromiumcodereview.appspot.com//10690053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9265 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 20:39:48 +00:00
hausner@google.com
c4280b8b89
Fix Dart_RemoveBreakpoint
...
The debugger code assumed that breakpoints can only be removed
while the debugger is paused. That is not true. An embedder can
remove breakpoints while the isolate is idle and running any
Dart code.
Fix for issue 3781 (http://dartbug.com/3781 )
Review URL: https://chromiumcodereview.appspot.com//10698051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9258 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 18:24:35 +00:00
hausner@google.com
86b00700aa
Add a platform-independent max uword value.
...
Review URL: https://chromiumcodereview.appspot.com//10695009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9181 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 17:24:41 +00:00
hausner@google.com
0300423892
Write once debug everywhere
...
Review URL: https://chromiumcodereview.appspot.com//10696009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9177 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 16:25:11 +00:00
hausner@google.com
3aedbb74e8
Better breakpoint placement
...
Instead of using token distance to find the first possible breakpoint
position in a line, use generated code address, so the debugger
breaks before the first call on a source line.
Fix issue 3653
http://code.google.com/p/dart/issues/detail?id=3318
Review URL: https://chromiumcodereview.appspot.com//10686003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9176 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 16:13:49 +00:00
hausner@google.com
fbeaabda52
Debugger support to display global variables
...
- Add library id to ActivationFrame
- Add debugger function to get all global variables visible in
a library (including imported variables).
- Add LibraryPrefixIterator
- Fix Dart_GetLibraryImports
Review URL: https://chromiumcodereview.appspot.com//10657048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9121 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:32:34 +00:00
hausner@google.com
0b403430bf
Fix parent function of deeply nested closures
...
We got the parent of nested closures wrong if the nesting level
was > 2.
Fix for issue 3412.
Review URL: https://chromiumcodereview.appspot.com//10665009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9065 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 15:43:04 +00:00
asiva@google.com
5cbd276939
Make the parser agnostic to the TokenStream implementation. This is the first step towards compacting the token stream.
...
Pull the data stream writer/reader code out of snapshot into a generic file so that it can be reused into the token stream compaction implementation.
Review URL: https://chromiumcodereview.appspot.com//10632009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9043 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 20:37:01 +00:00
hausner@google.com
7d00d4b2e6
Do not collect stack trace unnecessarily
...
The debugger collected stack traces on each exception throw
even when the debugger client specifies "no pause on exception".
This fixes the asserts that Anton saw in some tests.
Review URL: https://chromiumcodereview.appspot.com//10645003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8996 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 18:48:20 +00:00
hausner@google.com
56bc7ca48a
Fix stuff
...
Fix for issue 3781: don't hang on to deleted breakpoints (manually tested).
Fix for issue 3390: allow function names in all string interpolation expressions.
Review URL: https://chromiumcodereview.appspot.com//10603003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8956 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 00:16:27 +00:00
hausner@google.com
5fb638b575
Support captured variables in debugger
...
- Add context level ranges to LocalVarDescriptors
- Add callee-saved context chain register to LocalVarDescriptors
- Add context level and context offset of captured variables
to LocalVarDescriptors
- Add context chain to ActivationFrame
- Add current context level to ActivationFrame
Review URL: https://chromiumcodereview.appspot.com//10579020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8863 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 18:52:34 +00:00
hausner@google.com
41bd5107c4
Fix issue 3636, break on exception
...
Call the "pause on exception" handler in the debugger even when
there are no breakpoints set.
Fixes issue 3636.
Review URL: https://chromiumcodereview.appspot.com//10544159
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8679 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 18:07:48 +00:00