| 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 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 4993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5004 }; | 5004 }; |
| 5005 | 5005 |
| 5006 | 5006 |
| 5007 // Internal stacktrace object used in exceptions for printing stack traces. | 5007 // Internal stacktrace object used in exceptions for printing stack traces. |
| 5008 class Stacktrace : public Instance { | 5008 class Stacktrace : public Instance { |
| 5009 public: | 5009 public: |
| 5010 intptr_t Length() const; | 5010 intptr_t Length() const; |
| 5011 RawFunction* FunctionAtFrame(intptr_t frame_index) const; | 5011 RawFunction* FunctionAtFrame(intptr_t frame_index) const; |
| 5012 RawCode* CodeAtFrame(intptr_t frame_index) const; | 5012 RawCode* CodeAtFrame(intptr_t frame_index) const; |
| 5013 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; | 5013 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; |
| 5014 void Append(const GrowableArray<uword>& stack_frame_pcs) const; | 5014 void Append(const GrowableArray<uword>& stack_frame_pcs, |
| 5015 const GrowableObjectArray& func_list, |
| 5016 const GrowableObjectArray& code_list) const; |
| 5015 | 5017 |
| 5016 static intptr_t InstanceSize() { | 5018 static intptr_t InstanceSize() { |
| 5017 return RoundedAllocationSize(sizeof(RawStacktrace)); | 5019 return RoundedAllocationSize(sizeof(RawStacktrace)); |
| 5018 } | 5020 } |
| 5019 static RawStacktrace* New(const GrowableArray<uword>& stack_frame_pcs, | 5021 static RawStacktrace* New(const GrowableArray<uword>& stack_frame_pcs, |
| 5022 const GrowableObjectArray& func_list, |
| 5023 const GrowableObjectArray& code_list, |
| 5020 Heap::Space space = Heap::kNew); | 5024 Heap::Space space = Heap::kNew); |
| 5021 | 5025 |
| 5022 const char* ToCStringInternal(bool verbose) const; | 5026 const char* ToCStringInternal(bool verbose) const; |
| 5023 | 5027 |
| 5024 private: | 5028 private: |
| 5025 void set_function_array(const Array& function_array) const; | 5029 void set_function_array(const Array& function_array) const; |
| 5026 void set_code_array(const Array& code_array) const; | 5030 void set_code_array(const Array& code_array) const; |
| 5027 void set_pc_offset_array(const Array& pc_offset_array) const; | 5031 void set_pc_offset_array(const Array& pc_offset_array) const; |
| 5028 void SetupStacktrace(intptr_t index, | 5032 void SetupStacktrace(intptr_t index, |
| 5029 const GrowableArray<uword>& stack_frame_pcs) const; | 5033 const GrowableArray<uword>& stack_frame_pcs) const; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5212 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5216 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5213 return false; | 5217 return false; |
| 5214 } | 5218 } |
| 5215 } | 5219 } |
| 5216 return true; | 5220 return true; |
| 5217 } | 5221 } |
| 5218 | 5222 |
| 5219 } // namespace dart | 5223 } // namespace dart |
| 5220 | 5224 |
| 5221 #endif // VM_OBJECT_H_ | 5225 #endif // VM_OBJECT_H_ |
| OLD | NEW |