OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_TYPES_H_ | 5 #ifndef V8_TYPES_H_ |
6 #define V8_TYPES_H_ | 6 #define V8_TYPES_H_ |
7 | 7 |
8 #include "src/conversions.h" | 8 #include "src/conversions.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // respective map. Only structured types require allocation. | 144 // respective map. Only structured types require allocation. |
145 // Note that the bitset representation is closed under both Union and Intersect. | 145 // Note that the bitset representation is closed under both Union and Intersect. |
146 | 146 |
147 | 147 |
148 // ----------------------------------------------------------------------------- | 148 // ----------------------------------------------------------------------------- |
149 // Values for bitset types | 149 // Values for bitset types |
150 | 150 |
151 // clang-format off | 151 // clang-format off |
152 | 152 |
153 #define MASK_BITSET_TYPE_LIST(V) \ | 153 #define MASK_BITSET_TYPE_LIST(V) \ |
154 V(Representation, 0xff800000u) \ | 154 V(Representation, 0xffc00000u) \ |
155 V(Semantic, 0x007ffffeu) | 155 V(Semantic, 0x003ffffeu) |
156 | 156 |
157 #define REPRESENTATION(k) ((k) & BitsetType::kRepresentation) | 157 #define REPRESENTATION(k) ((k) & BitsetType::kRepresentation) |
158 #define SEMANTIC(k) ((k) & BitsetType::kSemantic) | 158 #define SEMANTIC(k) ((k) & BitsetType::kSemantic) |
159 | 159 |
160 #define REPRESENTATION_BITSET_TYPE_LIST(V) \ | 160 #define REPRESENTATION_BITSET_TYPE_LIST(V) \ |
161 V(None, 0) \ | 161 V(None, 0) \ |
162 V(UntaggedBit, 1u << 23 | kSemantic) \ | 162 V(UntaggedBit, 1u << 22 | kSemantic) \ |
163 V(UntaggedIntegral8, 1u << 24 | kSemantic) \ | 163 V(UntaggedIntegral8, 1u << 23 | kSemantic) \ |
164 V(UntaggedIntegral16, 1u << 25 | kSemantic) \ | 164 V(UntaggedIntegral16, 1u << 24 | kSemantic) \ |
165 V(UntaggedIntegral32, 1u << 26 | kSemantic) \ | 165 V(UntaggedIntegral32, 1u << 25 | kSemantic) \ |
166 V(UntaggedFloat32, 1u << 27 | kSemantic) \ | 166 V(UntaggedFloat32, 1u << 26 | kSemantic) \ |
167 V(UntaggedFloat64, 1u << 28 | kSemantic) \ | 167 V(UntaggedFloat64, 1u << 27 | kSemantic) \ |
| 168 V(UntaggedSimd128, 1u << 28 | kSemantic) \ |
168 V(UntaggedPointer, 1u << 29 | kSemantic) \ | 169 V(UntaggedPointer, 1u << 29 | kSemantic) \ |
169 V(TaggedSigned, 1u << 30 | kSemantic) \ | 170 V(TaggedSigned, 1u << 30 | kSemantic) \ |
170 V(TaggedPointer, 1u << 31 | kSemantic) \ | 171 V(TaggedPointer, 1u << 31 | kSemantic) \ |
171 \ | 172 \ |
172 V(UntaggedIntegral, kUntaggedBit | kUntaggedIntegral8 | \ | 173 V(UntaggedIntegral, kUntaggedBit | kUntaggedIntegral8 | \ |
173 kUntaggedIntegral16 | kUntaggedIntegral32) \ | 174 kUntaggedIntegral16 | kUntaggedIntegral32) \ |
174 V(UntaggedFloat, kUntaggedFloat32 | kUntaggedFloat64) \ | 175 V(UntaggedFloat, kUntaggedFloat32 | kUntaggedFloat64) \ |
175 V(UntaggedNumber, kUntaggedIntegral | kUntaggedFloat) \ | 176 V(UntaggedNumber, kUntaggedIntegral | kUntaggedFloat) \ |
176 V(Untagged, kUntaggedNumber | kUntaggedPointer) \ | 177 V(Untagged, kUntaggedNumber | kUntaggedPointer) \ |
177 V(Tagged, kTaggedSigned | kTaggedPointer) | 178 V(Tagged, kTaggedSigned | kTaggedPointer) |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 | 962 |
962 bool Narrows(Bounds that) { | 963 bool Narrows(Bounds that) { |
963 return that.lower->Is(this->lower) && this->upper->Is(that.upper); | 964 return that.lower->Is(this->lower) && this->upper->Is(that.upper); |
964 } | 965 } |
965 }; | 966 }; |
966 | 967 |
967 } // namespace internal | 968 } // namespace internal |
968 } // namespace v8 | 969 } // namespace v8 |
969 | 970 |
970 #endif // V8_TYPES_H_ | 971 #endif // V8_TYPES_H_ |
OLD | NEW |