OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // An alternate version of add() that finds the object by hashing and co
mparing | 145 // An alternate version of add() that finds the object by hashing and co
mparing |
146 // with some other type, to avoid the cost of type conversion if the obj
ect is already | 146 // with some other type, to avoid the cost of type conversion if the obj
ect is already |
147 // in the table. HashTranslator must have the following function members
: | 147 // in the table. HashTranslator must have the following function members
: |
148 // static unsigned hash(const T&); | 148 // static unsigned hash(const T&); |
149 // static bool equal(const ValueType&, const T&); | 149 // static bool equal(const ValueType&, const T&); |
150 // static translate(ValueType&, const T&, unsigned hashCode); | 150 // static translate(ValueType&, const T&, unsigned hashCode); |
151 template<typename HashTranslator, typename T> AddResult add(const T&, Ma
ppedPassInType); | 151 template<typename HashTranslator, typename T> AddResult add(const T&, Ma
ppedPassInType); |
152 | 152 |
153 static bool isValidKey(KeyPeekInType); | 153 static bool isValidKey(KeyPeekInType); |
154 | 154 |
155 typedef int HasInlinedTraceMethodMarker; | |
156 template<typename VisitorDispatcher> | 155 template<typename VisitorDispatcher> |
157 void trace(VisitorDispatcher visitor) { m_impl.trace(visitor); } | 156 void trace(VisitorDispatcher visitor) { m_impl.trace(visitor); } |
158 | 157 |
159 private: | 158 private: |
160 AddResult inlineAdd(KeyPeekInType, MappedPassInReferenceType); | 159 AddResult inlineAdd(KeyPeekInType, MappedPassInReferenceType); |
161 | 160 |
162 HashTableType m_impl; | 161 HashTableType m_impl; |
163 }; | 162 }; |
164 | 163 |
165 template<typename KeyArg, typename MappedArg, typename HashArg, typename Key
TraitsArg, typename MappedTraitsArg, typename Allocator> | 164 template<typename KeyArg, typename MappedArg, typename HashArg, typename Key
TraitsArg, typename MappedTraitsArg, typename Allocator> |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 struct NeedsTracing<HashMap<T, U, V, W, X>> { | 498 struct NeedsTracing<HashMap<T, U, V, W, X>> { |
500 static const bool value = false; | 499 static const bool value = false; |
501 }; | 500 }; |
502 #endif | 501 #endif |
503 | 502 |
504 } // namespace WTF | 503 } // namespace WTF |
505 | 504 |
506 using WTF::HashMap; | 505 using WTF::HashMap; |
507 | 506 |
508 #endif /* WTF_HashMap_h */ | 507 #endif /* WTF_HashMap_h */ |
OLD | NEW |