| 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 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4569 }; | 4569 }; |
| 4570 | 4570 |
| 4571 | 4571 |
| 4572 class UnhandledException : public Error { | 4572 class UnhandledException : public Error { |
| 4573 public: | 4573 public: |
| 4574 RawInstance* exception() const { return raw_ptr()->exception_; } | 4574 RawInstance* exception() const { return raw_ptr()->exception_; } |
| 4575 static intptr_t exception_offset() { | 4575 static intptr_t exception_offset() { |
| 4576 return OFFSET_OF(RawUnhandledException, exception_); | 4576 return OFFSET_OF(RawUnhandledException, exception_); |
| 4577 } | 4577 } |
| 4578 | 4578 |
| 4579 RawInstance* stacktrace() const { return raw_ptr()->stacktrace_; } | 4579 RawStacktrace* stacktrace() const { return raw_ptr()->stacktrace_; } |
| 4580 static intptr_t stacktrace_offset() { | 4580 static intptr_t stacktrace_offset() { |
| 4581 return OFFSET_OF(RawUnhandledException, stacktrace_); | 4581 return OFFSET_OF(RawUnhandledException, stacktrace_); |
| 4582 } | 4582 } |
| 4583 | 4583 |
| 4584 static intptr_t InstanceSize() { | 4584 static intptr_t InstanceSize() { |
| 4585 return RoundedAllocationSize(sizeof(RawUnhandledException)); | 4585 return RoundedAllocationSize(sizeof(RawUnhandledException)); |
| 4586 } | 4586 } |
| 4587 | 4587 |
| 4588 static RawUnhandledException* New(const Instance& exception, | 4588 static RawUnhandledException* New(const Instance& exception, |
| 4589 const Instance& stacktrace, | 4589 const Stacktrace& stacktrace, |
| 4590 Heap::Space space = Heap::kNew); | 4590 Heap::Space space = Heap::kNew); |
| 4591 | 4591 |
| 4592 virtual const char* ToErrorCString() const; | 4592 virtual const char* ToErrorCString() const; |
| 4593 | 4593 |
| 4594 private: | 4594 private: |
| 4595 static RawUnhandledException* New(Heap::Space space = Heap::kNew); | 4595 static RawUnhandledException* New(Heap::Space space = Heap::kNew); |
| 4596 | 4596 |
| 4597 void set_exception(const Instance& exception) const; | 4597 void set_exception(const Instance& exception) const; |
| 4598 void set_stacktrace(const Instance& stacktrace) const; | 4598 void set_stacktrace(const Stacktrace& stacktrace) const; |
| 4599 | 4599 |
| 4600 FINAL_HEAP_OBJECT_IMPLEMENTATION(UnhandledException, Error); | 4600 FINAL_HEAP_OBJECT_IMPLEMENTATION(UnhandledException, Error); |
| 4601 friend class Class; | 4601 friend class Class; |
| 4602 friend class ObjectStore; | 4602 friend class ObjectStore; |
| 4603 }; | 4603 }; |
| 4604 | 4604 |
| 4605 | 4605 |
| 4606 class UnwindError : public Error { | 4606 class UnwindError : public Error { |
| 4607 public: | 4607 public: |
| 4608 RawString* message() const { return raw_ptr()->message_; } | 4608 RawString* message() const { return raw_ptr()->message_; } |
| (...skipping 3183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7792 | 7792 |
| 7793 | 7793 |
| 7794 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7794 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7795 intptr_t index) { | 7795 intptr_t index) { |
| 7796 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7796 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7797 } | 7797 } |
| 7798 | 7798 |
| 7799 } // namespace dart | 7799 } // namespace dart |
| 7800 | 7800 |
| 7801 #endif // VM_OBJECT_H_ | 7801 #endif // VM_OBJECT_H_ |
| OLD | NEW |