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

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

Issue 12316116: Add functionality to get full stack trace when exceptions are thrown. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 // converts the stack trace into a string. 1555 // converts the stack trace into a string.
1556 class RawStacktrace : public RawInstance { 1556 class RawStacktrace : public RawInstance {
1557 RAW_HEAP_OBJECT_IMPLEMENTATION(Stacktrace); 1557 RAW_HEAP_OBJECT_IMPLEMENTATION(Stacktrace);
1558 1558
1559 RawObject** from() { 1559 RawObject** from() {
1560 return reinterpret_cast<RawObject**>(&ptr()->function_array_); 1560 return reinterpret_cast<RawObject**>(&ptr()->function_array_);
1561 } 1561 }
1562 RawArray* function_array_; // Function for each frame in the stack trace. 1562 RawArray* function_array_; // Function for each frame in the stack trace.
1563 RawArray* code_array_; // Code object for each frame in the stack trace. 1563 RawArray* code_array_; // Code object for each frame in the stack trace.
1564 RawArray* pc_offset_array_; // Offset of PC for each frame. 1564 RawArray* pc_offset_array_; // Offset of PC for each frame.
1565 RawArray* catch_func_array_; // Func for each frame in catch stack trace.
1566 RawArray* catch_code_array_; // Code for each frame in catch stack trace.
1567 RawArray* catch_pc_offset_array_; // Offset of PC for each catch stack frame.
1565 RawObject** to() { 1568 RawObject** to() {
1566 return reinterpret_cast<RawObject**>(&ptr()->pc_offset_array_); 1569 return reinterpret_cast<RawObject**>(&ptr()->catch_pc_offset_array_);
1567 } 1570 }
1568 }; 1571 };
1569 1572
1570 1573
1571 // VM type for capturing JS regular expressions. 1574 // VM type for capturing JS regular expressions.
1572 class RawJSRegExp : public RawInstance { 1575 class RawJSRegExp : public RawInstance {
1573 RAW_HEAP_OBJECT_IMPLEMENTATION(JSRegExp); 1576 RAW_HEAP_OBJECT_IMPLEMENTATION(JSRegExp);
1574 1577
1575 RawObject** from() { 1578 RawObject** from() {
1576 return reinterpret_cast<RawObject**>(&ptr()->data_length_); 1579 return reinterpret_cast<RawObject**>(&ptr()->data_length_);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 kExternalFloat32x4ArrayCid == kExternalInt8ArrayCid + 9 && 1743 kExternalFloat32x4ArrayCid == kExternalInt8ArrayCid + 9 &&
1741 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 10 && 1744 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 10 &&
1742 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 11 && 1745 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 11 &&
1743 kStacktraceCid == kExternalInt8ArrayCid + 12); 1746 kStacktraceCid == kExternalInt8ArrayCid + 12);
1744 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); 1747 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
1745 } 1748 }
1746 1749
1747 } // namespace dart 1750 } // namespace dart
1748 1751
1749 #endif // VM_RAW_OBJECT_H_ 1752 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698