| 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/atomic.h" | 9 #include "vm/atomic.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 } initializer_; | 934 } initializer_; |
| 935 RawSmi* guarded_list_length_; | 935 RawSmi* guarded_list_length_; |
| 936 RawArray* dependent_code_; | 936 RawArray* dependent_code_; |
| 937 RawObject** to() { | 937 RawObject** to() { |
| 938 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); | 938 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); |
| 939 } | 939 } |
| 940 RawObject** to_snapshot(Snapshot::Kind kind) { | 940 RawObject** to_snapshot(Snapshot::Kind kind) { |
| 941 switch (kind) { | 941 switch (kind) { |
| 942 case Snapshot::kCore: | 942 case Snapshot::kCore: |
| 943 case Snapshot::kScript: | 943 case Snapshot::kScript: |
| 944 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); |
| 944 case Snapshot::kAppWithJIT: | 945 case Snapshot::kAppWithJIT: |
| 945 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); | 946 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); |
| 946 case Snapshot::kAppNoJIT: | 947 case Snapshot::kAppNoJIT: |
| 947 return reinterpret_cast<RawObject**>(&ptr()->initializer_); | 948 return reinterpret_cast<RawObject**>(&ptr()->initializer_); |
| 948 case Snapshot::kMessage: | 949 case Snapshot::kMessage: |
| 949 case Snapshot::kNone: | 950 case Snapshot::kNone: |
| 950 case Snapshot::kInvalid: | 951 case Snapshot::kInvalid: |
| 951 break; | 952 break; |
| 952 } | 953 } |
| 953 UNREACHABLE(); | 954 UNREACHABLE(); |
| 954 return NULL; | 955 return NULL; |
| 955 } | 956 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 // If owner_ is a Class the owner is the allocation stub for that class. | 1135 // If owner_ is a Class the owner is the allocation stub for that class. |
| 1135 // Else, owner_ is a regular Dart Function. | 1136 // Else, owner_ is a regular Dart Function. |
| 1136 RawObject* owner_; // Function, Null, or a Class. | 1137 RawObject* owner_; // Function, Null, or a Class. |
| 1137 RawExceptionHandlers* exception_handlers_; | 1138 RawExceptionHandlers* exception_handlers_; |
| 1138 RawPcDescriptors* pc_descriptors_; | 1139 RawPcDescriptors* pc_descriptors_; |
| 1139 RawArray* stackmaps_; | 1140 RawArray* stackmaps_; |
| 1140 NOT_IN_PRECOMPILED(RawInstructions* active_instructions_); | 1141 NOT_IN_PRECOMPILED(RawInstructions* active_instructions_); |
| 1141 NOT_IN_PRECOMPILED(RawArray* deopt_info_array_); | 1142 NOT_IN_PRECOMPILED(RawArray* deopt_info_array_); |
| 1142 // (code-offset, function, code) triples. | 1143 // (code-offset, function, code) triples. |
| 1143 NOT_IN_PRECOMPILED(RawArray* static_calls_target_table_); | 1144 NOT_IN_PRECOMPILED(RawArray* static_calls_target_table_); |
| 1144 NOT_IN_PRECOMPILED(RawLocalVarDescriptors* var_descriptors_); | |
| 1145 NOT_IN_PRECOMPILED(RawArray* inlined_metadata_); | 1145 NOT_IN_PRECOMPILED(RawArray* inlined_metadata_); |
| 1146 NOT_IN_PRECOMPILED(RawCodeSourceMap* code_source_map_); | |
| 1147 NOT_IN_PRECOMPILED(RawArray* comments_); | |
| 1148 // If return_address_metadata_ is a Smi, it is the offset to the prologue. | 1146 // If return_address_metadata_ is a Smi, it is the offset to the prologue. |
| 1149 // Else, return_address_metadata_ is null. | 1147 // Else, return_address_metadata_ is null. |
| 1150 NOT_IN_PRECOMPILED(RawObject* return_address_metadata_); | 1148 NOT_IN_PRECOMPILED(RawObject* return_address_metadata_); |
| 1149 NOT_IN_PRECOMPILED(RawLocalVarDescriptors* var_descriptors_); |
| 1150 NOT_IN_PRECOMPILED(RawCodeSourceMap* code_source_map_); |
| 1151 NOT_IN_PRECOMPILED(RawArray* comments_); |
| 1151 RawObject** to() { | 1152 RawObject** to() { |
| 1152 #if defined(DART_PRECOMPILED_RUNTIME) | 1153 #if defined(DART_PRECOMPILED_RUNTIME) |
| 1153 return reinterpret_cast<RawObject**>(&ptr()->stackmaps_); | 1154 return reinterpret_cast<RawObject**>(&ptr()->stackmaps_); |
| 1154 #else | 1155 #else |
| 1155 return reinterpret_cast<RawObject**>(&ptr()->return_address_metadata_); | 1156 return reinterpret_cast<RawObject**>(&ptr()->return_address_metadata_); |
| 1156 #endif | 1157 #endif |
| 1157 } | 1158 } |
| 1158 | 1159 |
| 1159 // Compilation timestamp. | 1160 // Compilation timestamp. |
| 1160 NOT_IN_PRECOMPILED(int64_t compile_timestamp_); | 1161 NOT_IN_PRECOMPILED(int64_t compile_timestamp_); |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2482 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2483 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2483 kTypedDataInt8ArrayViewCid + 15); | 2484 kTypedDataInt8ArrayViewCid + 15); |
| 2484 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2485 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2485 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2486 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2486 return (kNullCid - kTypedDataInt8ArrayCid); | 2487 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2487 } | 2488 } |
| 2488 | 2489 |
| 2489 } // namespace dart | 2490 } // namespace dart |
| 2490 | 2491 |
| 2491 #endif // VM_RAW_OBJECT_H_ | 2492 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |