OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1334 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; | 1334 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; |
1335 }; | 1335 }; |
1336 | 1336 |
1337 template<typename Key, typename Value, typename T, typename U, typename V> | 1337 template<typename Key, typename Value, typename T, typename U, typename V> |
1338 struct ThreadingTrait<HashMap<Key, Value, HeapAllocator, T, U, V> > { | 1338 struct ThreadingTrait<HashMap<Key, Value, HeapAllocator, T, U, V> > { |
1339 static const ThreadAffinity Affinity = | 1339 static const ThreadAffinity Affinity = |
1340 (ThreadingTrait<Key>::Affinity == MainThreadOnly) | 1340 (ThreadingTrait<Key>::Affinity == MainThreadOnly) |
1341 && (ThreadingTrait<Value>::Affinity == MainThreadOnly) ? MainThreadOnly
: AnyThread; | 1341 && (ThreadingTrait<Value>::Affinity == MainThreadOnly) ? MainThreadOnly
: AnyThread; |
1342 }; | 1342 }; |
1343 | 1343 |
| 1344 template<typename First, typename Second> |
| 1345 struct ThreadingTrait<WTF::KeyValuePair<First, Second> > { |
| 1346 static const ThreadAffinity Affinity = |
| 1347 (ThreadingTrait<First>::Affinity == MainThreadOnly) |
| 1348 && (ThreadingTrait<Second>::Affinity == MainThreadOnly) ? MainThreadOnly
: AnyThread; |
| 1349 }; |
| 1350 |
1344 template<typename T, typename U, typename V> | 1351 template<typename T, typename U, typename V> |
1345 struct ThreadingTrait<HashSet<T, HeapAllocator, U, V> > { | 1352 struct ThreadingTrait<HashSet<T, HeapAllocator, U, V> > { |
1346 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; | 1353 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; |
1347 }; | 1354 }; |
1348 | 1355 |
1349 | 1356 |
1350 template<typename T, size_t inlineCapacity> | 1357 template<typename T, size_t inlineCapacity> |
1351 struct ThreadingTrait<Vector<T, inlineCapacity, HeapAllocator> > { | 1358 struct ThreadingTrait<Vector<T, inlineCapacity, HeapAllocator> > { |
1352 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; | 1359 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; |
1353 }; | 1360 }; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1671 // to export. This forces it to export all the methods from ThreadHeap. | 1678 // to export. This forces it to export all the methods from ThreadHeap. |
1672 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); | 1679 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); |
1673 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); | 1680 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); |
1674 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; | 1681 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; |
1675 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; | 1682 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; |
1676 #endif | 1683 #endif |
1677 | 1684 |
1678 } | 1685 } |
1679 | 1686 |
1680 #endif // Heap_h | 1687 #endif // Heap_h |
OLD | NEW |