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 ALLOW_ONLY_INLINE_ALLOCATION o
bjects that have trace methods into an off-heap Deque"); | 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"); |
232 #endif | 232 #endif |
233 } | 233 } |
234 | 234 |
235 template <typename T, size_t inlineCapacity, typename Allocator> | 235 template <typename T, size_t inlineCapacity, typename Allocator> |
236 inline Deque<T, inlineCapacity, Allocator>::Deque(const Deque<T, inlineCapacity,
Allocator>& other) | 236 inline Deque<T, inlineCapacity, Allocator>::Deque(const Deque<T, inlineCapacity,
Allocator>& other) |
237 : m_buffer(other.m_buffer.capacity()) | 237 : m_buffer(other.m_buffer.capacity()) |
238 , m_start(other.m_start) | 238 , m_start(other.m_start) |
239 , m_end(other.m_end) | 239 , m_end(other.m_end) |
240 { | 240 { |
241 const T* otherBuffer = other.m_buffer.buffer(); | 241 const T* otherBuffer = other.m_buffer.buffer(); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 struct NeedsTracing<Deque<T, N>> { | 574 struct NeedsTracing<Deque<T, N>> { |
575 static const bool value = false; | 575 static const bool value = false; |
576 }; | 576 }; |
577 #endif | 577 #endif |
578 | 578 |
579 } // namespace WTF | 579 } // namespace WTF |
580 | 580 |
581 using WTF::Deque; | 581 using WTF::Deque; |
582 | 582 |
583 #endif // WTF_Deque_h | 583 #endif // WTF_Deque_h |
OLD | NEW |