Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Side by Side Diff: Source/wtf/Deque.h

Issue 23455034: Possible fix for a Mac performance regression. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/wtf/Vector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 TypeOperations::destruct(m_buffer.buffer() + m_start, m_buffer.buffe r() + m_buffer.capacity()); 318 TypeOperations::destruct(m_buffer.buffer() + m_start, m_buffer.buffe r() + m_buffer.capacity());
319 } 319 }
320 } 320 }
321 321
322 template<typename T, size_t inlineCapacity> 322 template<typename T, size_t inlineCapacity>
323 inline Deque<T, inlineCapacity>::~Deque() 323 inline Deque<T, inlineCapacity>::~Deque()
324 { 324 {
325 checkValidity(); 325 checkValidity();
326 invalidateIterators(); 326 invalidateIterators();
327 destroyAll(); 327 destroyAll();
328 m_buffer.destruct();
328 } 329 }
329 330
330 template<typename T, size_t inlineCapacity> 331 template<typename T, size_t inlineCapacity>
331 inline void Deque<T, inlineCapacity>::swap(Deque<T, inlineCapacity>& other) 332 inline void Deque<T, inlineCapacity>::swap(Deque<T, inlineCapacity>& other)
332 { 333 {
333 checkValidity(); 334 checkValidity();
334 other.checkValidity(); 335 other.checkValidity();
335 invalidateIterators(); 336 invalidateIterators();
336 std::swap(m_start, other.m_start); 337 std::swap(m_start, other.m_start);
337 std::swap(m_end, other.m_end); 338 std::swap(m_end, other.m_end);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 if (!m_index) 640 if (!m_index)
640 return &m_deque->m_buffer.buffer()[m_deque->m_buffer.capacity() - 1] ; 641 return &m_deque->m_buffer.buffer()[m_deque->m_buffer.capacity() - 1] ;
641 return &m_deque->m_buffer.buffer()[m_index - 1]; 642 return &m_deque->m_buffer.buffer()[m_index - 1];
642 } 643 }
643 644
644 } // namespace WTF 645 } // namespace WTF
645 646
646 using WTF::Deque; 647 using WTF::Deque;
647 648
648 #endif // WTF_Deque_h 649 #endif // WTF_Deque_h
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/Vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698