| 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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 bool is_compressed() const { | 965 bool is_compressed() const { |
| 966 return (token_pos_ & 0x1) == 1; | 966 return (token_pos_ & 0x1) == 1; |
| 967 } | 967 } |
| 968 | 968 |
| 969 uword pc_; | 969 uword pc_; |
| 970 int32_t deopt_id_and_kind_; // Bits 31..8 -> deopt_id, bits 7..0 kind. | 970 int32_t deopt_id_and_kind_; // Bits 31..8 -> deopt_id, bits 7..0 kind. |
| 971 int32_t token_pos_; // Bits 31..1 -> token_pos, bit 1 -> compressed flag; | 971 int32_t token_pos_; // Bits 31..1 -> token_pos, bit 1 -> compressed flag; |
| 972 int16_t try_index_; | 972 int16_t try_index_; |
| 973 }; | 973 }; |
| 974 | 974 |
| 975 // This structure is only used to compute what the size of PcDescriptorRec |
| 976 // should be when the try_index_ field is omitted. |
| 977 struct CompressedPcDescriptorRec { |
| 978 uword pc_; |
| 979 int32_t deopt_id_and_kind_; |
| 980 int32_t token_pos_; |
| 981 }; |
| 982 |
| 975 static intptr_t RecordSize(bool has_try_index); | 983 static intptr_t RecordSize(bool has_try_index); |
| 976 | 984 |
| 977 private: | 985 private: |
| 978 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); | 986 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); |
| 979 | 987 |
| 980 static const intptr_t kFullRecSize; | 988 static const intptr_t kFullRecSize; |
| 981 static const intptr_t kCompressedRecSize; | 989 static const intptr_t kCompressedRecSize; |
| 982 | 990 |
| 983 intptr_t record_size_in_bytes_; | 991 intptr_t record_size_in_bytes_; |
| 984 intptr_t length_; // Number of descriptors. | 992 intptr_t length_; // Number of descriptors. |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1977 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 1985 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 1978 kTypedDataInt8ArrayViewCid + 15); | 1986 kTypedDataInt8ArrayViewCid + 15); |
| 1979 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 1987 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 1980 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 1988 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 1981 return (kNullCid - kTypedDataInt8ArrayCid); | 1989 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1982 } | 1990 } |
| 1983 | 1991 |
| 1984 } // namespace dart | 1992 } // namespace dart |
| 1985 | 1993 |
| 1986 #endif // VM_RAW_OBJECT_H_ | 1994 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |