OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 { | 298 { |
299 return Allocator::Quantizer::template quantizedSize<T>(capacity); | 299 return Allocator::Quantizer::template quantizedSize<T>(capacity); |
300 } | 300 } |
301 | 301 |
302 T* buffer() { return m_buffer; } | 302 T* buffer() { return m_buffer; } |
303 const T* buffer() const { return m_buffer; } | 303 const T* buffer() const { return m_buffer; } |
304 size_t capacity() const { return m_capacity; } | 304 size_t capacity() const { return m_capacity; } |
305 | 305 |
306 void clearUnusedSlots(T* from, T* to) | 306 void clearUnusedSlots(T* from, T* to) |
307 { | 307 { |
308 VectorUnusedSlotClearer<Allocator::isGarbageCollected && (VectorTrai
ts<T>::needsDestruction || ShouldBeTraced<VectorTraits<T> >::value || VectorTrai
ts<T>::isWeak), T>::clear(from, to); | 308 VectorUnusedSlotClearer<Allocator::isGarbageCollected && (VectorTrai
ts<T>::needsDestruction || ShouldBeTraced<VectorTraits<T> >::value), T>::clear(f
rom, to); |
309 } | 309 } |
310 | 310 |
311 protected: | 311 protected: |
312 VectorBufferBase() | 312 VectorBufferBase() |
313 : m_buffer(0) | 313 : m_buffer(0) |
314 , m_capacity(0) | 314 , m_capacity(0) |
315 { | 315 { |
316 } | 316 } |
317 | 317 |
318 VectorBufferBase(T* buffer, size_t capacity) | 318 VectorBufferBase(T* buffer, size_t capacity) |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 } | 1194 } |
1195 if (this->hasOutOfLineBuffer()) | 1195 if (this->hasOutOfLineBuffer()) |
1196 Allocator::markNoTracing(visitor, buffer()); | 1196 Allocator::markNoTracing(visitor, buffer()); |
1197 } | 1197 } |
1198 | 1198 |
1199 } // namespace WTF | 1199 } // namespace WTF |
1200 | 1200 |
1201 using WTF::Vector; | 1201 using WTF::Vector; |
1202 | 1202 |
1203 #endif // WTF_Vector_h | 1203 #endif // WTF_Vector_h |
OLD | NEW |