srdjan@google.com
fa7817bf79
Change static calls in unoptimized code to always call via a stub. Using ICData, the call count of static calls is collected as well.
...
TODO: Use call frequency to guide inlining.
R=asiva@google.com , hausner@google.com , zra@google.com
Review URL: https://codereview.chromium.org//17554003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24307 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 23:35:10 +00:00
fschneider@google.com
48555c83ac
Back out r24266 to investigate dartium test failure.
...
TBR=kmillikin@google.com
Review URL: https://codereview.chromium.org//17074003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24284 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 11:56:32 +00:00
fschneider@google.com
ab1981b421
Optimizing noSuchMethod invocation with no arguments.
...
On each call that triggers a noSuchMethod invocation we
attach a custom dispatch function that allocates the
invocation object and invokes noSuchMethod. This dispatcher
is compiled and optimized like a normal Dart function.
Similar to method-extractors, these implicit dispatchers
do not show up as normal functions.
As a first step this CL only handles invocations of getters
and methods with no like o.foo or o.foo(). This CL gives
a >25x speedup of such noSuchMethod invocations. Calls with
multiple arguments still go through the slow path.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//17315008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24266 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 07:31:51 +00:00
srdjan@google.com
47de186e76
Store arguments descriptor in ICData. Remove loading of arguments descriptor at unoptimized call site (the ones using ICData).
...
R=asiva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//17421003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24239 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 16:29:39 +00:00
devoncarew@google.com
762d86296b
Fix for an issue w/ breakpointResolved events not being sent.
...
Added tests for breakpointResolved events.
Added tests for handling toString() invocations throwing exceptions, and extended debug_lib.dart to supported verifying values of local variables.
R=hausner@google.com
Review URL: https://codereview.chromium.org//17112010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24164 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 21:56:00 +00:00
srdjan@google.com
71340907c2
Cosmetic change: s/arg_descriptor/args_descriptor/
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//17141004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24103 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 17:31:00 +00:00
asiva@google.com
925fdb5680
Fix warning in dartium builds:
...
warning: converting to non-pointer type ‘uword {aka long unsigned int}’ from NULL [-Wconversion-null]
R=hausner@google.com
Review URL: https://codereview.chromium.org//17000003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24012 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 21:21:44 +00:00
hausner@google.com
2ec6f419c3
Allow breakpoints on strict equal
...
The compiler turns equality checks with null into
strict equal comparisons. Make the compiler backend
create a pc descriptor for the runtime call so that
the debugger can break on x == null and x != null.
R=regis@google.com
Review URL: https://codereview.chromium.org//15946002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23153 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 16:26:42 +00:00
hausner@google.com
4b497b0c17
Consolidate debug stubs
...
The new debug stub BreakpointRuntime gets the original stub address
from the debugger. With this scheme, we don't need a new debug stub
for every runtime stub that the debugger patches.
R=asiva@google.com
Review URL: https://codereview.chromium.org//15743019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23094 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 18:42:03 +00:00
hausner@google.com
b466bceb20
Make VM debugger stop at every safe point
...
Debugger front-end can decide to ignore some steps and only halt
when the next line is reached.
R=iposva@google.com
Review URL: https://codereview.chromium.org//15359010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22972 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-21 23:07:22 +00:00
hausner@google.com
7349a6d611
Make breakpoints on == fire reliably
...
Add breakpoints in the path taken if one of the operands
in a == b is null.
R=asiva@google.com
Review URL: https://codereview.chromium.org//14991010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22857 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 17:08:09 +00:00
hausner@google.com
2b7746ae05
Allow breakpoints on one-liner functions
...
Fixes issue 10234. This is also the first step for setting
reliable breakpoints on a == b expressions.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//15000005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22799 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 15:44:05 +00:00
hausner@google.com
80c7ad1070
Implement breakpoint for closure calls
...
Introduce a new PcDescriptor kind to distinguish closure calls from other runtime calls. The debugger can patch these calls to set a breakpoint. When stepping into a closure call, the debugger must fish out the closure object from the stack, find the function and set breakpoints in it.
Arm and Mips breakpoint stubs are not implemented yet. ia32 and x64 stubs tested by hand. Automated test to follow.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//14858033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22596 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 21:06:04 +00:00
iposva@google.com
a6fb0962e2
- Fixed some old-style casts.
...
- Remove TODO as it is not feasible to ever enable.
R=kustermann@google.com
Review URL: https://codereview.chromium.org//14628009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22313 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-02 11:40:23 +00:00
hausner@google.com
7f1fac8d1d
Loosen aggressive assert in debugger stack trace code
...
A closure may be called from native code. In that case we will not
find a saved context variable in the dart frame 'below' the closure.
R=asiva@google.com
Review URL: https://codereview.chromium.org//14783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22268 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-01 18:34:48 +00:00
hausner@google.com
29f15c6f8b
Instrument debugger to track down stack trace problems
...
- Print caller and callee if an expected saved current context is not found.
- Make removing a non-existing breakpoint a no-op.
Review URL: https://codereview.chromium.org//14664006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22213 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 23:03:30 +00:00
hausner@google.com
d852cd37c4
Another fix for debugging stack traces and captured variables.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//14449009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22196 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 19:46:07 +00:00
hausner@google.com
d7fdf7f0e8
Fix context-allocated variables in stack traces
...
The debugger did not properly use saved contexts when collecting a stack trace.
Review URL: https://codereview.chromium.org//14503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22070 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-26 15:27:00 +00:00
hausner@google.com
df5c543b6f
Add library id, location info to breakpointResolved event
...
Review URL: https://codereview.chromium.org//13940008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21592 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 23:24:21 +00:00
hausner@google.com
89949d455b
Deprecate old debugger breakpoint handler
...
- Add new breakpoint handler callback that does not take a
stack trace
- Remove deprecated handler from debugger core
- Adjust tests
- Old breakpoint handler support remain in code until Dartium
switches to new handler.
Review URL: https://codereview.chromium.org//14298002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21569 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 19:42:39 +00:00
hausner@google.com
226b3f4ce4
Fix issue 9744
...
Allow for debugger stack frames that have no corresponding pc descriptor
entry, i.e. the PC is not at a known safe point. In that case, we cannot
return a code location nor variables.
Fixes 9744
Review URL: https://codereview.chromium.org//13948009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21175 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 23:36:51 +00:00
tball@google.com
7ba1326a91
Disable stack context when its frame is for optimized code.
...
Review URL: https://codereview.chromium.org//12408015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19894 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 20:42:36 +00:00
tball@google.com
15f62a9361
Fixed debugger stacktrace generation that failed a VM assertion.
...
Added LocalVarDescriptors.ToCString(), which is just used when
debugging debugger issues, and is not referenced by any public APIs.
Review URL: https://codereview.chromium.org//12380031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19255 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 20:45:37 +00:00
tball@google.com
309ef2a8b5
Disabled context variables in local variable list in the debugger,
...
so developers can still use it while issue 8593 is being fixed.
Review URL: https://codereview.chromium.org//12320023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19020 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:36:28 +00:00
regis@google.com
163db76189
Hook up simulator (if needed) when calling Dart code.
...
Merge identical InvokeDynamic and InvokeStatic to InvokeFunction.
Remove redundant argument from InvokeClosure.
Review URL: https://codereview.chromium.org//12315087
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18994 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 19:30:29 +00:00
regis@google.com
8c44be4313
Add support for object pool that will be used on ARM and MIPS architectures.
...
Modify code patching infrastructure to accept code object, which is necessary to
get to the object pool containing patchable target addresses.
Modify assembler test infrastructure to provide associated code object.
Review URL: https://codereview.chromium.org//12260026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18604 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 23:55:31 +00:00
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