Lines Matching defs:length
40 uint32_t StringHasher::GetTrivialHash(int length) {
41 DCHECK_GT(length, String::kMaxHashCalcLength);
42 // The hash of a large string is simply computed from the length.
43 // Ensure that the max length is small enough to be encoded without losing
46 uint32_t hash = static_cast<uint32_t>(length);
51 uint32_t StringHasher::HashSequentialString(const char_t* chars_raw, int length,
57 DCHECK_LE(0, length);
58 DCHECK_IMPLIES(0 < length, chars != nullptr);
59 if (length >= 1) {
60 if (IsDecimalDigit(chars[0]) && (length == 1 || chars[0] != '0')) {
61 if (length <= String::kMaxArrayIndexSize) {
66 if (i == length) {
67 return MakeArrayIndexHash(index, length);
79 if (length <= String::kMaxIntegerIndexSize) {
86 const uchar* end = &chars[length];
99 // length.
110 if (length > String::kMaxHashCalcLength) {
111 return GetTrivialHash(length);
117 const uchar* end = &chars[length];