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