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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; | 1352 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; |
1353 }; | 1353 }; |
1354 | 1354 |
1355 template<typename Key, typename Value, typename T, typename U, typename V> | 1355 template<typename Key, typename Value, typename T, typename U, typename V> |
1356 struct ThreadingTrait<HashMap<Key, Value, HeapAllocator, T, U, V> > { | 1356 struct ThreadingTrait<HashMap<Key, Value, HeapAllocator, T, U, V> > { |
1357 static const ThreadAffinity Affinity = | 1357 static const ThreadAffinity Affinity = |
1358 (ThreadingTrait<Key>::Affinity == MainThreadOnly) | 1358 (ThreadingTrait<Key>::Affinity == MainThreadOnly) |
1359 && (ThreadingTrait<Value>::Affinity == MainThreadOnly) ? MainThreadOnly
: AnyThread; | 1359 && (ThreadingTrait<Value>::Affinity == MainThreadOnly) ? MainThreadOnly
: AnyThread; |
1360 }; | 1360 }; |
1361 | 1361 |
| 1362 template<typename First, typename Second> |
| 1363 struct ThreadingTrait<WTF::KeyValuePair<First, Second> > { |
| 1364 static const ThreadAffinity Affinity = |
| 1365 (ThreadingTrait<First>::Affinity == MainThreadOnly) |
| 1366 && (ThreadingTrait<Second>::Affinity == MainThreadOnly) ? MainThreadOnly
: AnyThread; |
| 1367 }; |
| 1368 |
1362 template<typename T, typename U, typename V> | 1369 template<typename T, typename U, typename V> |
1363 struct ThreadingTrait<HashSet<T, HeapAllocator, U, V> > { | 1370 struct ThreadingTrait<HashSet<T, HeapAllocator, U, V> > { |
1364 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; | 1371 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; |
1365 }; | 1372 }; |
1366 | 1373 |
1367 | 1374 |
1368 template<typename T, size_t inlineCapacity> | 1375 template<typename T, size_t inlineCapacity> |
1369 struct ThreadingTrait<Vector<T, inlineCapacity, HeapAllocator> > { | 1376 struct ThreadingTrait<Vector<T, inlineCapacity, HeapAllocator> > { |
1370 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; | 1377 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; |
1371 }; | 1378 }; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1689 // to export. This forces it to export all the methods from ThreadHeap. | 1696 // to export. This forces it to export all the methods from ThreadHeap. |
1690 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); | 1697 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); |
1691 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); | 1698 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); |
1692 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; | 1699 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; |
1693 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; | 1700 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; |
1694 #endif | 1701 #endif |
1695 | 1702 |
1696 } | 1703 } |
1697 | 1704 |
1698 #endif // Heap_h | 1705 #endif // Heap_h |
OLD | NEW |