OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2008 David Levin <levin@chromium.org> | 4 * Copyright (C) 2008 David Levin <levin@chromium.org> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 #if DUMP_HASHTABLE_STATS_PER_TABLE | 135 #if DUMP_HASHTABLE_STATS_PER_TABLE |
136 template <typename Allocator, bool isGCType = Allocator::isGarbageCollected> | 136 template <typename Allocator, bool isGCType = Allocator::isGarbageCollected> |
137 class HashTableStatsPtr; | 137 class HashTableStatsPtr; |
138 | 138 |
139 template <typename Allocator> | 139 template <typename Allocator> |
140 class HashTableStatsPtr<Allocator, false> final { | 140 class HashTableStatsPtr<Allocator, false> final { |
141 STATIC_ONLY(HashTableStatsPtr); | 141 STATIC_ONLY(HashTableStatsPtr); |
142 | 142 |
143 public: | 143 public: |
144 static std::unique_ptr<HashTableStats> create() { | 144 static std::unique_ptr<HashTableStats> create() { |
145 return wrapUnique(new HashTableStats); | 145 return WTF::wrapUnique(new HashTableStats); |
146 } | 146 } |
147 | 147 |
148 static std::unique_ptr<HashTableStats> copy( | 148 static std::unique_ptr<HashTableStats> copy( |
149 const std::unique_ptr<HashTableStats>& other) { | 149 const std::unique_ptr<HashTableStats>& other) { |
150 if (!other) | 150 if (!other) |
151 return nullptr; | 151 return nullptr; |
152 return wrapUnique(new HashTableStats(*other)); | 152 return WTF::wrapUnique(new HashTableStats(*other)); |
153 } | 153 } |
154 | 154 |
155 static void swap(std::unique_ptr<HashTableStats>& stats, | 155 static void swap(std::unique_ptr<HashTableStats>& stats, |
156 std::unique_ptr<HashTableStats>& other) { | 156 std::unique_ptr<HashTableStats>& other) { |
157 stats.swap(other); | 157 stats.swap(other); |
158 } | 158 } |
159 }; | 159 }; |
160 | 160 |
161 template <typename Allocator> | 161 template <typename Allocator> |
162 class HashTableStatsPtr<Allocator, true> final { | 162 class HashTableStatsPtr<Allocator, true> final { |
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2273 CollectionIterator end(toBeRemoved.end()); | 2273 CollectionIterator end(toBeRemoved.end()); |
2274 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) | 2274 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) |
2275 collection.remove(*it); | 2275 collection.remove(*it); |
2276 } | 2276 } |
2277 | 2277 |
2278 } // namespace WTF | 2278 } // namespace WTF |
2279 | 2279 |
2280 #include "wtf/HashIterators.h" | 2280 #include "wtf/HashIterators.h" |
2281 | 2281 |
2282 #endif // WTF_HashTable_h | 2282 #endif // WTF_HashTable_h |
OLD | NEW |