Commit Graph

585 Commits

Author SHA1 Message Date
turnidge@google.com 5e37b291bb Disable an assertion until bug 18384 is fixed.
BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35445 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 20:48:17 +00:00
jacobr@google.com 8fd3f6a789 Workaround stacktrace crasher bug in the VM.
Fix for bug setting breakpoint after app reload.

BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35401 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 20:34:19 +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
turnidge@google.com 110570e9fe Fixes a problem with the recovery of contexts in the debugger at closure calls.
When we call a closure, the caller saves the context before the call.
So when walking the stack, we used to check the callee activation to
see if it was a closure call, and then recover our caller-saved
context.

This breaks down in the following case:

1. Caller calls function F.
2. Function F is compiled.
3. The compiler needs to run code to evaluate a constant (e.g. a
   static final getter).
4. We hit a breakpoint *while* evaluating the constant.

In this case, there is no callee frame for the closure call yet.

I fix this by using the the pc descriptors to see if the current pc in
the caller is a closure call.  This avoids needing to have a callee
frame available.

---

ALSO:

New flags:

--verify-incoming-contexts: in development - verify assumptions about
  contexts in stub code. (currently ia32 only)

--trace-debugger-stacktrace: this helps debug these kinds of
  stacktrace issues.

Miscellaneous improvements to frame and context printing.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35130 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-16 20:03:30 +00:00
hausner@google.com f58b04e387 Improve breakpoint resolution
Fix breakpoint setting in exception handlers.

Fixes issue 17880.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34986 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-11 18:04:19 +00:00
turnidge@google.com 3e86631f02 Use tokenPos instead of line/col in the vm service.
Add line number information to the Script response.

Parse line number information in the observatory.

Update <script-ref> to take a pos argument

Add a new <script-inset> element which shows a code snippet.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34528 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 21:24:24 +00:00
fschneider@google.com 37b30ab2ac Alternative fix for .call invocation of closures.
This also covers "closurization" of the .call method.
This relies on the fact that f.call === f if f is a closure.
This means that adding a simple getter to _FunctionImpl that
 returns this is enough. No need for a separate dispatch.

This CL reverts the previous fix for issue 12602 (modulo the
additional tests).

BUG=dartbug.com/17473, dartbug.com/12602
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33736 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 10:31:33 +00:00
fschneider@google.com f75ef2e6ab Fix invocation of closures via .call in the VM.
Calling closures via .call does now work in the VM - it was working in
dart2js already.  Calling .call on a closure is implemented to go through
a dispatcher method. These dispatcher methods are automatically created and
cached in the same way as NoSuchMethod- or field-invocation dispatchers.

This CL does not change the way regular closure invocation works in
the VM. It is therefore performance-neutral for normal closure calls.

BUG=dartbug.com/12602
TEST=language/call_test
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33576 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 14:02:27 +00:00
hausner@google.com 96b42f95c3 Fix stepping after a breakpoint
The first “step over” command after a breakpoint was accidentally
converted into a “step into”.

Fixes issue 17074

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33105 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 01:14:15 +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
turnidge@google.com 2883d99e8e Handle contexts which have been optimized out.
Expand list of expected object types seen on the stack.

BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32708 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-14 18:04:42 +00:00
hausner@google.com ac559f643a Introduce cache of resolved names in library
A name that is not resolved in the local scope gets looked up
in the global scope of the library to which the code being compiled
belongs. The local name dictionary gets searched first, then the
dictionary of each imported library (and and their re-exported
libraries.) Each dictionary lookup includes the lookup of the
mangled getter and setter names, which means that we concatenate
the same name many times.

This change introduces a cache that stores the result of a previous
name lookup, including negative lookup results. The latter is important
to speed up the resolution of names that are not in the global name
space, e.g. class members like .length in lists.

Experiments running dart2js (with VM option --compile_all) show
that this reduces the number of name mangling calls by a factor of 10
and speeds up compiling dart2js by 15%.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32385 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 21:32:31 +00:00
hausner@google.com 936b51821c Prevent accidental breakpoints in non-debuggable code
Prevent setting accidental breakpoints in implicit getter
and setter functions, and in initializer expressions that
are inlined in field declarations.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32183 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 23:38:35 +00:00
hausner@google.com f9089a3ca5 Find all compiled copies of a function when setting breakpoint
Fixes a bug where the debugger did not find a compiled implicit
closure if the non-closureized version had not been compiled yet,
thus failing to set a breakpoint.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32165 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 18:08:02 +00:00
hausner@google.com ed8ea2e281 Handle all debugger stepping with the isolate single step flag
Eliminate stepping with “internal” breakpoints. We can now handle
stepping in recursive functions properly. On the other hand, code
does not run at full speed between step commands, since a runtime
call to the debugger is necessary at each safe point.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32150 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 23:47:23 +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 e2f1ed3b2f Fix debugger stepping
Recently I eliminated PC descriptors for some calls. This change
makes sure we handle single stepping on those call sites properly.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32071 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-28 16:36:42 +00:00
hausner@google.com 682855e8cc Ensure the debugger keeps a reference to code objects
Keep the code object in a breakpoint object rather than the
function object. This ensures that the GC can’t collect the
code object while there are breakpoints for the function.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32006 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-24 23:55:11 +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
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 812467f0f6 Fix several little buglets with stepping
No need to halt on single step if there is a breakpoint on the
same location. While looking at the resulting test failures, I
discovered that the step_in_equals test was not at all testing
what it was meant to test. It happened to pass because of a
related bug in the parser. Decided to abandon that test and
instead check that we can break at == even if one of the operands
is null.

Added ability to match line numbers in the debugger tests.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31898 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 21:15:17 +00:00
hausner@google.com b4f0bf5998 Fix debugger stub patching on x64 architecture
Instead of patching the entry in the object pool, patch the offset
into the pool at the call site.

SIMARM and SIMMIPS will have to be fixed the same way in a later change.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31812 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-14 23:27:13 +00:00
hausner@google.com ab26604b54 Debugger no longer causes top level variable initialization
When a top-level variable has not been initialized yet, the
debugger reports a value of ‘null’ rather than causing a side
effect of running the initializer code.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31678 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-09 21:50:20 +00:00
zra@google.com fdeff1ba17 Replaces LongJump with LongJumpScope.
LongJump required explicitly restoring the old
long jump base before function return. This was
sometimes forgotten, leading to crashes. This
change puts the base restoration into the
destructor so that it happens automatically on
return.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31463 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-04 01:23:43 +00:00
hausner@google.com 23968102ac Fix setting breakpoint in non-finalized class.
This fixes issue 15870

Also added test case and verified manually that test case fails before this fix.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31449 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-03 20:50:32 +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
iposva@google.com a2b51d366b - Avoid returning "<optimized out>" strings as contexts.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31401 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-30 17:50:19 +00:00
hausner@google.com 15e8f121dd Change how debugger handles source breakpoints
- Identify a source breakpoint by a script and a token position
  rather than a function object.
- When a new breakpoint is set, iterate over all compiled functions
  to see whether code breakpoints must be set.

This change fixes issues with functions that get compiled several
times, for example as implicit closures or a copies of mixin
functions or local closures of mixing functions. We did not detect
all duplicates of functions.

Eliminated recently introduced const modifiers in SourceBreakpoint
class. They tend to be in the way because several accessor methods
of SourceBreakpoint compute data lazily and modify the object as a
side effect.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31372 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-26 20:53:58 +00:00
turnidge@google.com 383468782e Keep track of current "pause" event in the debugger.
This will allow us (later) to make nice descriptions of the state of
an isolate, e.g. "isolate 7112 is paused due to breakpoint 2" or
"isolate 7112 is paused due to interrupt" or "isolate 7112 is
running".

Use a new Pause() function to call the event handler during a pause.
It does some shared checking, setup, teardown.

Minor change in isolate interrupt handling - before we were not
setting 'in_event_handler_' in this case.  Now we set 'pause_event_'
here, which will guard against recursive pauses in this case.

Reviewer: not sure what I think about all the names I used here.
"pause_event_" is very similar to PausedEvent but means something
different, as it includes pauses, interrupts, and (maybe) exceptions.
Dunno.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31356 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 22:30:23 +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
turnidge@google.com 7781fd4759 Remove old stack-walking code. The new code seems to be doing fine.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31111 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 21:33:25 +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 00589271c5 Fix source location of mixins in stack trace
We need to use the origin library, not the owner library,
for the source location of functions. This fixes issue 15185.

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30970 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-06 22:06:15 +00:00
hausner@google.com 70aa249370 VM debugger: fix closures in mixed-in functions
Avoid assertion in debugger when compiling closures in mixin
functions.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30823 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-03 19:19:54 +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 95152c5d30 Remove an invalid assert in converting a dart.core.Stacktrace to a debugger stacktrace.
Fixes an Aw, Snap when trying to debug an OutOfMemory error on debug builds of Dartium.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30433 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 01:21:22 +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
rmacnak@google.com 45c7c58273 Filter frames from debugger stack based on visibility rather than "debuggability" (steppability).
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30280 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 18:37:50 +00:00
hausner@google.com 328159f8e0 Fix breakpoints in mixin methods
When a function is compiled that originates from a mixing class, we
must use the original function to check for pending breakpoints.

Fixes issue 12361

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30080 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 22:43:07 +00:00
turnidge@google.com f46f1a2c69 Deoptimize closure functions in DeoptimizeWorld. This was causing
some breakpoints to be skipped when set in optimized closure
functions.

Update implicit_closure_function() to always return null for
factories. Factories use the shared data_ field for another purpose.
This fixes an assertion failure when HasImplicitClosureFunciton is
called for a factory.

Add a TODO for an assertion failure in Class::Name which is not in the
scope of this change.

(patched from an earlier review)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30063 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 18:53:28 +00:00
iposva@google.com 3dced243b3 Fix http://dartbug.com/14763
- Find main in the exported names of the root library.
- Unify how the main function is called from spawnUri
  and the initial isolate.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29865 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 00:55:41 +00:00
fschneider@google.com ce9573722c VM: Fix checked mode crash (issue 13831).
The AST for static getters differs between parsing the first time, and
subsequent parsings. This leads to a mismatch in deoptimization-ids
between the optimized and the unoptimized code.

This CL avoids creating different ASTs for the same static getters. To allow
better inlining of these getters, the initialization expression is wrapped in a
hidden static initializer-function. As a result the size of such getters is
constant and does not depend on the initializer expression.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29680 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 16:49:55 +00:00
iposva@google.com 2ed438e40c Reland https://code.google.com/p/dart/source/detail?r=29315:
- Make sure to keep the main/control port opened until the
  isolate is finished.
- Account for the number of opened control ports to be able
  to determine whether there are live ports.
- Ensure that the spawned isolated is kept alive until the
  initial startup message can be handled.
- Add more isolate tracing output.
- Use the control port for the debugger id.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29323 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-27 14:34:23 +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 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
fschneider@google.com a329b0e6bc Dart VM: Simplify code generation for equality operators.
By inserting the necessary checks for null inside the callee
at the AST level, the code generation of == operations can be
greatly simplified.

This is a performance-neutral change and a step for allowing
generic inlining of arbitrary == methods. So far we could only
inline them for a common set of types in the flow graph
optimizer.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28084 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 10:10:50 +00:00
iposva@google.com 8a9adf5656 - Use simplified token location call where appropriate.
R=asiva@google.com, hausner@google.com, mlippautz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27833 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 17:32:40 +00:00
hausner@google.com fd57843900 Update handling of ambiguous name references
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.

Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.

Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.

Fixes 12915, 12913, 12724.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +00:00