Changeset 44171 in webkit for trunk/JavaScriptCore/runtime/Structure.cpp
- Timestamp:
- May 26, 2009, 7:47:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Structure.cpp
r44076 r44171 328 328 } 329 329 330 void Structure::despecifyDictionaryFunction(const Identifier& propertyName) 331 { 332 const UString::Rep* rep = propertyName._ustring.rep(); 333 334 materializePropertyMapIfNecessary(); 335 336 ASSERT(m_isDictionary); 337 ASSERT(m_propertyTable); 338 339 unsigned i = rep->computedHash(); 340 341 #if DUMP_PROPERTYMAP_STATS 342 ++numProbes; 343 #endif 344 345 unsigned entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; 346 ASSERT(entryIndex != emptyEntryIndex); 347 348 if (rep == m_propertyTable->entries()[entryIndex - 1].key) { 349 m_propertyTable->entries()[entryIndex - 1].specificValue = 0; 350 return; 351 } 352 353 #if DUMP_PROPERTYMAP_STATS 354 ++numCollisions; 355 #endif 356 357 unsigned k = 1 | doubleHash(rep->computedHash()); 358 359 while (1) { 360 i += k; 361 362 #if DUMP_PROPERTYMAP_STATS 363 ++numRehashes; 364 #endif 365 366 entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; 367 ASSERT(entryIndex != emptyEntryIndex); 368 369 if (rep == m_propertyTable->entries()[entryIndex - 1].key) { 370 m_propertyTable->entries()[entryIndex - 1].specificValue = 0; 371 return; 372 } 373 } 374 } 375 330 376 PassRefPtr<Structure> Structure::addPropertyTransitionToExistingStructure(Structure* structure, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset) 331 377 { … … 441 487 } 442 488 443 PassRefPtr<Structure> Structure:: changeFunctionTransition(Structure* structure, const Identifier& replaceFunction)489 PassRefPtr<Structure> Structure::despecifyFunctionTransition(Structure* structure, const Identifier& replaceFunction) 444 490 { 445 491 RefPtr<Structure> transition = create(structure->storedPrototype(), structure->typeInfo());
Note:
See TracChangeset
for help on using the changeset viewer.