| 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 8810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8821 // Maximum number of characters to consider when trying to convert a string | 8821 // Maximum number of characters to consider when trying to convert a string |
| 8822 // value into an array index. | 8822 // value into an array index. |
| 8823 static const int kMaxArrayIndexSize = 10; | 8823 static const int kMaxArrayIndexSize = 10; |
| 8824 STATIC_ASSERT(kMaxArrayIndexSize < (1 << kArrayIndexLengthBits)); | 8824 STATIC_ASSERT(kMaxArrayIndexSize < (1 << kArrayIndexLengthBits)); |
| 8825 | 8825 |
| 8826 // Max char codes. | 8826 // Max char codes. |
| 8827 static const int32_t kMaxOneByteCharCode = unibrow::Latin1::kMaxChar; | 8827 static const int32_t kMaxOneByteCharCode = unibrow::Latin1::kMaxChar; |
| 8828 static const uint32_t kMaxOneByteCharCodeU = unibrow::Latin1::kMaxChar; | 8828 static const uint32_t kMaxOneByteCharCodeU = unibrow::Latin1::kMaxChar; |
| 8829 static const int kMaxUtf16CodeUnit = 0xffff; | 8829 static const int kMaxUtf16CodeUnit = 0xffff; |
| 8830 static const uint32_t kMaxUtf16CodeUnitU = kMaxUtf16CodeUnit; | 8830 static const uint32_t kMaxUtf16CodeUnitU = kMaxUtf16CodeUnit; |
| 8831 static const uc32 kMaxCodePoint = 0x10ffff; |
| 8831 | 8832 |
| 8832 // Value of hash field containing computed hash equal to zero. | 8833 // Value of hash field containing computed hash equal to zero. |
| 8833 static const int kEmptyStringHash = kIsNotArrayIndexMask; | 8834 static const int kEmptyStringHash = kIsNotArrayIndexMask; |
| 8834 | 8835 |
| 8835 // Maximal string length. | 8836 // Maximal string length. |
| 8836 static const int kMaxLength = (1 << 28) - 16; | 8837 static const int kMaxLength = (1 << 28) - 16; |
| 8837 | 8838 |
| 8838 // Max length for computing hash. For strings longer than this limit the | 8839 // Max length for computing hash. For strings longer than this limit the |
| 8839 // string length is used as the hash value. | 8840 // string length is used as the hash value. |
| 8840 static const int kMaxHashCalcLength = 16383; | 8841 static const int kMaxHashCalcLength = 16383; |
| (...skipping 1906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10747 } | 10748 } |
| 10748 return value; | 10749 return value; |
| 10749 } | 10750 } |
| 10750 }; | 10751 }; |
| 10751 | 10752 |
| 10752 | 10753 |
| 10753 } // NOLINT, false-positive due to second-order macros. | 10754 } // NOLINT, false-positive due to second-order macros. |
| 10754 } // NOLINT, false-positive due to second-order macros. | 10755 } // NOLINT, false-positive due to second-order macros. |
| 10755 | 10756 |
| 10756 #endif // V8_OBJECTS_H_ | 10757 #endif // V8_OBJECTS_H_ |
| OLD | NEW |