| 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 4572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4583 }; | 4583 }; |
| 4584 | 4584 |
| 4585 | 4585 |
| 4586 class UnhandledException : public Error { | 4586 class UnhandledException : public Error { |
| 4587 public: | 4587 public: |
| 4588 RawInstance* exception() const { return raw_ptr()->exception_; } | 4588 RawInstance* exception() const { return raw_ptr()->exception_; } |
| 4589 static intptr_t exception_offset() { | 4589 static intptr_t exception_offset() { |
| 4590 return OFFSET_OF(RawUnhandledException, exception_); | 4590 return OFFSET_OF(RawUnhandledException, exception_); |
| 4591 } | 4591 } |
| 4592 | 4592 |
| 4593 RawStacktrace* stacktrace() const { return raw_ptr()->stacktrace_; } | 4593 RawInstance* stacktrace() const { return raw_ptr()->stacktrace_; } |
| 4594 static intptr_t stacktrace_offset() { | 4594 static intptr_t stacktrace_offset() { |
| 4595 return OFFSET_OF(RawUnhandledException, stacktrace_); | 4595 return OFFSET_OF(RawUnhandledException, stacktrace_); |
| 4596 } | 4596 } |
| 4597 | 4597 |
| 4598 static intptr_t InstanceSize() { | 4598 static intptr_t InstanceSize() { |
| 4599 return RoundedAllocationSize(sizeof(RawUnhandledException)); | 4599 return RoundedAllocationSize(sizeof(RawUnhandledException)); |
| 4600 } | 4600 } |
| 4601 | 4601 |
| 4602 static RawUnhandledException* New(const Instance& exception, | 4602 static RawUnhandledException* New(const Instance& exception, |
| 4603 const Stacktrace& stacktrace, | 4603 const Instance& stacktrace, |
| 4604 Heap::Space space = Heap::kNew); | 4604 Heap::Space space = Heap::kNew); |
| 4605 | 4605 |
| 4606 virtual const char* ToErrorCString() const; | 4606 virtual const char* ToErrorCString() const; |
| 4607 | 4607 |
| 4608 private: | 4608 private: |
| 4609 static RawUnhandledException* New(Heap::Space space = Heap::kNew); | 4609 static RawUnhandledException* New(Heap::Space space = Heap::kNew); |
| 4610 | 4610 |
| 4611 void set_exception(const Instance& exception) const; | 4611 void set_exception(const Instance& exception) const; |
| 4612 void set_stacktrace(const Stacktrace& stacktrace) const; | 4612 void set_stacktrace(const Instance& stacktrace) const; |
| 4613 | 4613 |
| 4614 FINAL_HEAP_OBJECT_IMPLEMENTATION(UnhandledException, Error); | 4614 FINAL_HEAP_OBJECT_IMPLEMENTATION(UnhandledException, Error); |
| 4615 friend class Class; | 4615 friend class Class; |
| 4616 friend class ObjectStore; | 4616 friend class ObjectStore; |
| 4617 }; | 4617 }; |
| 4618 | 4618 |
| 4619 | 4619 |
| 4620 class UnwindError : public Error { | 4620 class UnwindError : public Error { |
| 4621 public: | 4621 public: |
| 4622 RawString* message() const { return raw_ptr()->message_; } | 4622 RawString* message() const { return raw_ptr()->message_; } |
| (...skipping 3175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7798 | 7798 |
| 7799 | 7799 |
| 7800 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7800 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7801 intptr_t index) { | 7801 intptr_t index) { |
| 7802 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7802 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7803 } | 7803 } |
| 7804 | 7804 |
| 7805 } // namespace dart | 7805 } // namespace dart |
| 7806 | 7806 |
| 7807 #endif // VM_OBJECT_H_ | 7807 #endif // VM_OBJECT_H_ |
| OLD | NEW |