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

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

Issue 23475023: Revert 157198 "Possible fix for a Mac performance regression." (Closed) Base URL: svn://svn.chromium.org/blink/
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 | trunk/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();
329 } 328 }
330 329
331 template<typename T, size_t inlineCapacity> 330 template<typename T, size_t inlineCapacity>
332 inline void Deque<T, inlineCapacity>::swap(Deque<T, inlineCapacity>& other) 331 inline void Deque<T, inlineCapacity>::swap(Deque<T, inlineCapacity>& other)
333 { 332 {
334 checkValidity(); 333 checkValidity();
335 other.checkValidity(); 334 other.checkValidity();
336 invalidateIterators(); 335 invalidateIterators();
337 std::swap(m_start, other.m_start); 336 std::swap(m_start, other.m_start);
338 std::swap(m_end, other.m_end); 337 std::swap(m_end, other.m_end);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 if (!m_index) 639 if (!m_index)
641 return &m_deque->m_buffer.buffer()[m_deque->m_buffer.capacity() - 1] ; 640 return &m_deque->m_buffer.buffer()[m_deque->m_buffer.capacity() - 1] ;
642 return &m_deque->m_buffer.buffer()[m_index - 1]; 641 return &m_deque->m_buffer.buffer()[m_index - 1];
643 } 642 }
644 643
645 } // namespace WTF 644 } // namespace WTF
646 645
647 using WTF::Deque; 646 using WTF::Deque;
648 647
649 #endif // WTF_Deque_h 648 #endif // WTF_Deque_h
OLDNEW
« no previous file with comments | « no previous file | trunk/Source/wtf/Vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698