Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: runtime/vm/raw_object.h

Issue 23964003: Traverse inlined frames lazily when printing the stacktrace. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 1466
1467 1467
1468 // VM type for capturing stacktraces when exceptions are thrown, 1468 // VM type for capturing stacktraces when exceptions are thrown,
1469 // Currently we don't have any interface that this object is supposed 1469 // Currently we don't have any interface that this object is supposed
1470 // to implement so we just support the 'toString' method which 1470 // to implement so we just support the 'toString' method which
1471 // converts the stack trace into a string. 1471 // converts the stack trace into a string.
1472 class RawStacktrace : public RawInstance { 1472 class RawStacktrace : public RawInstance {
1473 RAW_HEAP_OBJECT_IMPLEMENTATION(Stacktrace); 1473 RAW_HEAP_OBJECT_IMPLEMENTATION(Stacktrace);
1474 1474
1475 RawObject** from() { 1475 RawObject** from() {
1476 return reinterpret_cast<RawObject**>(&ptr()->function_array_); 1476 return reinterpret_cast<RawObject**>(&ptr()->code_array_);
1477 } 1477 }
1478 RawArray* function_array_; // Function for each frame in the stack trace.
1479 RawArray* code_array_; // Code object for each frame in the stack trace. 1478 RawArray* code_array_; // Code object for each frame in the stack trace.
1480 RawArray* pc_offset_array_; // Offset of PC for each frame. 1479 RawArray* pc_offset_array_; // Offset of PC for each frame.
1481 RawArray* catch_func_array_; // Func for each frame in catch stack trace.
1482 RawArray* catch_code_array_; // Code for each frame in catch stack trace. 1480 RawArray* catch_code_array_; // Code for each frame in catch stack trace.
1483 RawArray* catch_pc_offset_array_; // Offset of PC for each catch stack frame. 1481 RawArray* catch_pc_offset_array_; // Offset of PC for each catch stack frame.
1484 RawObject** to() { 1482 RawObject** to() {
1485 return reinterpret_cast<RawObject**>(&ptr()->catch_pc_offset_array_); 1483 return reinterpret_cast<RawObject**>(&ptr()->catch_pc_offset_array_);
1486 } 1484 }
1485 bool expand_inlined_; // False for special exceptions.
siva 2013/09/05 19:52:45 // False for pre allocated stack trace (used in OO
srdjan 2013/09/05 20:24:50 Done.
1487 }; 1486 };
1488 1487
1489 1488
1490 // VM type for capturing JS regular expressions. 1489 // VM type for capturing JS regular expressions.
1491 class RawJSRegExp : public RawInstance { 1490 class RawJSRegExp : public RawInstance {
1492 RAW_HEAP_OBJECT_IMPLEMENTATION(JSRegExp); 1491 RAW_HEAP_OBJECT_IMPLEMENTATION(JSRegExp);
1493 1492
1494 RawObject** from() { 1493 RawObject** from() {
1495 return reinterpret_cast<RawObject**>(&ptr()->data_length_); 1494 return reinterpret_cast<RawObject**>(&ptr()->data_length_);
1496 } 1495 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 // Make sure this is updated when new TypedData types are added. 1711 // Make sure this is updated when new TypedData types are added.
1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1712 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1713 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1714 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1716 return (kNullCid - kTypedDataInt8ArrayCid); 1715 return (kNullCid - kTypedDataInt8ArrayCid);
1717 } 1716 }
1718 1717
1719 } // namespace dart 1718 } // namespace dart
1720 1719
1721 #endif // VM_RAW_OBJECT_H_ 1720 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698