| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
| 6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/snapshot.h" | 10 #include "vm/snapshot.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 V(Script) \ | 30 V(Script) \ |
| 31 V(Library) \ | 31 V(Library) \ |
| 32 V(LibraryPrefix) \ | 32 V(LibraryPrefix) \ |
| 33 V(Code) \ | 33 V(Code) \ |
| 34 V(Instructions) \ | 34 V(Instructions) \ |
| 35 V(PcDescriptors) \ | 35 V(PcDescriptors) \ |
| 36 V(ExceptionHandlers) \ | 36 V(ExceptionHandlers) \ |
| 37 V(Context) \ | 37 V(Context) \ |
| 38 V(ContextScope) \ | 38 V(ContextScope) \ |
| 39 V(UnhandledException) \ | 39 V(UnhandledException) \ |
| 40 V(ApiFailure) \ | 40 V(ApiError) \ |
| 41 V(Instance) \ | 41 V(Instance) \ |
| 42 V(Number) \ | 42 V(Number) \ |
| 43 V(Integer) \ | 43 V(Integer) \ |
| 44 V(Smi) \ | 44 V(Smi) \ |
| 45 V(Mint) \ | 45 V(Mint) \ |
| 46 V(Bigint) \ | 46 V(Bigint) \ |
| 47 V(Double) \ | 47 V(Double) \ |
| 48 V(String) \ | 48 V(String) \ |
| 49 V(OneByteString) \ | 49 V(OneByteString) \ |
| 50 V(TwoByteString) \ | 50 V(TwoByteString) \ |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 return reinterpret_cast<RawObject**>(&ptr()->exception_); | 584 return reinterpret_cast<RawObject**>(&ptr()->exception_); |
| 585 } | 585 } |
| 586 RawInstance* exception_; | 586 RawInstance* exception_; |
| 587 RawInstance* stacktrace_; | 587 RawInstance* stacktrace_; |
| 588 RawObject** to() { | 588 RawObject** to() { |
| 589 return reinterpret_cast<RawObject**>(&ptr()->stacktrace_); | 589 return reinterpret_cast<RawObject**>(&ptr()->stacktrace_); |
| 590 } | 590 } |
| 591 }; | 591 }; |
| 592 | 592 |
| 593 | 593 |
| 594 class RawApiFailure : public RawObject { | 594 class RawApiError : public RawObject { |
| 595 RAW_HEAP_OBJECT_IMPLEMENTATION(ApiFailure); | 595 RAW_HEAP_OBJECT_IMPLEMENTATION(ApiError); |
| 596 | 596 |
| 597 RawObject** from() { | 597 RawObject** from() { |
| 598 return reinterpret_cast<RawObject**>(&ptr()->message_); | 598 return reinterpret_cast<RawObject**>(&ptr()->data_); |
| 599 } | 599 } |
| 600 RawString* message_; | 600 RawObject* data_; |
| 601 RawObject** to() { | 601 RawObject** to() { |
| 602 return reinterpret_cast<RawObject**>(&ptr()->message_); | 602 return reinterpret_cast<RawObject**>(&ptr()->data_); |
| 603 } | 603 } |
| 604 }; | 604 }; |
| 605 | 605 |
| 606 | 606 |
| 607 class RawInstance : public RawObject { | 607 class RawInstance : public RawObject { |
| 608 RAW_HEAP_OBJECT_IMPLEMENTATION(Instance); | 608 RAW_HEAP_OBJECT_IMPLEMENTATION(Instance); |
| 609 }; | 609 }; |
| 610 | 610 |
| 611 | 611 |
| 612 class RawNumber : public RawInstance { | 612 class RawNumber : public RawInstance { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 intptr_t type_; // Uninitialized, simple or complex. | 769 intptr_t type_; // Uninitialized, simple or complex. |
| 770 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 770 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 771 | 771 |
| 772 // Variable length data follows here. | 772 // Variable length data follows here. |
| 773 uint8_t data_[0]; | 773 uint8_t data_[0]; |
| 774 }; | 774 }; |
| 775 | 775 |
| 776 } // namespace dart | 776 } // namespace dart |
| 777 | 777 |
| 778 #endif // VM_RAW_OBJECT_H_ | 778 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |