| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | 52 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; |
| 53 typedef PassTraits<T> Pass; | 53 typedef PassTraits<T> Pass; |
| 54 typedef typename PassTraits<T>::PassType PassType; | 54 typedef typename PassTraits<T>::PassType PassType; |
| 55 | 55 |
| 56 Deque(); | 56 Deque(); |
| 57 Deque(const Deque<T, inlineCapacity, Allocator>&); | 57 Deque(const Deque<T, inlineCapacity, Allocator>&); |
| 58 // FIXME: Doesn't work if there is an inline buffer, due to crbug.com/36
0572 | 58 // FIXME: Doesn't work if there is an inline buffer, due to crbug.com/36
0572 |
| 59 Deque<T, 0, Allocator>& operator=(const Deque&); | 59 Deque<T, 0, Allocator>& operator=(const Deque&); |
| 60 | 60 |
| 61 void finalize(); | 61 void finalize(); |
| 62 void finalizeGarbageCollectedObject() { finalize(); } | |
| 63 | 62 |
| 64 // We hard wire the inlineCapacity to zero here, due to crbug.com/360572 | 63 // We hard wire the inlineCapacity to zero here, due to crbug.com/360572 |
| 65 void swap(Deque<T, 0, Allocator>&); | 64 void swap(Deque<T, 0, Allocator>&); |
| 66 | 65 |
| 67 size_t size() const { return m_start <= m_end ? m_end - m_start : m_end
+ m_buffer.capacity() - m_start; } | 66 size_t size() const { return m_start <= m_end ? m_end - m_start : m_end
+ m_buffer.capacity() - m_start; } |
| 68 bool isEmpty() const { return m_start == m_end; } | 67 bool isEmpty() const { return m_start == m_end; } |
| 69 | 68 |
| 70 iterator begin() { return iterator(this, m_start); } | 69 iterator begin() { return iterator(this, m_start); } |
| 71 iterator end() { return iterator(this, m_end); } | 70 iterator end() { return iterator(this, m_end); } |
| 72 const_iterator begin() const { return const_iterator(this, m_start); } | 71 const_iterator begin() const { return const_iterator(this, m_start); } |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 struct NeedsTracing<Deque<T, N> > { | 548 struct NeedsTracing<Deque<T, N> > { |
| 550 static const bool value = false; | 549 static const bool value = false; |
| 551 }; | 550 }; |
| 552 #endif | 551 #endif |
| 553 | 552 |
| 554 } // namespace WTF | 553 } // namespace WTF |
| 555 | 554 |
| 556 using WTF::Deque; | 555 using WTF::Deque; |
| 557 | 556 |
| 558 #endif // WTF_Deque_h | 557 #endif // WTF_Deque_h |
| OLD | NEW |