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

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

Issue 1270043002: Remove HasInlinedTraceMethod<T>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « Source/wtf/LinkedHashSet.h ('k') | 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) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> 3 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void remove(ValuePeekInType value) { return remove(find(value)); } 160 void remove(ValuePeekInType value) { return remove(find(value)); }
161 void remove(iterator); 161 void remove(iterator);
162 void clear(); 162 void clear();
163 template<typename Collection> 163 template<typename Collection>
164 void removeAll(const Collection& other) { WTF::removeAll(*this, other); } 164 void removeAll(const Collection& other) { WTF::removeAll(*this, other); }
165 165
166 ValuePassOutType take(iterator); 166 ValuePassOutType take(iterator);
167 ValuePassOutType take(ValuePeekInType); 167 ValuePassOutType take(ValuePeekInType);
168 ValuePassOutType takeFirst(); 168 ValuePassOutType takeFirst();
169 169
170 typedef int HasInlinedTraceMethodMarker;
171 template<typename VisitorDispatcher> 170 template<typename VisitorDispatcher>
172 void trace(VisitorDispatcher); 171 void trace(VisitorDispatcher);
173 172
174 private: 173 private:
175 void unlink(Node*); 174 void unlink(Node*);
176 void unlinkAndDelete(Node*); 175 void unlinkAndDelete(Node*);
177 void appendNode(Node*); 176 void appendNode(Node*);
178 void prependNode(Node*); 177 void prependNode(Node*);
179 void insertNodeBefore(Node* beforeNode, Node* newNode); 178 void insertNodeBefore(Node* beforeNode, Node* newNode);
180 void deleteAllNodes(); 179 void deleteAllNodes();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 finalize(this); 386 finalize(this);
388 } 387 }
389 388
390 void destroy(NodeAllocator* allocator) 389 void destroy(NodeAllocator* allocator)
391 { 390 {
392 this->~ListHashSetNode(); 391 this->~ListHashSetNode();
393 setWasAlreadyDestructed(); 392 setWasAlreadyDestructed();
394 allocator->deallocate(this); 393 allocator->deallocate(this);
395 } 394 }
396 395
397 typedef int HasInlinedTraceMethodMarker;
398 // This is not called in normal tracing, but it is called if we find a 396 // This is not called in normal tracing, but it is called if we find a
399 // pointer to a node on the stack using conservative scanning. Since 397 // pointer to a node on the stack using conservative scanning. Since
400 // the original ListHashSet may no longer exist we make sure to mark 398 // the original ListHashSet may no longer exist we make sure to mark
401 // the neighbours in the chain too. 399 // the neighbours in the chain too.
402 template<typename VisitorDispatcher> 400 template<typename VisitorDispatcher>
403 void trace(VisitorDispatcher visitor) 401 void trace(VisitorDispatcher visitor)
404 { 402 {
405 // The conservative stack scan can find nodes that have been 403 // The conservative stack scan can find nodes that have been
406 // removed from the set and destructed. We don't need to trace 404 // removed from the set and destructed. We don't need to trace
407 // these, and it would be wrong to do so, because the class will 405 // these, and it would be wrong to do so, because the class will
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 struct NeedsTracing<ListHashSet<T, U, V>> { 1008 struct NeedsTracing<ListHashSet<T, U, V>> {
1011 static const bool value = false; 1009 static const bool value = false;
1012 }; 1010 };
1013 #endif 1011 #endif
1014 1012
1015 } // namespace WTF 1013 } // namespace WTF
1016 1014
1017 using WTF::ListHashSet; 1015 using WTF::ListHashSet;
1018 1016
1019 #endif /* WTF_ListHashSet_h */ 1017 #endif /* WTF_ListHashSet_h */
OLDNEW
« no previous file with comments | « Source/wtf/LinkedHashSet.h ('k') | Source/wtf/Vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698