| 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_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 "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 V(TokenStream) \ | 30 V(TokenStream) \ |
| 31 V(Script) \ | 31 V(Script) \ |
| 32 V(Library) \ | 32 V(Library) \ |
| 33 V(LibraryPrefix) \ | 33 V(LibraryPrefix) \ |
| 34 V(Code) \ | 34 V(Code) \ |
| 35 V(Instructions) \ | 35 V(Instructions) \ |
| 36 V(PcDescriptors) \ | 36 V(PcDescriptors) \ |
| 37 V(Stackmap) \ | 37 V(Stackmap) \ |
| 38 V(LocalVarDescriptors) \ | 38 V(LocalVarDescriptors) \ |
| 39 V(ExceptionHandlers) \ | 39 V(ExceptionHandlers) \ |
| 40 V(DeoptInfo) \ |
| 40 V(Context) \ | 41 V(Context) \ |
| 41 V(ContextScope) \ | 42 V(ContextScope) \ |
| 42 V(ICData) \ | 43 V(ICData) \ |
| 43 V(SubtypeTestCache) \ | 44 V(SubtypeTestCache) \ |
| 44 V(Error) \ | 45 V(Error) \ |
| 45 V(ApiError) \ | 46 V(ApiError) \ |
| 46 V(LanguageError) \ | 47 V(LanguageError) \ |
| 47 V(UnhandledException) \ | 48 V(UnhandledException) \ |
| 48 V(UnwindError) \ | 49 V(UnwindError) \ |
| 49 V(Instance) \ | 50 V(Instance) \ |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 class RawCode : public RawObject { | 778 class RawCode : public RawObject { |
| 778 RAW_HEAP_OBJECT_IMPLEMENTATION(Code); | 779 RAW_HEAP_OBJECT_IMPLEMENTATION(Code); |
| 779 | 780 |
| 780 RawObject** from() { | 781 RawObject** from() { |
| 781 return reinterpret_cast<RawObject**>(&ptr()->instructions_); | 782 return reinterpret_cast<RawObject**>(&ptr()->instructions_); |
| 782 } | 783 } |
| 783 RawInstructions* instructions_; | 784 RawInstructions* instructions_; |
| 784 RawFunction* function_; | 785 RawFunction* function_; |
| 785 RawExceptionHandlers* exception_handlers_; | 786 RawExceptionHandlers* exception_handlers_; |
| 786 RawPcDescriptors* pc_descriptors_; | 787 RawPcDescriptors* pc_descriptors_; |
| 788 RawArray* deopt_info_array_; |
| 789 RawArray* object_table_; |
| 787 RawArray* stackmaps_; | 790 RawArray* stackmaps_; |
| 788 RawLocalVarDescriptors* var_descriptors_; | 791 RawLocalVarDescriptors* var_descriptors_; |
| 789 RawArray* comments_; | 792 RawArray* comments_; |
| 790 RawObject** to() { | 793 RawObject** to() { |
| 791 return reinterpret_cast<RawObject**>(&ptr()->comments_); | 794 return reinterpret_cast<RawObject**>(&ptr()->comments_); |
| 792 } | 795 } |
| 793 | 796 |
| 794 intptr_t pointer_offsets_length_; | 797 intptr_t pointer_offsets_length_; |
| 795 // This cannot be boolean because of alignment issues on x64 architectures. | 798 // This cannot be boolean because of alignment issues on x64 architectures. |
| 796 intptr_t is_optimized_; | 799 intptr_t is_optimized_; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 class RawExceptionHandlers : public RawObject { | 892 class RawExceptionHandlers : public RawObject { |
| 890 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); | 893 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); |
| 891 | 894 |
| 892 RawSmi* length_; // Number of exception handler entries. | 895 RawSmi* length_; // Number of exception handler entries. |
| 893 | 896 |
| 894 // Variable length data follows here. | 897 // Variable length data follows here. |
| 895 intptr_t data_[0]; | 898 intptr_t data_[0]; |
| 896 }; | 899 }; |
| 897 | 900 |
| 898 | 901 |
| 902 // Contains an array of deoptimization commands, e.g., move a specific register |
| 903 // into a specific slot of unoptimized frame. |
| 904 class RawDeoptInfo : public RawObject { |
| 905 RAW_HEAP_OBJECT_IMPLEMENTATION(DeoptInfo); |
| 906 |
| 907 RawSmi* length_; // Number of deoptimization commands |
| 908 |
| 909 // Variable length data follows here. |
| 910 intptr_t data_[0]; |
| 911 }; |
| 912 |
| 913 |
| 899 class RawContext : public RawObject { | 914 class RawContext : public RawObject { |
| 900 RAW_HEAP_OBJECT_IMPLEMENTATION(Context); | 915 RAW_HEAP_OBJECT_IMPLEMENTATION(Context); |
| 901 | 916 |
| 902 intptr_t num_variables_; | 917 intptr_t num_variables_; |
| 903 Isolate* isolate_; | 918 Isolate* isolate_; |
| 904 | 919 |
| 905 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->parent_); } | 920 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->parent_); } |
| 906 RawContext* parent_; | 921 RawContext* parent_; |
| 907 | 922 |
| 908 // Variable length data follows here. | 923 // Variable length data follows here. |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 kExternalUint64Array == kByteArray + 18 && | 1595 kExternalUint64Array == kByteArray + 18 && |
| 1581 kExternalFloat32Array == kByteArray + 19 && | 1596 kExternalFloat32Array == kByteArray + 19 && |
| 1582 kExternalFloat64Array == kByteArray + 20 && | 1597 kExternalFloat64Array == kByteArray + 20 && |
| 1583 kClosure == kByteArray + 21); | 1598 kClosure == kByteArray + 21); |
| 1584 return (index >= kByteArray && index <= kClosure); | 1599 return (index >= kByteArray && index <= kClosure); |
| 1585 } | 1600 } |
| 1586 | 1601 |
| 1587 } // namespace dart | 1602 } // namespace dart |
| 1588 | 1603 |
| 1589 #endif // VM_RAW_OBJECT_H_ | 1604 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |