Changeset 48259 in webkit for trunk/JavaScriptCore/wtf
- Timestamp:
- Sep 10, 2009, 10:33:51 AM (16 years ago)
- Location:
- trunk/JavaScriptCore/wtf
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/FastAllocBase.h
r45933 r48259 302 302 } 303 303 304 template <typename T> 305 inline void fastDeleteSkippingDestructor(T* p) 306 { 307 if (!p) 308 return; 309 310 fastMallocMatchValidateFree(p, Internal::AllocTypeFastNew); 311 fastFree(p); 312 } 313 304 314 namespace Internal { 305 315 // This is a support template for fastDeleteArray. … … 398 408 } // namespace WTF 399 409 400 // Using WTF::FastAllocBase to avoid using FastAllocBase's explicit qualification by WTF::.401 410 using WTF::FastAllocBase; 411 using WTF::fastDeleteSkippingDestructor; 402 412 403 413 #endif // FastAllocBase_h -
trunk/JavaScriptCore/wtf/HashSet.h
r45792 r48259 30 30 template<typename Value, typename HashFunctions, typename Traits> 31 31 void deleteAllValues(const HashSet<Value, HashFunctions, Traits>&); 32 template<typename Value, typename HashFunctions, typename Traits> 33 void fastDeleteAllValues(const HashSet<Value, HashFunctions, Traits>&); 32 34 33 35 template<typename T> struct IdentityExtractor; … … 92 94 private: 93 95 friend void deleteAllValues<>(const HashSet&); 96 friend void fastDeleteAllValues<>(const HashSet&); 94 97 95 98 HashTableType m_impl; … … 252 255 deleteAllValues<typename HashSet<T, U, V>::ValueType>(collection.m_impl); 253 256 } 257 258 template<typename ValueType, typename HashTableType> 259 void fastDeleteAllValues(HashTableType& collection) 260 { 261 typedef typename HashTableType::const_iterator iterator; 262 iterator end = collection.end(); 263 for (iterator it = collection.begin(); it != end; ++it) 264 fastDelete(*it); 265 } 266 267 template<typename T, typename U, typename V> 268 inline void fastDeleteAllValues(const HashSet<T, U, V>& collection) 269 { 270 fastDeleteAllValues<typename HashSet<T, U, V>::ValueType>(collection.m_impl); 271 } 254 272 255 273 template<typename T, typename U, typename V, typename W>
Note:
See TracChangeset
for help on using the changeset viewer.