| 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 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // The hasIsEmptyValueFunction flag allows the hash table to automatical
ly generate code to check | 51 // The hasIsEmptyValueFunction flag allows the hash table to automatical
ly generate code to check |
| 52 // for the empty value when it can be done with the equality operator, b
ut allows custom functions | 52 // for the empty value when it can be done with the equality operator, b
ut allows custom functions |
| 53 // for cases like String that need them. | 53 // for cases like String that need them. |
| 54 static const bool hasIsEmptyValueFunction = false; | 54 static const bool hasIsEmptyValueFunction = false; |
| 55 | 55 |
| 56 // The needsDestruction flag is used to optimize destruction and rehashi
ng. | 56 // The needsDestruction flag is used to optimize destruction and rehashi
ng. |
| 57 static const bool needsDestruction = true; | 57 static const bool needsDestruction = true; |
| 58 | 58 |
| 59 // The starting table size. Can be overridden when we know beforehand th
at | 59 // The starting table size. Can be overridden when we know beforehand th
at |
| 60 // a hash table will have at least N entries. | 60 // a hash table will have at least N entries. |
| 61 #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) | 61 #if defined(MEMORY_SANITIZER_INITIAL_SIZE) |
| 62 static const unsigned minimumTableSize = 1; | 62 static const unsigned minimumTableSize = 1; |
| 63 #else | 63 #else |
| 64 static const unsigned minimumTableSize = 8; | 64 static const unsigned minimumTableSize = 8; |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 template<typename U = void> | 67 template<typename U = void> |
| 68 struct NeedsTracingLazily { | 68 struct NeedsTracingLazily { |
| 69 static const bool value = NeedsTracing<T>::value; | 69 static const bool value = NeedsTracing<T>::value; |
| 70 }; | 70 }; |
| 71 static const WeakHandlingFlag weakHandlingFlag = IsWeak<T>::value ? Weak
HandlingInCollections : NoWeakHandlingInCollections; | 71 static const WeakHandlingFlag weakHandlingFlag = IsWeak<T>::value ? Weak
HandlingInCollections : NoWeakHandlingInCollections; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 struct TraceInCollectionTrait; | 303 struct TraceInCollectionTrait; |
| 304 | 304 |
| 305 } // namespace WTF | 305 } // namespace WTF |
| 306 | 306 |
| 307 using WTF::HashTraits; | 307 using WTF::HashTraits; |
| 308 using WTF::PairHashTraits; | 308 using WTF::PairHashTraits; |
| 309 using WTF::NullableHashTraits; | 309 using WTF::NullableHashTraits; |
| 310 using WTF::SimpleClassHashTraits; | 310 using WTF::SimpleClassHashTraits; |
| 311 | 311 |
| 312 #endif // WTF_HashTraits_h | 312 #endif // WTF_HashTraits_h |
| OLD | NEW |