| 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 5221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5232 }; | 5232 }; |
| 5233 | 5233 |
| 5234 | 5234 |
| 5235 // Internal stacktrace object used in exceptions for printing stack traces. | 5235 // Internal stacktrace object used in exceptions for printing stack traces. |
| 5236 class Stacktrace : public Instance { | 5236 class Stacktrace : public Instance { |
| 5237 public: | 5237 public: |
| 5238 intptr_t Length() const; | 5238 intptr_t Length() const; |
| 5239 RawFunction* FunctionAtFrame(intptr_t frame_index) const; | 5239 RawFunction* FunctionAtFrame(intptr_t frame_index) const; |
| 5240 RawCode* CodeAtFrame(intptr_t frame_index) const; | 5240 RawCode* CodeAtFrame(intptr_t frame_index) const; |
| 5241 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; | 5241 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; |
| 5242 void Append(const GrowableArray<uword>& stack_frame_pcs, | 5242 void Append(const GrowableObjectArray& func_list, |
| 5243 const GrowableObjectArray& func_list, | 5243 const GrowableObjectArray& code_list, |
| 5244 const GrowableObjectArray& code_list) const; | 5244 const GrowableObjectArray& pc_offset_list) const; |
| 5245 | 5245 |
| 5246 static intptr_t InstanceSize() { | 5246 static intptr_t InstanceSize() { |
| 5247 return RoundedAllocationSize(sizeof(RawStacktrace)); | 5247 return RoundedAllocationSize(sizeof(RawStacktrace)); |
| 5248 } | 5248 } |
| 5249 static RawStacktrace* New(const GrowableArray<uword>& stack_frame_pcs, | 5249 static RawStacktrace* New(const GrowableObjectArray& func_list, |
| 5250 const GrowableObjectArray& func_list, | |
| 5251 const GrowableObjectArray& code_list, | 5250 const GrowableObjectArray& code_list, |
| 5251 const GrowableObjectArray& pc_offset_list, |
| 5252 Heap::Space space = Heap::kNew); | 5252 Heap::Space space = Heap::kNew); |
| 5253 | 5253 |
| 5254 const char* ToCStringInternal(bool verbose) const; | 5254 const char* ToCStringInternal(bool verbose) const; |
| 5255 | 5255 |
| 5256 private: | 5256 private: |
| 5257 void set_function_array(const Array& function_array) const; | 5257 void set_function_array(const Array& function_array) const; |
| 5258 void set_code_array(const Array& code_array) const; | 5258 void set_code_array(const Array& code_array) const; |
| 5259 void set_pc_offset_array(const Array& pc_offset_array) const; | 5259 void set_pc_offset_array(const Array& pc_offset_array) const; |
| 5260 void SetupStacktrace(intptr_t index, | |
| 5261 const GrowableArray<uword>& stack_frame_pcs) const; | |
| 5262 | 5260 |
| 5263 HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); | 5261 HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); |
| 5264 friend class Class; | 5262 friend class Class; |
| 5265 }; | 5263 }; |
| 5266 | 5264 |
| 5267 | 5265 |
| 5268 // Internal JavaScript regular expression object. | 5266 // Internal JavaScript regular expression object. |
| 5269 class JSRegExp : public Instance { | 5267 class JSRegExp : public Instance { |
| 5270 public: | 5268 public: |
| 5271 // Meaning of RegExType: | 5269 // Meaning of RegExType: |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5449 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5447 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5450 return false; | 5448 return false; |
| 5451 } | 5449 } |
| 5452 } | 5450 } |
| 5453 return true; | 5451 return true; |
| 5454 } | 5452 } |
| 5455 | 5453 |
| 5456 } // namespace dart | 5454 } // namespace dart |
| 5457 | 5455 |
| 5458 #endif // VM_OBJECT_H_ | 5456 #endif // VM_OBJECT_H_ |
| OLD | NEW |