| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // postfix -- intentionally omitted | 221 // postfix -- intentionally omitted |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 template <typename T, size_t inlineCapacity, typename Allocator> | 224 template <typename T, size_t inlineCapacity, typename Allocator> |
| 225 inline Deque<T, inlineCapacity, Allocator>::Deque() | 225 inline Deque<T, inlineCapacity, Allocator>::Deque() |
| 226 : m_start(0) | 226 : m_start(0) |
| 227 , m_end(0) | 227 , m_end(0) |
| 228 { | 228 { |
| 229 static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWit
hMemset, "Cannot initialize with memset if there is a vtable"); | 229 static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWit
hMemset, "Cannot initialize with memset if there is a vtable"); |
| 230 #if ENABLE(OILPAN) | 230 #if ENABLE(OILPAN) |
| 231 static_assert(Allocator::isGarbageCollected || !IsAllowOnlyInlineAllocation<
T>::value || !NeedsTracing<T>::value, "Cannot put DISALLOW_NEW_EXCEPT_PLACEMENT_
NEW objects that have trace methods into an off-heap Deque"); | 231 static_assert(Allocator::isGarbageCollected || !AllowsOnlyPlacementNew<T>::v
alue || !NeedsTracing<T>::value, "Cannot put DISALLOW_NEW_EXCEPT_PLACEMENT_NEW o
bjects that have trace methods into an off-heap Deque"); |
| 232 #endif | 232 #endif |
| 233 static_assert(Allocator::isGarbageCollected || !IsPointerToGarbageCollectedT
ype<T>::value, "Cannot put raw pointers to garbage-collected classes into a Dequ
e. Use HeapDeque<Member<T>> instead."); | 233 static_assert(Allocator::isGarbageCollected || !IsPointerToGarbageCollectedT
ype<T>::value, "Cannot put raw pointers to garbage-collected classes into a Dequ
e. Use HeapDeque<Member<T>> instead."); |
| 234 } | 234 } |
| 235 | 235 |
| 236 template <typename T, size_t inlineCapacity, typename Allocator> | 236 template <typename T, size_t inlineCapacity, typename Allocator> |
| 237 inline Deque<T, inlineCapacity, Allocator>::Deque(const Deque<T, inlineCapacity,
Allocator>& other) | 237 inline Deque<T, inlineCapacity, Allocator>::Deque(const Deque<T, inlineCapacity,
Allocator>& other) |
| 238 : m_buffer(other.m_buffer.capacity()) | 238 : m_buffer(other.m_buffer.capacity()) |
| 239 , m_start(other.m_start) | 239 , m_start(other.m_start) |
| 240 , m_end(other.m_end) | 240 , m_end(other.m_end) |
| 241 { | 241 { |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 struct NeedsTracing<Deque<T, N>> { | 575 struct NeedsTracing<Deque<T, N>> { |
| 576 static const bool value = false; | 576 static const bool value = false; |
| 577 }; | 577 }; |
| 578 #endif | 578 #endif |
| 579 | 579 |
| 580 } // namespace WTF | 580 } // namespace WTF |
| 581 | 581 |
| 582 using WTF::Deque; | 582 using WTF::Deque; |
| 583 | 583 |
| 584 #endif // WTF_Deque_h | 584 #endif // WTF_Deque_h |
| OLD | NEW |