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

Side by Side Diff: Source/wtf/HashTable.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/HashSet.h ('k') | 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 reserv ed. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 David Levin <levin@chromium.org> 3 * Copyright (C) 2008 David Levin <levin@chromium.org>
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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 void clear(); 455 void clear();
456 456
457 static bool isEmptyBucket(const ValueType& value) { return isHashTraitsE mptyValue<KeyTraits>(Extractor::extract(value)); } 457 static bool isEmptyBucket(const ValueType& value) { return isHashTraitsE mptyValue<KeyTraits>(Extractor::extract(value)); }
458 static bool isDeletedBucket(const ValueType& value) { return KeyTraits:: isDeletedValue(Extractor::extract(value)); } 458 static bool isDeletedBucket(const ValueType& value) { return KeyTraits:: isDeletedValue(Extractor::extract(value)); }
459 static bool isEmptyOrDeletedBucket(const ValueType& value) { return Hash TableHelper<ValueType, Extractor, KeyTraits>:: isEmptyOrDeletedBucket(value); } 459 static bool isEmptyOrDeletedBucket(const ValueType& value) { return Hash TableHelper<ValueType, Extractor, KeyTraits>:: isEmptyOrDeletedBucket(value); }
460 460
461 ValueType* lookup(KeyPeekInType key) { return lookup<IdentityTranslatorT ype, KeyPeekInType>(key); } 461 ValueType* lookup(KeyPeekInType key) { return lookup<IdentityTranslatorT ype, KeyPeekInType>(key); }
462 template<typename HashTranslator, typename T> ValueType* lookup(T); 462 template<typename HashTranslator, typename T> ValueType* lookup(T);
463 template<typename HashTranslator, typename T> const ValueType* lookup(T) const; 463 template<typename HashTranslator, typename T> const ValueType* lookup(T) const;
464 464
465 typedef int HasInlinedTraceMethodMarker;
466 template<typename VisitorDispatcher> void trace(VisitorDispatcher); 465 template<typename VisitorDispatcher> void trace(VisitorDispatcher);
467 466
468 #if ENABLE(ASSERT) 467 #if ENABLE(ASSERT)
469 int64_t modifications() const { return m_modifications; } 468 int64_t modifications() const { return m_modifications; }
470 void registerModification() { m_modifications++; } 469 void registerModification() { m_modifications++; }
471 // HashTable and collections that build on it do not support 470 // HashTable and collections that build on it do not support
472 // modifications while there is an iterator in use. The exception is 471 // modifications while there is an iterator in use. The exception is
473 // ListHashSet, which has its own iterators that tolerate modification 472 // ListHashSet, which has its own iterators that tolerate modification
474 // of the underlying set. 473 // of the underlying set.
475 void checkModifications(int64_t mods) const { ASSERT(mods == m_modificat ions); } 474 void checkModifications(int64_t mods) const { ASSERT(mods == m_modificat ions); }
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 CollectionIterator end(toBeRemoved.end()); 1447 CollectionIterator end(toBeRemoved.end());
1449 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) 1448 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it)
1450 collection.remove(*it); 1449 collection.remove(*it);
1451 } 1450 }
1452 1451
1453 } // namespace WTF 1452 } // namespace WTF
1454 1453
1455 #include "wtf/HashIterators.h" 1454 #include "wtf/HashIterators.h"
1456 1455
1457 #endif // WTF_HashTable_h 1456 #endif // WTF_HashTable_h
OLDNEW
« no previous file with comments | « Source/wtf/HashSet.h ('k') | Source/wtf/LinkedHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698