Changeset 167564 in webkit
- Timestamp:
- Apr 20, 2014 4:45:32 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167562 r167564 1 2014-04-20 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r167501. 4 https://bugs.webkit.org/show_bug.cgi?id=131913 5 6 It broke DYEBench (Requested by mhahnenberg on #webkit). 7 8 Reverted changeset: 9 10 "Deleting properties poisons objects" 11 https://bugs.webkit.org/show_bug.cgi?id=131551 12 http://trac.webkit.org/changeset/167501 13 1 14 2014-04-19 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Source/JavaScriptCore/ChangeLog
r167563 r167564 1 2014-04-20 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r167501. 4 https://bugs.webkit.org/show_bug.cgi?id=131913 5 6 It broke DYEBench (Requested by mhahnenberg on #webkit). 7 8 Reverted changeset: 9 10 "Deleting properties poisons objects" 11 https://bugs.webkit.org/show_bug.cgi?id=131551 12 http://trac.webkit.org/changeset/167501 13 1 14 2014-04-19 Filip Pizlo <fpizlo@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
r167501 r167564 64 64 jsPropertyNameIterator->finishCreation(vm, propertyNames.data(), o); 65 65 66 // JSPropertyNameIterator doesn't know how to skip deleted buckets, so just give up. 67 if (o->structure()->isDictionary() || o->structure()->hasDeletedOffsets()) 66 if (o->structure()->isDictionary()) 68 67 return jsPropertyNameIterator; 69 68 -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r167501 r167564 166 166 , m_offset(invalidOffset) 167 167 , m_inlineCapacity(inlineCapacity) 168 , m_forgivenDeletes(0)169 168 , m_dictionaryKind(NoneDictionaryKind) 170 169 , m_isPinnedPropertyTable(false) … … 194 193 , m_offset(invalidOffset) 195 194 , m_inlineCapacity(0) 196 , m_forgivenDeletes(0)197 195 , m_dictionaryKind(NoneDictionaryKind) 198 196 , m_isPinnedPropertyTable(false) … … 221 219 , m_offset(invalidOffset) 222 220 , m_inlineCapacity(previous->m_inlineCapacity) 223 , m_forgivenDeletes(previous->m_forgivenDeletes)224 221 , m_dictionaryKind(previous->m_dictionaryKind) 225 222 , m_isPinnedPropertyTable(false) … … 314 311 if (!structure->m_nameInPrevious) 315 312 continue; 316 317 PropertyMapEntry entry(vm, this, 318 structure->m_nameInPrevious.get(), 319 propertyTable()->nextOffset(m_inlineCapacity), 320 structure->m_attributesInPrevious, 321 structure->m_specificValueInPrevious.get()); 313 PropertyMapEntry entry(vm, this, structure->m_nameInPrevious.get(), structure->m_offset, structure->m_attributesInPrevious, structure->m_specificValueInPrevious.get()); 322 314 propertyTable()->add(entry, m_offset, PropertyTable::PropertyOffsetMustNotChange); 323 315 } … … 467 459 ASSERT(!structure->isUncacheableDictionary()); 468 460 469 if (structure->m_forgivenDeletes < s_maxForgivenDeletes) {470 Structure* transition = create(vm, structure);471 472 DeferGC deferGC(vm.heap);473 structure->materializePropertyMapIfNecessary(vm, deferGC);474 transition->propertyTable().set(vm, transition, structure->copyPropertyTableForPinning(vm, transition));475 transition->m_offset = structure->m_offset;476 transition->pinAndPreventTransitions();477 478 offset = transition->remove(propertyName);479 ASSERT(offset != invalidOffset);480 transition->m_forgivenDeletes = structure->m_forgivenDeletes + 1;481 482 transition->checkOffsetConsistency();483 return transition;484 }485 486 461 Structure* transition = toUncacheableDictionaryTransition(vm, structure); 462 487 463 offset = transition->remove(propertyName); 464 488 465 transition->checkOffsetConsistency(); 489 466 return transition; … … 500 477 transition->propertyTable().set(vm, transition, structure->copyPropertyTableForPinning(vm, transition)); 501 478 transition->m_offset = structure->m_offset; 502 transition->pin AndPreventTransitions();479 transition->pin(); 503 480 504 481 transition->checkOffsetConsistency(); … … 517 494 transition->propertyTable().set(vm, transition, structure->copyPropertyTableForPinning(vm, transition)); 518 495 transition->m_offset = structure->m_offset; 519 transition->pin AndPreventTransitions();496 transition->pin(); 520 497 521 498 if (transition->m_specificFunctionThrashCount == maxSpecificFunctionThrashCount) … … 539 516 transition->propertyTable().set(vm, transition, structure->copyPropertyTableForPinning(vm, transition)); 540 517 transition->m_offset = structure->m_offset; 541 transition->pin AndPreventTransitions();518 transition->pin(); 542 519 543 520 structure = transition; … … 564 541 transition->m_offset = structure->m_offset; 565 542 transition->m_dictionaryKind = kind; 566 transition->pin AndPreventTransitions();543 transition->pin(); 567 544 568 545 transition->checkOffsetConsistency(); … … 627 604 transition->m_offset = structure->m_offset; 628 605 transition->m_preventExtensions = true; 629 transition->pin AndPreventTransitions();606 transition->pin(); 630 607 631 608 transition->checkOffsetConsistency(); … … 776 753 materializePropertyMapIfNecessaryForPinning(vm, deferGC); 777 754 778 pin AndPreventTransitions();755 pin(); 779 756 780 757 return putSpecificValue(vm, propertyName, attributes, specificValue); … … 789 766 materializePropertyMapIfNecessaryForPinning(vm, deferGC); 790 767 791 pin AndPreventTransitions();768 pin(); 792 769 return remove(propertyName); 793 770 } … … 797 774 ASSERT(propertyTable()); 798 775 m_isPinnedPropertyTable = true; 799 }800 801 void Structure::pinAndPreventTransitions()802 {803 pin();804 776 clearPreviousID(); 805 777 m_nameInPrevious.clear(); -
trunk/Source/JavaScriptCore/runtime/Structure.h
r167501 r167564 138 138 void setPrototypeWithoutTransition(VM& vm, JSValue prototype) { m_prototype.set(vm, this, prototype); } 139 139 140 bool hasDeletedOffsets() const;141 142 140 bool isDictionary() const { return m_dictionaryKind != NoneDictionaryKind; } 143 141 bool isUncacheableDictionary() const { return m_dictionaryKind == UncachedDictionaryKind; } … … 414 412 415 413 WriteBarrier<PropertyTable>& propertyTable(); 416 const WriteBarrier<PropertyTable>& propertyTable() const;417 414 PropertyTable* takePropertyTableOrCloneIfPinned(VM&, Structure* owner); 418 415 PropertyTable* copyPropertyTable(VM&, Structure* owner); … … 461 458 462 459 void pin(); 463 void pinAndPreventTransitions();464 460 465 461 Structure* previous() const … … 517 513 ConcurrentJITLock m_lock; 518 514 519 static const unsigned s_maxForgivenDeletes = 5;520 unsigned m_forgivenDeletes;521 522 515 unsigned m_dictionaryKind : 2; 523 516 bool m_isPinnedPropertyTable : 1; -
trunk/Source/JavaScriptCore/runtime/StructureInlines.h
r167501 r167564 218 218 } 219 219 220 inline bool Structure::hasDeletedOffsets() const 221 { 222 // If we had deleted anything then we would have pinned our property table. 223 if (!propertyTable()) 224 return false; 225 return propertyTable()->hasDeletedOffset(); 226 } 227 228 inline WriteBarrier<PropertyTable>& Structure::propertyTable() 229 { 230 return const_cast<WriteBarrier<PropertyTable>&>(static_cast<const Structure*>(this)->propertyTable()); 231 } 232 233 inline const WriteBarrier<PropertyTable>& Structure::propertyTable() const 220 ALWAYS_INLINE WriteBarrier<PropertyTable>& Structure::propertyTable() 234 221 { 235 222 ASSERT(!globalObject() || !globalObject()->vm().heap.isCollecting()); … … 253 240 return true; 254 241 242 RELEASE_ASSERT(numberOfSlotsForLastOffset(m_offset, m_inlineCapacity) == propertyTable->propertyStorageSize()); 255 243 unsigned totalSize = propertyTable->propertyStorageSize(); 256 RELEASE_ASSERT(numberOfSlotsForLastOffset(m_offset, m_inlineCapacity) == totalSize);257 244 RELEASE_ASSERT((totalSize < inlineCapacity() ? 0 : totalSize - inlineCapacity()) == numberOfOutOfLineSlotsForLastOffset(m_offset)); 258 245
Note: See TracChangeset
for help on using the changeset viewer.