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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 int32_t deopt_id_and_kind_; // Bits 31..8 -> deopt_id, bits 7..0 kind. | 958 int32_t deopt_id_and_kind_; // Bits 31..8 -> deopt_id, bits 7..0 kind. |
959 int32_t token_pos_; // Bits 31..1 -> token_pos, bit 1 -> compressed flag; | 959 int32_t token_pos_; // Bits 31..1 -> token_pos, bit 1 -> compressed flag; |
960 int16_t try_index_; | 960 int16_t try_index_; |
961 }; | 961 }; |
962 | 962 |
963 static intptr_t RecordSize(bool has_try_index); | 963 static intptr_t RecordSize(bool has_try_index); |
964 | 964 |
965 private: | 965 private: |
966 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); | 966 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); |
967 | 967 |
968 static const intptr_t kFullRecSize = sizeof(PcDescriptorRec); | 968 static const intptr_t kFullRecSize; |
969 static const intptr_t kCompressedRecSize = kFullRecSize - sizeof(int16_t); | 969 static const intptr_t kCompressedRecSize; |
970 | 970 |
971 intptr_t record_size_in_bytes_; | 971 intptr_t record_size_in_bytes_; |
972 intptr_t length_; // Number of descriptors. | 972 intptr_t length_; // Number of descriptors. |
973 | 973 |
974 // Variable length data follows here. | 974 // Variable length data follows here. |
975 uint8_t* data() { OPEN_ARRAY_START(uint8_t, intptr_t); } | 975 uint8_t* data() { OPEN_ARRAY_START(uint8_t, intptr_t); } |
976 | 976 |
977 friend class Object; | 977 friend class Object; |
978 }; | 978 }; |
979 | 979 |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1938 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1938 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
1939 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 1939 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
1940 kTypedDataInt8ArrayViewCid + 15); | 1940 kTypedDataInt8ArrayViewCid + 15); |
1941 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1941 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
1942 return (kNullCid - kTypedDataInt8ArrayCid); | 1942 return (kNullCid - kTypedDataInt8ArrayCid); |
1943 } | 1943 } |
1944 | 1944 |
1945 } // namespace dart | 1945 } // namespace dart |
1946 | 1946 |
1947 #endif // VM_RAW_OBJECT_H_ | 1947 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |