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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 bool is_compressed() const { | 953 bool is_compressed() const { |
954 return (token_pos_ & 0x1) == 1; | 954 return (token_pos_ & 0x1) == 1; |
955 } | 955 } |
956 | 956 |
957 uword pc_; | 957 uword pc_; |
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 return has_try_index ? RawPcDescriptors::kFullRecSize | |
965 : RawPcDescriptors::kCompressedRecSize; | |
966 } | |
967 | 964 |
968 private: | 965 private: |
969 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); | 966 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); |
970 | 967 |
971 static const intptr_t kFullRecSize = sizeof(PcDescriptorRec); | 968 static const intptr_t kFullRecSize = sizeof(PcDescriptorRec); |
972 static const intptr_t kCompressedRecSize = kFullRecSize - sizeof(int16_t); | 969 static const intptr_t kCompressedRecSize = kFullRecSize - sizeof(int16_t); |
973 | 970 |
974 intptr_t record_size_in_bytes_; | 971 intptr_t record_size_in_bytes_; |
975 intptr_t length_; // Number of descriptors. | 972 intptr_t length_; // Number of descriptors. |
976 | 973 |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1941 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1938 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
1942 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 1939 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
1943 kTypedDataInt8ArrayViewCid + 15); | 1940 kTypedDataInt8ArrayViewCid + 15); |
1944 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1941 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
1945 return (kNullCid - kTypedDataInt8ArrayCid); | 1942 return (kNullCid - kTypedDataInt8ArrayCid); |
1946 } | 1943 } |
1947 | 1944 |
1948 } // namespace dart | 1945 } // namespace dart |
1949 | 1946 |
1950 #endif // VM_RAW_OBJECT_H_ | 1947 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |