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

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

Issue 2531973002: Simple BlinkGC heap compaction. (Closed)
Patch Set: synchronize on compaction finish Created 4 years 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
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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 bufferEntry++) 649 bufferEntry++)
650 Allocator::template trace<VisitorDispatcher, T, VectorTraits<T>>( 650 Allocator::template trace<VisitorDispatcher, T, VectorTraits<T>>(
651 visitor, *const_cast<T*>(bufferEntry)); 651 visitor, *const_cast<T*>(bufferEntry));
652 const T* bufferEnd = m_buffer.buffer() + m_buffer.capacity(); 652 const T* bufferEnd = m_buffer.buffer() + m_buffer.capacity();
653 for (const T* bufferEntry = bufferBegin + m_start; 653 for (const T* bufferEntry = bufferBegin + m_start;
654 bufferEntry != bufferEnd; bufferEntry++) 654 bufferEntry != bufferEnd; bufferEntry++)
655 Allocator::template trace<VisitorDispatcher, T, VectorTraits<T>>( 655 Allocator::template trace<VisitorDispatcher, T, VectorTraits<T>>(
656 visitor, *const_cast<T*>(bufferEntry)); 656 visitor, *const_cast<T*>(bufferEntry));
657 } 657 }
658 } 658 }
659 if (m_buffer.hasOutOfLineBuffer()) 659 if (m_buffer.hasOutOfLineBuffer()) {
660 Allocator::markNoTracing(visitor, m_buffer.buffer()); 660 Allocator::markNoTracing(visitor, m_buffer.buffer());
661 Allocator::registerBackingStoreReference(visitor, m_buffer.bufferSlot());
662 }
661 } 663 }
662 664
663 template <typename T, size_t inlineCapacity, typename Allocator> 665 template <typename T, size_t inlineCapacity, typename Allocator>
664 inline void swap(Deque<T, inlineCapacity, Allocator>& a, 666 inline void swap(Deque<T, inlineCapacity, Allocator>& a,
665 Deque<T, inlineCapacity, Allocator>& b) { 667 Deque<T, inlineCapacity, Allocator>& b) {
666 a.swap(b); 668 a.swap(b);
667 } 669 }
668 670
669 } // namespace WTF 671 } // namespace WTF
670 672
671 using WTF::Deque; 673 using WTF::Deque;
672 674
673 #endif // WTF_Deque_h 675 #endif // WTF_Deque_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698