Home | History | Annotate | Download | only in wtf

Lines Matching full:hash

31 // http://www.azillionmonkeys.com/qed/hash.html
36 unsigned hash = WTF::stringHashingStartValue;
42 hash += data[0];
43 unsigned tmp = (data[1] << 11) ^ hash;
44 hash = (hash << 16) ^ tmp;
46 hash += hash >> 11;
51 hash += data[0];
52 hash ^= hash << 11;
53 hash += hash >> 17;
57 hash ^= hash << 3;
58 hash += hash >> 5;
59 hash ^= hash << 2;
60 hash += hash >> 15;
61 hash ^= hash << 10;
63 hash &= 0x7fffffff;
65 // this avoids ever returning a hash code of 0, since that is used to
66 // signal "hash not computed yet", using a value that is likely to be
68 if (hash == 0)
69 hash = 0x40000000;
71 return hash;
76 unsigned hash = WTF::stringHashingStartValue;
82 hash += static_cast<unsigned char>(data[0]);
83 unsigned tmp = (static_cast<unsigned char>(data[1]) << 11) ^ hash;
84 hash = (hash << 16) ^ tmp;
86 hash += hash >> 11;
91 hash += static_cast<unsigned char>(data[0]);
92 hash ^= hash << 11;
93 hash += hash >> 17;
97 hash ^= hash << 3;
98 hash += hash >> 5;
99 hash ^= hash << 2;
100 hash += hash >> 15;
101 hash ^= hash << 10;
103 hash &= 0x7fffffff;
105 // this avoids ever returning a hash code of 0, since that is used to
106 // signal "hash not computed yet", using a value that is likely to be
108 if (hash == 0)
109 hash = 0x40000000;
111 return hash;
116 unsigned hash = WTF::stringHashingStartValue;
125 hash += b0;
126 hash ^= hash << 11;
127 hash += hash >> 17;
130 hash += b0;
131 unsigned tmp = (b1 << 11) ^ hash;
132 hash = (hash << 16) ^ tmp;
134 hash += hash >> 11;
138 hash ^= hash << 3;
139 hash += hash >> 5;
140 hash ^= hash << 2;
141 hash += hash >> 15;
142 hash ^= hash << 10;
144 hash &= 0x7fffffff;
146 // This avoids ever returning a hash code of 0, since that is used to
147 // signal "hash not computed yet", using a value that is likely to be
149 if (hash == 0)
150 hash = 0x40000000;
152 return hash;