OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 8807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8818 // Maximum number of characters to consider when trying to convert a string | 8818 // Maximum number of characters to consider when trying to convert a string |
8819 // value into an array index. | 8819 // value into an array index. |
8820 static const int kMaxArrayIndexSize = 10; | 8820 static const int kMaxArrayIndexSize = 10; |
8821 STATIC_ASSERT(kMaxArrayIndexSize < (1 << kArrayIndexLengthBits)); | 8821 STATIC_ASSERT(kMaxArrayIndexSize < (1 << kArrayIndexLengthBits)); |
8822 | 8822 |
8823 // Max char codes. | 8823 // Max char codes. |
8824 static const int32_t kMaxOneByteCharCode = unibrow::Latin1::kMaxChar; | 8824 static const int32_t kMaxOneByteCharCode = unibrow::Latin1::kMaxChar; |
8825 static const uint32_t kMaxOneByteCharCodeU = unibrow::Latin1::kMaxChar; | 8825 static const uint32_t kMaxOneByteCharCodeU = unibrow::Latin1::kMaxChar; |
8826 static const int kMaxUtf16CodeUnit = 0xffff; | 8826 static const int kMaxUtf16CodeUnit = 0xffff; |
8827 static const uint32_t kMaxUtf16CodeUnitU = kMaxUtf16CodeUnit; | 8827 static const uint32_t kMaxUtf16CodeUnitU = kMaxUtf16CodeUnit; |
| 8828 static const uc32 kMaxCodePoint = 0x10ffff; |
8828 | 8829 |
8829 // Value of hash field containing computed hash equal to zero. | 8830 // Value of hash field containing computed hash equal to zero. |
8830 static const int kEmptyStringHash = kIsNotArrayIndexMask; | 8831 static const int kEmptyStringHash = kIsNotArrayIndexMask; |
8831 | 8832 |
8832 // Maximal string length. | 8833 // Maximal string length. |
8833 static const int kMaxLength = (1 << 28) - 16; | 8834 static const int kMaxLength = (1 << 28) - 16; |
8834 | 8835 |
8835 // Max length for computing hash. For strings longer than this limit the | 8836 // Max length for computing hash. For strings longer than this limit the |
8836 // string length is used as the hash value. | 8837 // string length is used as the hash value. |
8837 static const int kMaxHashCalcLength = 16383; | 8838 static const int kMaxHashCalcLength = 16383; |
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10730 } | 10731 } |
10731 return value; | 10732 return value; |
10732 } | 10733 } |
10733 }; | 10734 }; |
10734 | 10735 |
10735 | 10736 |
10736 } // NOLINT, false-positive due to second-order macros. | 10737 } // NOLINT, false-positive due to second-order macros. |
10737 } // NOLINT, false-positive due to second-order macros. | 10738 } // NOLINT, false-positive due to second-order macros. |
10738 | 10739 |
10739 #endif // V8_OBJECTS_H_ | 10740 #endif // V8_OBJECTS_H_ |
OLD | NEW |