Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 979 | 979 |
| 980 template<typename T> | 980 template<typename T> |
| 981 class TraceEagerlyTrait<CrossThreadPersistent<T>> { | 981 class TraceEagerlyTrait<CrossThreadPersistent<T>> { |
| 982 public: | 982 public: |
| 983 static const bool value = TraceEagerlyTrait<T>::value; | 983 static const bool value = TraceEagerlyTrait<T>::value; |
| 984 }; | 984 }; |
| 985 | 985 |
| 986 template<typename T, typename U, typename V, typename W, typename X> | 986 template<typename T, typename U, typename V, typename W, typename X> |
| 987 class TraceEagerlyTrait<HeapHashMap<T, U, V, W, X> > { | 987 class TraceEagerlyTrait<HeapHashMap<T, U, V, W, X> > { |
| 988 public: | 988 public: |
| 989 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T) || IS_EAGERLY _TRACED_HEAP_COLLECTION(U); | 989 static const bool value = TraceEagerlyTrait<T>::value || TraceEagerlyTrait<U >::value; |
|
Erik Corry
2014/12/09 15:49:02
Can't this just be "true"? We can eagerly trace t
sof
2014/12/09 21:55:37
why not. I've made the enabled flag/setting for th
| |
| 990 }; | 990 }; |
| 991 | 991 |
| 992 template<typename T, typename U, typename V> | 992 template<typename T, typename U, typename V> |
| 993 class TraceEagerlyTrait<HeapHashSet<T, U, V> > { | 993 class TraceEagerlyTrait<HeapHashSet<T, U, V> > { |
| 994 public: | 994 public: |
| 995 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); | 995 static const bool value = TraceEagerlyTrait<T>::value; |
| 996 }; | 996 }; |
| 997 | 997 |
| 998 template<typename T, typename U, typename V> | 998 template<typename T, typename U, typename V> |
| 999 class TraceEagerlyTrait<HeapLinkedHashSet<T, U, V> > { | 999 class TraceEagerlyTrait<HeapLinkedHashSet<T, U, V> > { |
| 1000 public: | 1000 public: |
| 1001 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); | 1001 static const bool value = TraceEagerlyTrait<T>::value; |
| 1002 }; | 1002 }; |
| 1003 | 1003 |
| 1004 template<typename T, size_t inlineCapacity, typename U> | 1004 template<typename T, size_t inlineCapacity, typename U> |
| 1005 class TraceEagerlyTrait<HeapListHashSet<T, inlineCapacity, U> > { | 1005 class TraceEagerlyTrait<HeapListHashSet<T, inlineCapacity, U> > { |
| 1006 public: | 1006 public: |
| 1007 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); | 1007 static const bool value = TraceEagerlyTrait<T>::value; |
| 1008 }; | |
| 1009 | |
| 1010 template<typename T, size_t inlineCapacity> | |
| 1011 class TraceEagerlyTrait<WTF::ListHashSetNode<T, HeapListHashSetAllocator<T, inli neCapacity>>> { | |
| 1012 public: | |
| 1013 static const bool value = false; | |
| 1008 }; | 1014 }; |
| 1009 | 1015 |
| 1010 template<typename T, size_t inlineCapacity> | 1016 template<typename T, size_t inlineCapacity> |
| 1011 class TraceEagerlyTrait<HeapVector<T, inlineCapacity> > { | 1017 class TraceEagerlyTrait<HeapVector<T, inlineCapacity> > { |
| 1012 public: | 1018 public: |
| 1013 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); | 1019 static const bool value = TraceEagerlyTrait<T>::value; |
| 1014 }; | 1020 }; |
| 1015 | 1021 |
| 1016 template<typename T, typename U> | 1022 template<typename T, typename U> |
| 1017 class TraceEagerlyTrait<HeapVectorBacking<T, U> > { | 1023 class TraceEagerlyTrait<HeapVectorBacking<T, U> > { |
| 1018 public: | 1024 public: |
| 1019 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); | 1025 static const bool value = TraceEagerlyTrait<T>::value; |
| 1020 }; | 1026 }; |
| 1021 | 1027 |
| 1022 template<typename T, size_t inlineCapacity> | 1028 template<typename T, size_t inlineCapacity> |
| 1023 class TraceEagerlyTrait<HeapDeque<T, inlineCapacity> > { | 1029 class TraceEagerlyTrait<HeapDeque<T, inlineCapacity> > { |
| 1024 public: | 1030 public: |
| 1025 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); | 1031 static const bool value = TraceEagerlyTrait<T>::value; |
| 1026 }; | 1032 }; |
| 1027 | 1033 |
| 1028 template<typename T, typename U, typename V> | 1034 template<typename T, typename U, typename V> |
| 1029 class TraceEagerlyTrait<HeapHashCountedSet<T, U, V> > { | 1035 class TraceEagerlyTrait<HeapHashCountedSet<T, U, V> > { |
| 1030 public: | 1036 public: |
| 1031 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); | 1037 static const bool value = TraceEagerlyTrait<T>::value; |
| 1032 }; | 1038 }; |
| 1033 | 1039 |
| 1034 } // namespace blink | 1040 } // namespace blink |
| 1035 | 1041 |
| 1036 namespace WTF { | 1042 namespace WTF { |
| 1037 | 1043 |
| 1038 template <typename T> struct VectorTraits<blink::Member<T> > : VectorTraitsBase< blink::Member<T> > { | 1044 template <typename T> struct VectorTraits<blink::Member<T> > : VectorTraitsBase< blink::Member<T> > { |
| 1039 static const bool needsDestruction = false; | 1045 static const bool needsDestruction = false; |
| 1040 static const bool canInitializeWithMemset = true; | 1046 static const bool canInitializeWithMemset = true; |
| 1041 static const bool canMoveWithMemcpy = true; | 1047 static const bool canMoveWithMemcpy = true; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1221 template<typename T> | 1227 template<typename T> |
| 1222 struct ParamStorageTraits<RawPtr<T> > : public PointerParamStorageTraits<T*, bli nk::IsGarbageCollectedType<T>::value> { | 1228 struct ParamStorageTraits<RawPtr<T> > : public PointerParamStorageTraits<T*, bli nk::IsGarbageCollectedType<T>::value> { |
| 1223 }; | 1229 }; |
| 1224 | 1230 |
| 1225 template<typename T> | 1231 template<typename T> |
| 1226 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1232 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
| 1227 | 1233 |
| 1228 } // namespace WTF | 1234 } // namespace WTF |
| 1229 | 1235 |
| 1230 #endif | 1236 #endif |
| OLD | NEW |