OLD | NEW |
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 RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_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 8426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8437 } | 8437 } |
8438 static RawStackTrace* New(const Array& code_array, | 8438 static RawStackTrace* New(const Array& code_array, |
8439 const Array& pc_offset_array, | 8439 const Array& pc_offset_array, |
8440 Heap::Space space = Heap::kNew); | 8440 Heap::Space space = Heap::kNew); |
8441 | 8441 |
8442 static RawStackTrace* New(const Array& code_array, | 8442 static RawStackTrace* New(const Array& code_array, |
8443 const Array& pc_offset_array, | 8443 const Array& pc_offset_array, |
8444 const StackTrace& async_link, | 8444 const StackTrace& async_link, |
8445 Heap::Space space = Heap::kNew); | 8445 Heap::Space space = Heap::kNew); |
8446 | 8446 |
| 8447 // The argument 'max_frames' limits the number of printed frames. |
| 8448 static const char* ToCStringInternal(const StackTrace& stack_trace, |
| 8449 intptr_t* frame_index, |
| 8450 intptr_t max_frames = kMaxInt32); |
| 8451 |
8447 private: | 8452 private: |
8448 static const char* ToDartCString(const StackTrace& stack_trace_in); | |
8449 static const char* ToDwarfCString(const StackTrace& stack_trace_in); | |
8450 | |
8451 void set_code_array(const Array& code_array) const; | 8453 void set_code_array(const Array& code_array) const; |
8452 void set_pc_offset_array(const Array& pc_offset_array) const; | 8454 void set_pc_offset_array(const Array& pc_offset_array) const; |
8453 bool expand_inlined() const; | 8455 bool expand_inlined() const; |
8454 | 8456 |
8455 FINAL_HEAP_OBJECT_IMPLEMENTATION(StackTrace, Instance); | 8457 FINAL_HEAP_OBJECT_IMPLEMENTATION(StackTrace, Instance); |
8456 friend class Class; | 8458 friend class Class; |
8457 friend class Debugger; | 8459 friend class Debugger; |
8458 }; | 8460 }; |
8459 | 8461 |
8460 | 8462 |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8932 | 8934 |
8933 inline void TypeArguments::SetHash(intptr_t value) const { | 8935 inline void TypeArguments::SetHash(intptr_t value) const { |
8934 // This is only safe because we create a new Smi, which does not cause | 8936 // This is only safe because we create a new Smi, which does not cause |
8935 // heap allocation. | 8937 // heap allocation. |
8936 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8938 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8937 } | 8939 } |
8938 | 8940 |
8939 } // namespace dart | 8941 } // namespace dart |
8940 | 8942 |
8941 #endif // RUNTIME_VM_OBJECT_H_ | 8943 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |