| 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 6275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6286 // Internal stacktrace object used in exceptions for printing stack traces. | 6286 // Internal stacktrace object used in exceptions for printing stack traces. |
| 6287 class Stacktrace : public Instance { | 6287 class Stacktrace : public Instance { |
| 6288 public: | 6288 public: |
| 6289 intptr_t Length() const; | 6289 intptr_t Length() const; |
| 6290 RawFunction* FunctionAtFrame(intptr_t frame_index) const; | 6290 RawFunction* FunctionAtFrame(intptr_t frame_index) const; |
| 6291 RawCode* CodeAtFrame(intptr_t frame_index) const; | 6291 RawCode* CodeAtFrame(intptr_t frame_index) const; |
| 6292 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; | 6292 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; |
| 6293 void Append(const GrowableObjectArray& func_list, | 6293 void Append(const GrowableObjectArray& func_list, |
| 6294 const GrowableObjectArray& code_list, | 6294 const GrowableObjectArray& code_list, |
| 6295 const GrowableObjectArray& pc_offset_list) const; | 6295 const GrowableObjectArray& pc_offset_list) const; |
| 6296 void SetCatchStacktrace(const Array& func_array, |
| 6297 const Array& code_array, |
| 6298 const Array& pc_offset_array) const; |
| 6296 | 6299 |
| 6297 static intptr_t InstanceSize() { | 6300 static intptr_t InstanceSize() { |
| 6298 return RoundedAllocationSize(sizeof(RawStacktrace)); | 6301 return RoundedAllocationSize(sizeof(RawStacktrace)); |
| 6299 } | 6302 } |
| 6300 static RawStacktrace* New(const GrowableObjectArray& func_list, | 6303 static RawStacktrace* New(const Array& func_array, |
| 6301 const GrowableObjectArray& code_list, | 6304 const Array& code_array, |
| 6302 const GrowableObjectArray& pc_offset_list, | 6305 const Array& pc_offset_array, |
| 6303 Heap::Space space = Heap::kNew); | 6306 Heap::Space space = Heap::kNew); |
| 6304 | 6307 |
| 6305 const char* ToCStringInternal(bool verbose) const; | 6308 RawString* FullStacktrace() const; |
| 6306 | 6309 |
| 6307 private: | 6310 private: |
| 6308 void set_function_array(const Array& function_array) const; | 6311 void set_function_array(const Array& function_array) const; |
| 6309 void set_code_array(const Array& code_array) const; | 6312 void set_code_array(const Array& code_array) const; |
| 6310 void set_pc_offset_array(const Array& pc_offset_array) const; | 6313 void set_pc_offset_array(const Array& pc_offset_array) const; |
| 6311 | 6314 |
| 6312 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); | 6315 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); |
| 6313 friend class Class; | 6316 friend class Class; |
| 6314 }; | 6317 }; |
| 6315 | 6318 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6546 | 6549 |
| 6547 | 6550 |
| 6548 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6551 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6549 intptr_t index) { | 6552 intptr_t index) { |
| 6550 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6553 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6551 } | 6554 } |
| 6552 | 6555 |
| 6553 } // namespace dart | 6556 } // namespace dart |
| 6554 | 6557 |
| 6555 #endif // VM_OBJECT_H_ | 6558 #endif // VM_OBJECT_H_ |
| OLD | NEW |