| Index: Source/platform/heap/Heap.h
|
| diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
|
| index 0268f0fb912f8dc1e2e4a0e3a706ca63030a40a6..cd7139b13625038d9a55e316786130b78149f663 100644
|
| --- a/Source/platform/heap/Heap.h
|
| +++ b/Source/platform/heap/Heap.h
|
| @@ -1760,117 +1760,43 @@ public:
|
| }
|
| };
|
|
|
| -// FIXME: These should just be template aliases:
|
| -//
|
| -// template<typename T, size_t inlineCapacity = 0>
|
| -// using HeapVector = Vector<T, inlineCapacity, HeapAllocator>;
|
| -//
|
| -// as soon as all the compilers we care about support that.
|
| -// MSVC supports it only in MSVC 2013.
|
| template<
|
| typename KeyArg,
|
| typename MappedArg,
|
| typename HashArg = typename DefaultHash<KeyArg>::Hash,
|
| typename KeyTraitsArg = HashTraits<KeyArg>,
|
| typename MappedTraitsArg = HashTraits<MappedArg> >
|
| -class HeapHashMap : public HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg, HeapAllocator> { };
|
| +using HeapHashMap = HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg, HeapAllocator>;
|
|
|
| template<
|
| typename ValueArg,
|
| typename HashArg = typename DefaultHash<ValueArg>::Hash,
|
| typename TraitsArg = HashTraits<ValueArg> >
|
| -class HeapHashSet : public HashSet<ValueArg, HashArg, TraitsArg, HeapAllocator> { };
|
| +using HeapHashSet = HashSet<ValueArg, HashArg, TraitsArg, HeapAllocator>;
|
|
|
| template<
|
| typename ValueArg,
|
| typename HashArg = typename DefaultHash<ValueArg>::Hash,
|
| typename TraitsArg = HashTraits<ValueArg> >
|
| -class HeapLinkedHashSet : public LinkedHashSet<ValueArg, HashArg, TraitsArg, HeapAllocator> { };
|
| +using HeapLinkedHashSet = LinkedHashSet<ValueArg, HashArg, TraitsArg, HeapAllocator>;
|
|
|
| template<
|
| typename ValueArg,
|
| size_t inlineCapacity = 0, // The inlineCapacity is just a dummy to match ListHashSet (off-heap).
|
| typename HashArg = typename DefaultHash<ValueArg>::Hash>
|
| -class HeapListHashSet : public ListHashSet<ValueArg, inlineCapacity, HashArg, HeapListHashSetAllocator<ValueArg, inlineCapacity> > { };
|
| +using HeapListHashSet = ListHashSet<ValueArg, inlineCapacity, HashArg, HeapListHashSetAllocator<ValueArg, inlineCapacity> >;
|
|
|
| template<
|
| typename Value,
|
| typename HashFunctions = typename DefaultHash<Value>::Hash,
|
| typename Traits = HashTraits<Value> >
|
| -class HeapHashCountedSet : public HashCountedSet<Value, HashFunctions, Traits, HeapAllocator> { };
|
| +using HeapHashCountedSet = HashCountedSet<Value, HashFunctions, Traits, HeapAllocator>;
|
|
|
| template<typename T, size_t inlineCapacity = 0>
|
| -class HeapVector : public Vector<T, inlineCapacity, HeapAllocator> {
|
| -public:
|
| - HeapVector() { }
|
| -
|
| - explicit HeapVector(size_t size) : Vector<T, inlineCapacity, HeapAllocator>(size)
|
| - {
|
| - }
|
| -
|
| - HeapVector(size_t size, const T& val) : Vector<T, inlineCapacity, HeapAllocator>(size, val)
|
| - {
|
| - }
|
| -
|
| - template<size_t otherCapacity>
|
| - HeapVector(const HeapVector<T, otherCapacity>& other)
|
| - : Vector<T, inlineCapacity, HeapAllocator>(other)
|
| - {
|
| - }
|
| -
|
| - template<typename U>
|
| - void append(const U& other)
|
| - {
|
| - Vector<T, inlineCapacity, HeapAllocator>::append(other);
|
| - }
|
| -
|
| - template<typename U, size_t otherCapacity>
|
| - void appendVector(const HeapVector<U, otherCapacity>& other)
|
| - {
|
| - const Vector<U, otherCapacity, HeapAllocator>& otherVector = other;
|
| - Vector<T, inlineCapacity, HeapAllocator>::appendVector(otherVector);
|
| - }
|
| -};
|
| +using HeapVector = Vector<T, inlineCapacity, HeapAllocator>;
|
|
|
| template<typename T, size_t inlineCapacity = 0>
|
| -class HeapDeque : public Deque<T, inlineCapacity, HeapAllocator> {
|
| -public:
|
| - HeapDeque() { }
|
| -
|
| - explicit HeapDeque(size_t size) : Deque<T, inlineCapacity, HeapAllocator>(size)
|
| - {
|
| - }
|
| -
|
| - HeapDeque(size_t size, const T& val) : Deque<T, inlineCapacity, HeapAllocator>(size, val)
|
| - {
|
| - }
|
| -
|
| - // FIXME: Doesn't work if there is an inline buffer, due to crbug.com/360572
|
| - HeapDeque<T, 0>& operator=(const HeapDeque& other)
|
| - {
|
| - HeapDeque<T> copy(other);
|
| - swap(copy);
|
| - return *this;
|
| - }
|
| -
|
| - // FIXME: Doesn't work if there is an inline buffer, due to crbug.com/360572
|
| - inline void swap(HeapDeque& other)
|
| - {
|
| - Deque<T, inlineCapacity, HeapAllocator>::swap(other);
|
| - }
|
| -
|
| - template<size_t otherCapacity>
|
| - HeapDeque(const HeapDeque<T, otherCapacity>& other)
|
| - : Deque<T, inlineCapacity, HeapAllocator>(other)
|
| - {
|
| - }
|
| -
|
| - template<typename U>
|
| - void append(const U& other)
|
| - {
|
| - Deque<T, inlineCapacity, HeapAllocator>::append(other);
|
| - }
|
| -};
|
| +using HeapDeque = Deque<T, inlineCapacity, HeapAllocator>;
|
|
|
| template<typename T, size_t i>
|
| inline void swap(HeapVector<T, i>& a, HeapVector<T, i>& b) { a.swap(b); }
|
| @@ -1946,21 +1872,6 @@ struct ThreadingTrait<HeapHashTableBacking<Table> > {
|
| && (ThreadingTrait<Value>::Affinity == MainThreadOnly) ? MainThreadOnly : AnyThread;
|
| };
|
|
|
| -template<typename T, typename U, typename V, typename W, typename X>
|
| -struct ThreadingTrait<HeapHashMap<T, U, V, W, X> > : public ThreadingTrait<HashMap<T, U, V, W, X, HeapAllocator> > { };
|
| -
|
| -template<typename T, typename U, typename V>
|
| -struct ThreadingTrait<HeapHashSet<T, U, V> > : public ThreadingTrait<HashSet<T, U, V, HeapAllocator> > { };
|
| -
|
| -template<typename T, size_t inlineCapacity>
|
| -struct ThreadingTrait<HeapVector<T, inlineCapacity> > : public ThreadingTrait<Vector<T, inlineCapacity, HeapAllocator> > { };
|
| -
|
| -template<typename T, size_t inlineCapacity>
|
| -struct ThreadingTrait<HeapDeque<T, inlineCapacity> > : public ThreadingTrait<Deque<T, inlineCapacity, HeapAllocator> > { };
|
| -
|
| -template<typename T, typename U, typename V>
|
| -struct ThreadingTrait<HeapHashCountedSet<T, U, V> > : public ThreadingTrait<HashCountedSet<T, U, V, HeapAllocator> > { };
|
| -
|
| // The standard implementation of GCInfoTrait<T>::get() just returns a static
|
| // from the class T, but we can't do that for HashMap, HashSet, Vector, etc.
|
| // because they are in WTF and know nothing of GCInfos. Instead we have a
|
| @@ -2499,21 +2410,6 @@ void HeapHashTableBacking<Table>::finalize(void* pointer)
|
| }
|
| }
|
|
|
| -template<typename T, typename U, typename V, typename W, typename X>
|
| -struct GCInfoTrait<HeapHashMap<T, U, V, W, X> > : public GCInfoTrait<HashMap<T, U, V, W, X, HeapAllocator> > { };
|
| -template<typename T, typename U, typename V>
|
| -struct GCInfoTrait<HeapHashSet<T, U, V> > : public GCInfoTrait<HashSet<T, U, V, HeapAllocator> > { };
|
| -template<typename T, typename U, typename V>
|
| -struct GCInfoTrait<HeapLinkedHashSet<T, U, V> > : public GCInfoTrait<LinkedHashSet<T, U, V, HeapAllocator> > { };
|
| -template<typename T, size_t inlineCapacity, typename U>
|
| -struct GCInfoTrait<HeapListHashSet<T, inlineCapacity, U> > : public GCInfoTrait<ListHashSet<T, inlineCapacity, U, HeapListHashSetAllocator<T, inlineCapacity> > > { };
|
| -template<typename T, size_t inlineCapacity>
|
| -struct GCInfoTrait<HeapVector<T, inlineCapacity> > : public GCInfoTrait<Vector<T, inlineCapacity, HeapAllocator> > { };
|
| -template<typename T, size_t inlineCapacity>
|
| -struct GCInfoTrait<HeapDeque<T, inlineCapacity> > : public GCInfoTrait<Deque<T, inlineCapacity, HeapAllocator> > { };
|
| -template<typename T, typename U, typename V>
|
| -struct GCInfoTrait<HeapHashCountedSet<T, U, V> > : public GCInfoTrait<HashCountedSet<T, U, V, HeapAllocator> > { };
|
| -
|
| template<typename T>
|
| struct IfWeakMember;
|
|
|
|
|