| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 David Levin <levin@chromium.org> | 3 * Copyright (C) 2008 David Levin <levin@chromium.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 static void deleteBucket(ValueType& bucket) { bucket.~ValueType(); Trait
s::constructDeletedValue(bucket); } | 348 static void deleteBucket(ValueType& bucket) { bucket.~ValueType(); Trait
s::constructDeletedValue(bucket); } |
| 349 | 349 |
| 350 FullLookupType makeLookupResult(ValueType* position, bool found, unsigne
d hash) | 350 FullLookupType makeLookupResult(ValueType* position, bool found, unsigne
d hash) |
| 351 { return FullLookupType(LookupType(position, found), hash); } | 351 { return FullLookupType(LookupType(position, found), hash); } |
| 352 | 352 |
| 353 iterator makeIterator(ValueType* pos) { return iterator(this, pos, m_tab
le + m_tableSize); } | 353 iterator makeIterator(ValueType* pos) { return iterator(this, pos, m_tab
le + m_tableSize); } |
| 354 const_iterator makeConstIterator(ValueType* pos) const { return const_it
erator(this, pos, m_table + m_tableSize); } | 354 const_iterator makeConstIterator(ValueType* pos) const { return const_it
erator(this, pos, m_table + m_tableSize); } |
| 355 iterator makeKnownGoodIterator(ValueType* pos) { return iterator(this, p
os, m_table + m_tableSize, HashItemKnownGood); } | 355 iterator makeKnownGoodIterator(ValueType* pos) { return iterator(this, p
os, m_table + m_tableSize, HashItemKnownGood); } |
| 356 const_iterator makeKnownGoodConstIterator(ValueType* pos) const { return
const_iterator(this, pos, m_table + m_tableSize, HashItemKnownGood); } | 356 const_iterator makeKnownGoodConstIterator(ValueType* pos) const { return
const_iterator(this, pos, m_table + m_tableSize, HashItemKnownGood); } |
| 357 | 357 |
| 358 static const int m_maxLoad = 2; | 358 static const unsigned m_maxLoad = 2; |
| 359 static const int m_minLoad = 6; | 359 static const unsigned m_minLoad = 6; |
| 360 | 360 |
| 361 ValueType* m_table; | 361 ValueType* m_table; |
| 362 unsigned m_tableSize; | 362 unsigned m_tableSize; |
| 363 unsigned m_tableSizeMask; | 363 unsigned m_tableSizeMask; |
| 364 unsigned m_keyCount; | 364 unsigned m_keyCount; |
| 365 unsigned m_deletedCount; | 365 unsigned m_deletedCount; |
| 366 | 366 |
| 367 #if DUMP_HASHTABLE_STATS_PER_TABLE | 367 #if DUMP_HASHTABLE_STATS_PER_TABLE |
| 368 public: | 368 public: |
| 369 mutable OwnPtr<Stats> m_stats; | 369 mutable OwnPtr<Stats> m_stats; |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 inline bool operator!=(const HashTableIteratorAdapter<T, U>& a, const HashTa
bleConstIteratorAdapter<T, U>& b) | 1077 inline bool operator!=(const HashTableIteratorAdapter<T, U>& a, const HashTa
bleConstIteratorAdapter<T, U>& b) |
| 1078 { | 1078 { |
| 1079 return a.m_impl != b.m_impl; | 1079 return a.m_impl != b.m_impl; |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 } // namespace WTF | 1082 } // namespace WTF |
| 1083 | 1083 |
| 1084 #include "wtf/HashIterators.h" | 1084 #include "wtf/HashIterators.h" |
| 1085 | 1085 |
| 1086 #endif // WTF_HashTable_h | 1086 #endif // WTF_HashTable_h |
| OLD | NEW |