Changeset 2769 in webkit for trunk/JavaScriptCore/kjs/property_map.cpp
- Timestamp:
- Nov 19, 2002, 5:23:02 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/property_map.cpp
r2766 r2769 65 65 } 66 66 67 int PropertyMap::hash(const UString::Rep *s) const 68 { 69 int h = 0; 70 int length = s->len; 71 int prefixLength = length < 8 ? length : 8; 72 for (int i = 0; i < prefixLength; i++) 73 h = (127 * h + s->dat[i].unicode()) & _tableSizeHashMask; 74 int suffixPosition = length < 16 ? 8 : length - 8; 75 for (int i = suffixPosition; i < length; i++) 76 h = (127 * h + s->dat[i].unicode()) & _tableSizeHashMask; 77 return h; 67 inline int PropertyMap::hash(const UString::Rep *s) const 68 { 69 return s->hash() & _tableSizeHashMask; 78 70 } 79 71
Note:
See TracChangeset
for help on using the changeset viewer.