Commit Graph

28 Commits

Author SHA1 Message Date
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
fschneider@google.com 90bb8f61bc Fix a crash bug when creating a stack trace from an optimized frame.
In some cases of NoSuchMethodError creating a stack trace with optimized
code did result in an assertion failure.

We don't have deoptimization info at all potentially throwing calls
in optimized code: Namely in the prologue that copies parameters.

BUG=dart:8200
TEST=tests run with --optimization-threshold=5
Review URL: https://codereview.chromium.org//12079071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17843 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 14:06:26 +00:00
fschneider@google.com dfda7854a8 Fix source position for stack traces with optimized top function.
Fix decoding of the deoptimization info when constructing a stack trace.

Fix stack trace for checked mode exceptions from optimized code.

BUG=dart:8058
TEST=runtime/tests/vm/dart/optimized_stacktrace_test.dart,
     tests/language/stack_overflow_stacktrace_test.dart
Review URL: https://codereview.chromium.org//12049039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17755 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 12:38:27 +00:00
srdjan@google.com 8451080044 Improve function lookup speed by working with raw objects only.
Review URL: https://codereview.chromium.org//11970043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17232 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 19:27:00 +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
asiva@google.com 62115b51fe Fix for issue 7757
- Iterate and collect all the inlined functions in an optimized dart frame
  into the stack frame when throwing an exception.
- Added a OptimizedDartFrameIterator class which iterates over all the inlined
  functions of a single optimized dart frame.
Review URL: https://codereview.chromium.org//11833025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17000 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-12 00:24:28 +00:00
srdjan@google.com 29e06db609 In unoptimized code use call for instanceof instead of inlined checks. This allows us to collect type feedback and to reduce the code size of unoptimized code. Next will be work on type tests as well.
Review URL: https://codereview.chromium.org//11694003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16589 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 22:22:39 +00:00
iposva@google.com dc2c8b3707 - Consolidate code into the old generation.
- Record pointers between code objects.
- Collect unreferenced code objects.
Review URL: https://codereview.chromium.org//11265026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14113 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 23:46:01 +00:00
kmillikin@google.com d7115e5eda Remove deoptimization index PC descriptors.
Put the PC (offset) of the deoptimization point and the deoptimization
reason in the DeoptInfo table.  The table entries are now triples of
(PC offset, info, reason).

R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13056 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 10:16:22 +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
kmillikin@google.com 8122966c80 Put live register bits in stackmaps.
Add a count of live registers to each stackmap and add bits describing the
registers.  This allows untagged values in general purpose registers at
safepoints.

R=vegorov@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10882055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11595 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 10:20:26 +00:00
srdjan@google.com 5f5150e031 Emit deoptimization information at stati calls (preparation for full deoptimization). Currently we use Deoptimization stubs to maintain the deoptimization info, do not emit stubs though for static calls.
Any instruction  that calls out of Dart code and into other Dart code or C++ may deoptimize.
Review URL: https://chromiumcodereview.appspot.com//10880079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11467 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 17:25:10 +00:00
kmillikin@google.com 94a5b82f60 Make stackmaps store their actual length.
This allows stackmaps with varying lengths in the same function, necessary
for the way we plan to support bitmaps for saved live registers.

R=vegorov@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10837303

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11019 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 08:43:32 +00:00
kmillikin@google.com 172ee045f3 Build and use stack maps in the SSA compiler.
Add a stack bitmap to the location summaries for calls that are GC
safepoints.  The bitmap covers the spill slots.  The register
allocator collects these bitmaps into a list and then marks live
pointer values during register allocation.  When emitting code for a
call, a heap-allocated stackmap is built.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10831261

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10618 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 06:59:24 +00:00
kmillikin@google.com f440cf8292 Fix an off-by-one error in the stack frame iteration.
When using a stackmap, we mapped stackmap index 0 to the code slot in the
frame.  This code is still unused, but judging from the test the intent is
to map index 0 to the first local slot in the frame.

R=vegorov@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10835034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10013 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 13:36:58 +00:00
srdjan@google.com 474d6950e3 Allow creating DartFrameIterator using explicit last_fp value (instead of always expecting it from isolate).
Review URL: https://chromiumcodereview.appspot.com//10827049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9961 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 19:42:16 +00:00
asiva@google.com c71a8cc1ee Change dart frame and stub frame layout to include the PC of the code executing on the frame. The stack frame layout is as follows:
ret PC
  saved EBP                          <== EBP
  PC (used to locate RawInstruction) <== ESP
Review URL: https://chromiumcodereview.appspot.com//10375059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7675 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 00:47:05 +00:00
asiva@google.com 09adb99a85 Add a stub_code_space in the heap alongside code_space so that stub code generation happens here and it is easy to determine if a PC is a stub code or not.
This gets rid of the temporary change made in code_generator.cc for fast access to the top dart frame. In addition it will not pollute the pc ==> code cache that I plan to add next as we don't have to store stub pcs in that table.
Review URL: https://chromiumcodereview.appspot.com//10223015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7033 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 18:00:53 +00:00
asiva@google.com 3107319e40 Simplify representation of stack frames. Remove the special types DartFrame/StubFrame and instead use StackFrame with methods IsDartFrame and IsStubFrame for frames representing Dart or Stub Code. This eliminates all the complexity that was added to ensure that we always see only one stub frame before hitting a dart frame during iteration.
Fixes bug 6380625 which was another case when we had two stub frames before hitting the dart frame.
Review URL: https://chromiumcodereview.appspot.com//10173008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6920 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 01:15:28 +00:00
asiva@google.com 2d3775a1b1 Resubmit change 6302 after fixing the compiler warning on older GCC compiler versions:
Change 6302 description:
- Wire the stack frame iterator to use stack maps for traversing objects if
there are stack maps in the code object. If there are no stack maps it still
does the old style stack frame traversal between fp and sp looking for tagged
pointers.
- Added a mechanism to be able to iterate over the code space and look for a
particular object.
Review URL: https://chromiumcodereview.appspot.com//10030001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6331 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 18:20:23 +00:00
asiva@google.com c79da818cc Revert change 6302 until the compiler warning is addressed.
Review URL: https://chromiumcodereview.appspot.com//10025003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6304 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 02:04:28 +00:00
asiva@google.com c27cec5b6e - Wire the stack frame iterator to use stack maps for traversing objects if there are stack maps in the code object. If there are no stack maps it still does the old style stack frame traversal between fp and sp looking for tagged pointers.
- Added a mechanism to be able to iterate over the code space and look for a particular object.

- Remove registration of code objects into the code index table.
Review URL: https://chromiumcodereview.appspot.com//9791048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6302 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 01:44:48 +00:00
srdjan@google.com f6dfa63c9a Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code object that belongs to that function. That is not the case, there can be several Code object generated for the same function. "Renamed" "code()" to "CurrentCode()", use unoptimized_code where it is clear that we are using unoptimized code only. If compiled, there is a 1:1 correspondence between function and unoptimized code.
Review URL: https://chromiumcodereview.appspot.com//9475031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4656 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 01:31:44 +00:00
srdjan@google.com 70c2a65acd Fix issue 1857: code lookup was wrong when searching for exception handler.
(TODO: reevaluate who is using the function's code reference).
Review URL: https://chromiumcodereview.appspot.com//9480006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4633 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 18:41:57 +00:00
turnidge@google.com 0ddd4c04e9 Dart_PropagateError, take 2.
This change hopefully takes care of the non-mac build issues.  The
checked mode failures are fixed in a separate cl.
Review URL: https://chromiumcodereview.appspot.com//9316071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3863 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 19:05:06 +00:00
turnidge@google.com ae88492093 Revert Dart_PropagateError until I can track down the problems in
checked mode tests.

Sorry for the hubbub.
Review URL: https://chromiumcodereview.appspot.com//9314053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3823 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 23:39:28 +00:00
turnidge@google.com 9da62c5fea Add Dart_PropagateError.
This function can be used in native functions to properly pass all
errors up the stack.

Set the long jump base in the Compiler instead of outside of the
compiler.  A bunch of errors that used to be propagated through the
sticky_error are now propagated through return values.  This includes
all of the DartEntry and DartLibraryCall functions.

In particular, we no longer use the long jump to cross dart frames.
Instead errors are propagated across dart frames using the same
mechanism that we use for unhandled exceptions.  I've added assertions
to make sure that we only use the long jump when it is "safe".
Review URL: https://chromiumcodereview.appspot.com//9169102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3815 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:34:16 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00