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

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

Issue 939773003: - Simplify collection of stack traces. If we determine that a stack (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/object.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_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 7370 matching lines...) Expand 10 before | Expand all | Expand 10 after
7381 7381
7382 intptr_t Length() const; 7382 intptr_t Length() const;
7383 7383
7384 RawFunction* FunctionAtFrame(intptr_t frame_index) const; 7384 RawFunction* FunctionAtFrame(intptr_t frame_index) const;
7385 7385
7386 RawCode* CodeAtFrame(intptr_t frame_index) const; 7386 RawCode* CodeAtFrame(intptr_t frame_index) const;
7387 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const; 7387 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const;
7388 7388
7389 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; 7389 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const;
7390 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const; 7390 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const;
7391 void SetCatchStacktrace(const Array& code_array,
7392 const Array& pc_offset_array) const;
7393 void set_expand_inlined(bool value) const; 7391 void set_expand_inlined(bool value) const;
7394 7392
7395 void Append(const Array& code_list,
7396 const Array& pc_offset_list,
7397 const intptr_t start_index) const;
7398
7399 static intptr_t InstanceSize() { 7393 static intptr_t InstanceSize() {
7400 return RoundedAllocationSize(sizeof(RawStacktrace)); 7394 return RoundedAllocationSize(sizeof(RawStacktrace));
7401 } 7395 }
7402 static RawStacktrace* New(const Array& code_array, 7396 static RawStacktrace* New(const Array& code_array,
7403 const Array& pc_offset_array, 7397 const Array& pc_offset_array,
7404 Heap::Space space = Heap::kNew); 7398 Heap::Space space = Heap::kNew);
7405 7399
7406 RawString* FullStacktrace() const; 7400 RawString* FullStacktrace() const;
7407 7401
7408 // The argument 'max_frames' limits the number of printed frames. 7402 // The argument 'max_frames' limits the number of printed frames.
7409 const char* ToCStringInternal(intptr_t* frame_index, 7403 const char* ToCStringInternal(intptr_t* frame_index,
7410 intptr_t max_frames = kMaxInt32) const; 7404 intptr_t max_frames = kMaxInt32) const;
7411 7405
7412 private: 7406 private:
7413 void set_code_array(const Array& code_array) const; 7407 void set_code_array(const Array& code_array) const;
7414 void set_pc_offset_array(const Array& pc_offset_array) const; 7408 void set_pc_offset_array(const Array& pc_offset_array) const;
7415 void set_catch_code_array(const Array& code_array) const;
7416 void set_catch_pc_offset_array(const Array& pc_offset_array) const;
7417 bool expand_inlined() const; 7409 bool expand_inlined() const;
7418 7410
7419 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); 7411 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance);
7420 friend class Class; 7412 friend class Class;
7421 friend class Debugger; 7413 friend class Debugger;
7422 }; 7414 };
7423 7415
7424 7416
7425 // Internal JavaScript regular expression object. 7417 // Internal JavaScript regular expression object.
7426 class JSRegExp : public Instance { 7418 class JSRegExp : public Instance {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
7806 7798
7807 7799
7808 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7800 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7809 intptr_t index) { 7801 intptr_t index) {
7810 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7802 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7811 } 7803 }
7812 7804
7813 } // namespace dart 7805 } // namespace dart
7814 7806
7815 #endif // VM_OBJECT_H_ 7807 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698