OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 kString = 0x8, | 1262 kString = 0x8, |
1263 kAny = 0x1F | 1263 kAny = 0x1F |
1264 }; | 1264 }; |
1265 }; | 1265 }; |
1266 | 1266 |
1267 // Type feedback is encoded in such a way that, we can combine the feedback | 1267 // Type feedback is encoded in such a way that, we can combine the feedback |
1268 // at different points by performing an 'OR' operation. Type feedback moves | 1268 // at different points by performing an 'OR' operation. Type feedback moves |
1269 // to a more generic type when we combine feedback. | 1269 // to a more generic type when we combine feedback. |
1270 // kSignedSmall -> kNumber -> kAny | 1270 // kSignedSmall -> kNumber -> kAny |
1271 // kInternalizedString -> kString -> kAny | 1271 // kInternalizedString -> kString -> kAny |
| 1272 // kSymbol -> kAny |
1272 // kReceiver -> kAny | 1273 // kReceiver -> kAny |
1273 // TODO(epertoso): consider unifying this with BinaryOperationFeedback. | 1274 // TODO(epertoso): consider unifying this with BinaryOperationFeedback. |
1274 class CompareOperationFeedback { | 1275 class CompareOperationFeedback { |
1275 public: | 1276 public: |
1276 enum { | 1277 enum { |
1277 kNone = 0x00, | 1278 kNone = 0x00, |
1278 kSignedSmall = 0x01, | 1279 kSignedSmall = 0x01, |
1279 kNumber = 0x3, | 1280 kNumber = 0x3, |
1280 kNumberOrOddball = 0x7, | 1281 kNumberOrOddball = 0x7, |
1281 kInternalizedString = 0x8, | 1282 kInternalizedString = 0x8, |
1282 kString = 0x18, | 1283 kString = 0x18, |
1283 kReceiver = 0x20, | 1284 kSymbol = 0x20, |
1284 kAny = 0x7F | 1285 kReceiver = 0x40, |
| 1286 kAny = 0xff |
1285 }; | 1287 }; |
1286 }; | 1288 }; |
1287 | 1289 |
1288 enum class UnicodeEncoding : uint8_t { | 1290 enum class UnicodeEncoding : uint8_t { |
1289 // Different unicode encodings in a |word32|: | 1291 // Different unicode encodings in a |word32|: |
1290 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate | 1292 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate |
1291 UTF32, // full UTF32 code unit / Unicode codepoint | 1293 UTF32, // full UTF32 code unit / Unicode codepoint |
1292 }; | 1294 }; |
1293 | 1295 |
1294 inline size_t hash_value(UnicodeEncoding encoding) { | 1296 inline size_t hash_value(UnicodeEncoding encoding) { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 } // namespace internal | 1420 } // namespace internal |
1419 } // namespace v8 | 1421 } // namespace v8 |
1420 | 1422 |
1421 // Used by js-builtin-reducer to identify whether ReduceArrayIterator() is | 1423 // Used by js-builtin-reducer to identify whether ReduceArrayIterator() is |
1422 // reducing a JSArray method, or a JSTypedArray method. | 1424 // reducing a JSArray method, or a JSTypedArray method. |
1423 enum class ArrayIteratorKind { kArray, kTypedArray }; | 1425 enum class ArrayIteratorKind { kArray, kTypedArray }; |
1424 | 1426 |
1425 namespace i = v8::internal; | 1427 namespace i = v8::internal; |
1426 | 1428 |
1427 #endif // V8_GLOBALS_H_ | 1429 #endif // V8_GLOBALS_H_ |
OLD | NEW |