| 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 5838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5849 | 5849 |
| 5850 | 5850 |
| 5851 // Internal stacktrace object used in exceptions for printing stack traces. | 5851 // Internal stacktrace object used in exceptions for printing stack traces. |
| 5852 class Stacktrace : public Instance { | 5852 class Stacktrace : public Instance { |
| 5853 public: | 5853 public: |
| 5854 static const int kPreallocatedStackdepth = 10; | 5854 static const int kPreallocatedStackdepth = 10; |
| 5855 | 5855 |
| 5856 intptr_t Length() const; | 5856 intptr_t Length() const; |
| 5857 | 5857 |
| 5858 RawFunction* FunctionAtFrame(intptr_t frame_index) const; | 5858 RawFunction* FunctionAtFrame(intptr_t frame_index) const; |
| 5859 void SetFunctionAtFrame(intptr_t frame_index, const Function& func) const; | |
| 5860 | 5859 |
| 5861 RawCode* CodeAtFrame(intptr_t frame_index) const; | 5860 RawCode* CodeAtFrame(intptr_t frame_index) const; |
| 5862 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const; | 5861 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const; |
| 5863 | 5862 |
| 5864 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; | 5863 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; |
| 5865 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const; | 5864 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const; |
| 5866 void SetCatchStacktrace(const Array& func_array, | 5865 void SetCatchStacktrace(const Array& code_array, |
| 5867 const Array& code_array, | |
| 5868 const Array& pc_offset_array) const; | 5866 const Array& pc_offset_array) const; |
| 5867 void set_expand_inlined(bool value) const; |
| 5869 | 5868 |
| 5870 void Append(const Array& func_list, | 5869 void Append(const Array& code_list, const Array& pc_offset_list) const; |
| 5871 const Array& code_list, | |
| 5872 const Array& pc_offset_list) const; | |
| 5873 | 5870 |
| 5874 static intptr_t InstanceSize() { | 5871 static intptr_t InstanceSize() { |
| 5875 return RoundedAllocationSize(sizeof(RawStacktrace)); | 5872 return RoundedAllocationSize(sizeof(RawStacktrace)); |
| 5876 } | 5873 } |
| 5877 static RawStacktrace* New(const Array& func_array, | 5874 static RawStacktrace* New(const Array& code_array, |
| 5878 const Array& code_array, | |
| 5879 const Array& pc_offset_array, | 5875 const Array& pc_offset_array, |
| 5880 Heap::Space space = Heap::kNew); | 5876 Heap::Space space = Heap::kNew); |
| 5881 | 5877 |
| 5882 RawString* FullStacktrace() const; | 5878 RawString* FullStacktrace() const; |
| 5883 const char* ToCStringInternal(intptr_t frame_index) const; | 5879 const char* ToCStringInternal(intptr_t frame_index) const; |
| 5884 | 5880 |
| 5885 private: | 5881 private: |
| 5886 void set_function_array(const Array& function_array) const; | |
| 5887 void set_code_array(const Array& code_array) const; | 5882 void set_code_array(const Array& code_array) const; |
| 5888 void set_pc_offset_array(const Array& pc_offset_array) const; | 5883 void set_pc_offset_array(const Array& pc_offset_array) const; |
| 5889 void set_catch_func_array(const Array& function_array) const; | |
| 5890 void set_catch_code_array(const Array& code_array) const; | 5884 void set_catch_code_array(const Array& code_array) const; |
| 5891 void set_catch_pc_offset_array(const Array& pc_offset_array) const; | 5885 void set_catch_pc_offset_array(const Array& pc_offset_array) const; |
| 5886 bool expand_inlined() const; |
| 5892 | 5887 |
| 5893 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); | 5888 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); |
| 5894 friend class Class; | 5889 friend class Class; |
| 5895 }; | 5890 }; |
| 5896 | 5891 |
| 5897 | 5892 |
| 5898 // Internal JavaScript regular expression object. | 5893 // Internal JavaScript regular expression object. |
| 5899 class JSRegExp : public Instance { | 5894 class JSRegExp : public Instance { |
| 5900 public: | 5895 public: |
| 5901 // Meaning of RegExType: | 5896 // Meaning of RegExType: |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6162 | 6157 |
| 6163 | 6158 |
| 6164 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6159 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6165 intptr_t index) { | 6160 intptr_t index) { |
| 6166 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6161 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6167 } | 6162 } |
| 6168 | 6163 |
| 6169 } // namespace dart | 6164 } // namespace dart |
| 6170 | 6165 |
| 6171 #endif // VM_OBJECT_H_ | 6166 #endif // VM_OBJECT_H_ |
| OLD | NEW |