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

Side by Side Diff: sky/engine/wtf/HashTable.h

Issue 729733002: Remove more bits of the Oilpan tracing system (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/wtf/HashSet.h ('k') | sky/engine/wtf/HashTraits.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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 void clear(); 470 void clear();
471 471
472 static bool isEmptyBucket(const ValueType& value) { return isHashTraitsE mptyValue<KeyTraits>(Extractor::extract(value)); } 472 static bool isEmptyBucket(const ValueType& value) { return isHashTraitsE mptyValue<KeyTraits>(Extractor::extract(value)); }
473 static bool isDeletedBucket(const ValueType& value) { return KeyTraits:: isDeletedValue(Extractor::extract(value)); } 473 static bool isDeletedBucket(const ValueType& value) { return KeyTraits:: isDeletedValue(Extractor::extract(value)); }
474 static bool isEmptyOrDeletedBucket(const ValueType& value) { return Hash TableHelper<ValueType, Extractor, KeyTraits>:: isEmptyOrDeletedBucket(value); } 474 static bool isEmptyOrDeletedBucket(const ValueType& value) { return Hash TableHelper<ValueType, Extractor, KeyTraits>:: isEmptyOrDeletedBucket(value); }
475 475
476 ValueType* lookup(KeyPeekInType key) { return lookup<IdentityTranslatorT ype, KeyPeekInType>(key); } 476 ValueType* lookup(KeyPeekInType key) { return lookup<IdentityTranslatorT ype, KeyPeekInType>(key); }
477 template<typename HashTranslator, typename T> ValueType* lookup(T); 477 template<typename HashTranslator, typename T> ValueType* lookup(T);
478 template<typename HashTranslator, typename T> const ValueType* lookup(T) const; 478 template<typename HashTranslator, typename T> const ValueType* lookup(T) const;
479 479
480 void trace(typename Allocator::Visitor*);
481
482 #if ENABLE(ASSERT) 480 #if ENABLE(ASSERT)
483 int64_t modifications() const { return m_modifications; } 481 int64_t modifications() const { return m_modifications; }
484 void registerModification() { m_modifications++; } 482 void registerModification() { m_modifications++; }
485 // HashTable and collections that build on it do not support 483 // HashTable and collections that build on it do not support
486 // modifications while there is an iterator in use. The exception is 484 // modifications while there is an iterator in use. The exception is
487 // ListHashSet, which has its own iterators that tolerate modification 485 // ListHashSet, which has its own iterators that tolerate modification
488 // of the underlying set. 486 // of the underlying set.
489 void checkModifications(int64_t mods) const { ASSERT(mods == m_modificat ions); } 487 void checkModifications(int64_t mods) const { ASSERT(mods == m_modificat ions); }
490 #else 488 #else
491 int64_t modifications() const { return 0; } 489 int64_t modifications() const { return 0; }
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 CollectionIterator end(toBeRemoved.end()); 1245 CollectionIterator end(toBeRemoved.end());
1248 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) 1246 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it)
1249 collection.remove(*it); 1247 collection.remove(*it);
1250 } 1248 }
1251 1249
1252 } // namespace WTF 1250 } // namespace WTF
1253 1251
1254 #include "wtf/HashIterators.h" 1252 #include "wtf/HashIterators.h"
1255 1253
1256 #endif // WTF_HashTable_h 1254 #endif // WTF_HashTable_h
OLDNEW
« no previous file with comments | « sky/engine/wtf/HashSet.h ('k') | sky/engine/wtf/HashTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698