Changeset 65104 in webkit for trunk/JavaScriptCore/runtime/Structure.cpp
- Timestamp:
- Aug 10, 2010, 5:16:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Structure.cpp
r58308 r65104 271 271 unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; 272 272 for (unsigned i = 1; i <= entryCount; i++) { 273 if ( UString::Rep* key = m_propertyTable->entries()[i].key)273 if (StringImpl* key = m_propertyTable->entries()[i].key) 274 274 key->deref(); 275 275 } … … 396 396 void Structure::despecifyDictionaryFunction(const Identifier& propertyName) 397 397 { 398 const UString::Rep* rep = propertyName._ustring.rep();398 const StringImpl* rep = propertyName.impl(); 399 399 400 400 materializePropertyMapIfNecessary(); … … 445 445 ASSERT(structure->typeInfo().type() == ObjectType); 446 446 447 if (Structure* existingTransition = structure->transitionTableGet(make_pair(propertyName. ustring().rep(), attributes), specificValue)) {447 if (Structure* existingTransition = structure->transitionTableGet(make_pair(propertyName.impl(), attributes), specificValue)) { 448 448 ASSERT(existingTransition->m_offset != noOffset); 449 449 offset = existingTransition->m_offset + existingTransition->m_anonymousSlotCount; … … 480 480 transition->m_cachedPrototypeChain = structure->m_cachedPrototypeChain; 481 481 transition->m_previous = structure; 482 transition->m_nameInPrevious = propertyName. ustring().rep();482 transition->m_nameInPrevious = propertyName.impl(); 483 483 transition->m_attributesInPrevious = attributes; 484 484 transition->m_specificValueInPrevious = specificValue; … … 510 510 transition->m_offset = offset - structure->m_anonymousSlotCount; 511 511 ASSERT(structure->anonymousSlotCount() == transition->anonymousSlotCount()); 512 structure->transitionTableAdd(make_pair(propertyName. ustring().rep(), attributes), transition.get(), specificValue);512 structure->transitionTableAdd(make_pair(propertyName.impl(), attributes), transition.get(), specificValue); 513 513 return transition.release(); 514 514 } … … 739 739 unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; 740 740 for (unsigned i = 1; i <= entryCount; ++i) { 741 if ( UString::Rep* key = newTable->entries()[i].key)741 if (StringImpl* key = newTable->entries()[i].key) 742 742 key->ref(); 743 743 } … … 750 750 } 751 751 752 size_t Structure::get(const UString::Rep* rep, unsigned& attributes, JSCell*& specificValue)752 size_t Structure::get(const StringImpl* rep, unsigned& attributes, JSCell*& specificValue) 753 753 { 754 754 materializePropertyMapIfNecessary(); … … 807 807 return false; 808 808 809 UString::Rep* rep = propertyName._ustring.rep();809 StringImpl* rep = propertyName.impl(); 810 810 811 811 unsigned i = rep->existingHash(); … … 871 871 m_hasNonEnumerableProperties = true; 872 872 873 UString::Rep* rep = propertyName._ustring.rep();873 StringImpl* rep = propertyName.impl(); 874 874 875 875 if (!m_propertyTable) … … 955 955 } 956 956 957 bool Structure::hasTransition( UString::Rep* rep, unsigned attributes)957 bool Structure::hasTransition(StringImpl* rep, unsigned attributes) 958 958 { 959 959 return transitionTableHasTransition(make_pair(rep, attributes)); … … 966 966 checkConsistency(); 967 967 968 UString::Rep* rep = propertyName._ustring.rep();968 StringImpl* rep = propertyName.impl(); 969 969 970 970 if (!m_propertyTable) … … 980 980 unsigned k = 0; 981 981 unsigned entryIndex; 982 UString::Rep* key = 0;982 StringImpl* key = 0; 983 983 while (1) { 984 984 entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; … … 1242 1242 for (unsigned c = 1; c <= m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; ++c) { 1243 1243 ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[c].attributes & DontEnum)); 1244 UString::Rep* rep = m_propertyTable->entries()[c].key;1244 StringImpl* rep = m_propertyTable->entries()[c].key; 1245 1245 ASSERT(m_propertyTable->entries()[c].offset >= m_anonymousSlotCount); 1246 1246 if (!rep)
Note:
See TracChangeset
for help on using the changeset viewer.