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

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

Issue 2570483002: Revert of Simple BlinkGC heap compaction. (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/wtf/Deque.h ('k') | third_party/WebKit/Source/wtf/LinkedHashSet.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) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 David Levin <levin@chromium.org> 4 * Copyright (C) 2008 David Levin <levin@chromium.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 Allocator::registerDelayedMarkNoTracing(visitor, m_table); 2098 Allocator::registerDelayedMarkNoTracing(visitor, m_table);
2099 // Since we're delaying marking this HashTable, it is possible that the 2099 // Since we're delaying marking this HashTable, it is possible that the
2100 // registerWeakMembers is called multiple times (in rare 2100 // registerWeakMembers is called multiple times (in rare
2101 // cases). However, it shouldn't cause any issue. 2101 // cases). However, it shouldn't cause any issue.
2102 Allocator::registerWeakMembers( 2102 Allocator::registerWeakMembers(
2103 visitor, this, m_table, 2103 visitor, this, m_table,
2104 WeakProcessingHashTableHelper<Traits::weakHandlingFlag, Key, Value, 2104 WeakProcessingHashTableHelper<Traits::weakHandlingFlag, Key, Value,
2105 Extractor, HashFunctions, Traits, 2105 Extractor, HashFunctions, Traits,
2106 KeyTraits, Allocator>::process); 2106 KeyTraits, Allocator>::process);
2107 } 2107 }
2108 // If the backing store will be moved by sweep compaction, register the
2109 // table reference pointing to the backing store object, so that the
2110 // reference is updated upon object relocation. A no-op if not enabled
2111 // by the visitor.
2112 Allocator::registerBackingStoreReference(visitor, &m_table);
2113 if (!IsTraceableInCollectionTrait<Traits>::value) 2108 if (!IsTraceableInCollectionTrait<Traits>::value)
2114 return; 2109 return;
2115 if (Traits::weakHandlingFlag == WeakHandlingInCollections) { 2110 if (Traits::weakHandlingFlag == WeakHandlingInCollections) {
2116 // If we have both strong and weak pointers in the collection then 2111 // If we have both strong and weak pointers in the collection then
2117 // we queue up the collection for fixed point iteration a la 2112 // we queue up the collection for fixed point iteration a la
2118 // Ephemerons: 2113 // Ephemerons:
2119 // http://dl.acm.org/citation.cfm?doid=263698.263733 - see also 2114 // http://dl.acm.org/citation.cfm?doid=263698.263733 - see also
2120 // http://www.jucs.org/jucs_14_21/eliminating_cycles_in_weak 2115 // http://www.jucs.org/jucs_14_21/eliminating_cycles_in_weak
2121 ASSERT(!enqueued() || Allocator::weakTableRegistered(visitor, this)); 2116 ASSERT(!enqueued() || Allocator::weakTableRegistered(visitor, this));
2122 if (!enqueued()) { 2117 if (!enqueued()) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 CollectionIterator end(toBeRemoved.end()); 2273 CollectionIterator end(toBeRemoved.end());
2279 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) 2274 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it)
2280 collection.remove(*it); 2275 collection.remove(*it);
2281 } 2276 }
2282 2277
2283 } // namespace WTF 2278 } // namespace WTF
2284 2279
2285 #include "wtf/HashIterators.h" 2280 #include "wtf/HashIterators.h"
2286 2281
2287 #endif // WTF_HashTable_h 2282 #endif // WTF_HashTable_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/Deque.h ('k') | third_party/WebKit/Source/wtf/LinkedHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698