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