Changeset 26688 in webkit for trunk/JavaScriptCore/kjs/property_map.cpp
- Timestamp:
- Oct 16, 2007, 4:25:33 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/property_map.cpp
r21018 r26688 27 27 #include "PropertyNameArray.h" 28 28 #include <algorithm> 29 #include <wtf/Assertions.h> 29 30 #include <wtf/FastMalloc.h> 30 31 #include <wtf/Vector.h> … … 160 161 JSValue *PropertyMap::get(const Identifier &name, unsigned &attributes) const 161 162 { 162 assert(!name.isNull());163 ASSERT(!name.isNull()); 163 164 164 165 UString::Rep *rep = name._ustring.rep(); … … 201 202 JSValue *PropertyMap::get(const Identifier &name) const 202 203 { 203 assert(!name.isNull());204 ASSERT(!name.isNull()); 204 205 205 206 UString::Rep *rep = name._ustring.rep(); … … 238 239 JSValue **PropertyMap::getLocation(const Identifier &name) 239 240 { 240 assert(!name.isNull());241 ASSERT(!name.isNull()); 241 242 242 243 UString::Rep *rep = name._ustring.rep(); … … 295 296 void PropertyMap::put(const Identifier &name, JSValue *value, int attributes, bool roCheck) 296 297 { 297 assert(!name.isNull());298 assert(value != 0);298 ASSERT(!name.isNull()); 299 ASSERT(value != 0); 299 300 300 301 checkConsistency(); … … 382 383 void PropertyMap::insert(UString::Rep *key, JSValue *value, int attributes, int index) 383 384 { 384 assert(m_u.table);385 ASSERT(m_u.table); 385 386 386 387 unsigned h = key->hash(); … … 394 395 #endif 395 396 while (entries[i].key) { 396 assert(entries[i].key != deletedSentinel());397 ASSERT(entries[i].key != deletedSentinel()); 397 398 if (k == 0) 398 399 k = 1 | (h % sizeMask); … … 418 419 void PropertyMap::rehash() 419 420 { 420 assert(m_u.table);421 assert(m_u.table->size);421 ASSERT(m_u.table); 422 ASSERT(m_u.table->size); 422 423 rehash(m_u.table->size); 423 424 } … … 449 450 // the table key count 450 451 ++m_u.table->keyCount; 451 assert(m_u.table->keyCount == 1);452 ASSERT(m_u.table->keyCount == 1); 452 453 } 453 454 #endif … … 472 473 void PropertyMap::remove(const Identifier &name) 473 474 { 474 assert(!name.isNull());475 ASSERT(!name.isNull()); 475 476 476 477 checkConsistency(); … … 523 524 entries[i].value = 0; 524 525 entries[i].attributes = DontEnum; 525 assert(m_u.table->keyCount >= 1);526 ASSERT(m_u.table->keyCount >= 1); 526 527 --m_u.table->keyCount; 527 528 ++m_u.table->sentinelCount; … … 702 703 *p++ = e; 703 704 } 704 assert(p - sortedEntries.data() == count);705 ASSERT(p - sortedEntries.data() == count); 705 706 706 707 // Sort the entries by index. … … 750 751 i = (i + k) & m_u.table->sizeMask; 751 752 } 752 assert(i == j);753 ASSERT(i == j); 753 754 ++count; 754 755 } 755 assert(count == m_u.table->keyCount);756 assert(sentinelCount == m_u.table->sentinelCount);757 assert(m_u.table->size >= 16);758 assert(m_u.table->sizeMask);759 assert(m_u.table->size == m_u.table->sizeMask + 1);756 ASSERT(count == m_u.table->keyCount); 757 ASSERT(sentinelCount == m_u.table->sentinelCount); 758 ASSERT(m_u.table->size >= 16); 759 ASSERT(m_u.table->sizeMask); 760 ASSERT(m_u.table->size == m_u.table->sizeMask + 1); 760 761 } 761 762
Note:
See TracChangeset
for help on using the changeset viewer.