OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef HeapAllocator_h | 5 #ifndef HeapAllocator_h |
6 #define HeapAllocator_h | 6 #define HeapAllocator_h |
7 | 7 |
8 #include "platform/heap/Heap.h" | 8 #include "platform/heap/Heap.h" |
9 #include "platform/heap/TraceTraits.h" | 9 #include "platform/heap/TraceTraits.h" |
10 #include "wtf/Assertions.h" | 10 #include "wtf/Assertions.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 { | 424 { |
425 } | 425 } |
426 | 426 |
427 template<typename U> | 427 template<typename U> |
428 void append(const U& other) | 428 void append(const U& other) |
429 { | 429 { |
430 Deque<T, inlineCapacity, HeapAllocator>::append(other); | 430 Deque<T, inlineCapacity, HeapAllocator>::append(other); |
431 } | 431 } |
432 }; | 432 }; |
433 | 433 |
434 template<typename T, size_t i> | |
435 inline void swap(HeapVector<T, i>& a, HeapVector<T, i>& b) { a.swap(b); } | |
436 template<typename T, size_t i> | |
437 inline void swap(HeapDeque<T, i>& a, HeapDeque<T, i>& b) { a.swap(b); } | |
438 template<typename T, typename U, typename V> | |
439 inline void swap(HeapHashSet<T, U, V>& a, HeapHashSet<T, U, V>& b) { a.swap(b);
} | |
440 template<typename T, typename U, typename V, typename W, typename X> | |
441 inline void swap(HeapHashMap<T, U, V, W, X>& a, HeapHashMap<T, U, V, W, X>& b) {
a.swap(b); } | |
442 template<typename T, size_t i, typename U> | |
443 inline void swap(HeapListHashSet<T, i, U>& a, HeapListHashSet<T, i, U>& b) { a.s
wap(b); } | |
444 template<typename T, typename U, typename V> | |
445 inline void swap(HeapLinkedHashSet<T, U, V>& a, HeapLinkedHashSet<T, U, V>& b) {
a.swap(b); } | |
446 template<typename T, typename U, typename V> | |
447 inline void swap(HeapHashCountedSet<T, U, V>& a, HeapHashCountedSet<T, U, V>& b)
{ a.swap(b); } | |
448 | |
449 } // namespace blink | 434 } // namespace blink |
450 | 435 |
451 #endif | 436 #endif |
OLD | NEW |