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

Side by Side Diff: runtime/vm/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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 6279 matching lines...) Expand 10 before | Expand all | Expand 10 after
6290 intptr_t Length() const; 6290 intptr_t Length() const;
6291 6291
6292 RawFunction* FunctionAtFrame(intptr_t frame_index) const; 6292 RawFunction* FunctionAtFrame(intptr_t frame_index) const;
6293 void SetFunctionAtFrame(intptr_t frame_index, const Function& func) const; 6293 void SetFunctionAtFrame(intptr_t frame_index, const Function& func) const;
6294 6294
6295 RawCode* CodeAtFrame(intptr_t frame_index) const; 6295 RawCode* CodeAtFrame(intptr_t frame_index) const;
6296 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const; 6296 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const;
6297 6297
6298 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; 6298 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const;
6299 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const; 6299 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const;
6300 void SetCatchStacktrace(const Array& func_array,
6301 const Array& code_array,
6302 const Array& pc_offset_array) const;
6300 6303
6301 void Append(const Array& func_list, 6304 void Append(const Array& func_list,
6302 const Array& code_list, 6305 const Array& code_list,
6303 const Array& pc_offset_list) const; 6306 const Array& pc_offset_list) const;
6304 6307
6305 static intptr_t InstanceSize() { 6308 static intptr_t InstanceSize() {
6306 return RoundedAllocationSize(sizeof(RawStacktrace)); 6309 return RoundedAllocationSize(sizeof(RawStacktrace));
6307 } 6310 }
6308 static RawStacktrace* New(const Array& func_array, 6311 static RawStacktrace* New(const Array& func_array,
6309 const Array& code_array, 6312 const Array& code_array,
6310 const Array& pc_offset_array, 6313 const Array& pc_offset_array,
6311 Heap::Space space = Heap::kNew); 6314 Heap::Space space = Heap::kNew);
6312 6315
6313 const char* ToCStringInternal(bool verbose) const; 6316 RawString* FullStacktrace() const;
6317 const char* ToCStringInternal() const;
6314 6318
6315 private: 6319 private:
6316 void set_function_array(const Array& function_array) const; 6320 void set_function_array(const Array& function_array) const;
6317 void set_code_array(const Array& code_array) const; 6321 void set_code_array(const Array& code_array) const;
6318 void set_pc_offset_array(const Array& pc_offset_array) const; 6322 void set_pc_offset_array(const Array& pc_offset_array) const;
6323 void set_catch_func_array(const Array& function_array) const;
6324 void set_catch_code_array(const Array& code_array) const;
6325 void set_catch_pc_offset_array(const Array& pc_offset_array) const;
6319 6326
6320 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); 6327 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance);
6321 friend class Class; 6328 friend class Class;
6322 }; 6329 };
6323 6330
6324 6331
6325 // Internal JavaScript regular expression object. 6332 // Internal JavaScript regular expression object.
6326 class JSRegExp : public Instance { 6333 class JSRegExp : public Instance {
6327 public: 6334 public:
6328 // Meaning of RegExType: 6335 // Meaning of RegExType:
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
6554 6561
6555 6562
6556 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6563 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6557 intptr_t index) { 6564 intptr_t index) {
6558 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6565 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6559 } 6566 }
6560 6567
6561 } // namespace dart 6568 } // namespace dart
6562 6569
6563 #endif // VM_OBJECT_H_ 6570 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698