Ignore:
Timestamp:
Oct 16, 2007, 4:25:33 PM (18 years ago)
Author:
ggaren
Message:

Reviewed by Darin Adler.


Global replace of assert with ASSERT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/HashTable.h

    r25365 r26688  
    2626#include "FastMalloc.h"
    2727#include "HashTraits.h"
    28 #include <assert.h>
     28#include <wtf/Assertions.h>
    2929
    3030namespace WTF {
     
    147147        {
    148148            checkValidity();
    149             assert(m_position != m_endPosition);
     149            ASSERT(m_position != m_endPosition);
    150150            ++m_position;
    151151            skipEmptyBuckets();
     
    171171        {
    172172#if CHECK_HASHTABLE_ITERATORS
    173             assert(m_table);
     173            ASSERT(m_table);
    174174#endif
    175175        }
     
    179179        void checkValidity(const const_iterator& other) const
    180180        {
    181             assert(m_table);
    182             assert(other.m_table);
    183             assert(m_table == other.m_table);
     181            ASSERT(m_table);
     182            ASSERT(other.m_table);
     183            ASSERT(m_table == other.m_table);
    184184        }
    185185#else
     
    385385    inline typename HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::FullLookupType HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::lookup(const T& key)
    386386    {
    387         assert(m_table);
     387        ASSERT(m_table);
    388388
    389389        unsigned h = HashTranslator::hash(key);
     
    461461    inline void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::reinsert(ValueType& entry)
    462462    {
    463         assert(m_table);
    464         assert(!lookup(Extractor::extract(entry)).second);
    465         assert(!isDeletedBucket(*(lookup(Extractor::extract(entry)).first)));
     463        ASSERT(m_table);
     464        ASSERT(!lookup(Extractor::extract(entry)).second);
     465        ASSERT(!isDeletedBucket(*(lookup(Extractor::extract(entry)).first)));
    466466#if DUMP_HASHTABLE_STATS
    467467        ++HashTableStats::numReinserts;
     
    676676    {
    677677        checkTableConsistencyExceptSize();
    678         assert(!shouldExpand());
    679         assert(!shouldShrink());
     678        ASSERT(!shouldExpand());
     679        ASSERT(!shouldShrink());
    680680    }
    681681
     
    699699
    700700            const_iterator it = find(Extractor::extract(*entry));
    701             assert(entry == it.m_position);
     701            ASSERT(entry == it.m_position);
    702702            ++count;
    703703        }
    704704
    705         assert(count == m_keyCount);
    706         assert(deletedCount == m_deletedCount);
    707         assert(m_tableSize >= m_minTableSize);
    708         assert(m_tableSizeMask);
    709         assert(m_tableSize == m_tableSizeMask + 1);
     705        ASSERT(count == m_keyCount);
     706        ASSERT(deletedCount == m_deletedCount);
     707        ASSERT(m_tableSize >= m_minTableSize);
     708        ASSERT(m_tableSizeMask);
     709        ASSERT(m_tableSize == m_tableSizeMask + 1);
    710710    }
    711711
     
    738738            it->m_next = 0;
    739739        } else {
    740             assert(table->m_iterators != it);
     740            ASSERT(table->m_iterators != it);
    741741            it->m_next = table->m_iterators;
    742742            table->m_iterators = it;
    743743            if (it->m_next) {
    744                 assert(!it->m_next->m_previous);
     744                ASSERT(!it->m_next->m_previous);
    745745                it->m_next->m_previous = it;
    746746            }
     
    756756        // Delete iterator from doubly-linked list of iterators.
    757757        if (!it->m_table) {
    758             assert(!it->m_next);
    759             assert(!it->m_previous);
     758            ASSERT(!it->m_next);
     759            ASSERT(!it->m_previous);
    760760        } else {
    761761            if (it->m_next) {
    762                 assert(it->m_next->m_previous == it);
     762                ASSERT(it->m_next->m_previous == it);
    763763                it->m_next->m_previous = it->m_previous;
    764764            }
    765765            if (it->m_previous) {
    766                 assert(it->m_table->m_iterators != it);
    767                 assert(it->m_previous->m_next == it);
     766                ASSERT(it->m_table->m_iterators != it);
     767                ASSERT(it->m_previous->m_next == it);
    768768                it->m_previous->m_next = it->m_next;
    769769            } else {
    770                 assert(it->m_table->m_iterators == it);
     770                ASSERT(it->m_table->m_iterators == it);
    771771                it->m_table->m_iterators = it->m_next;
    772772            }
Note: See TracChangeset for help on using the changeset viewer.