Changeset 204093 in webkit
- Timestamp:
- Aug 3, 2016, 11:50:57 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/freeze-setter.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/Structure.cpp (modified) (3 diffs)
-
Source/JavaScriptCore/runtime/StructureTransitionTable.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r204078 r204093 1 2016-08-03 Filip Pizlo <fpizlo@apple.com> 2 3 REGRESSION(r203368): broke some test262 tests 4 https://bugs.webkit.org/show_bug.cgi?id=160479 5 6 Reviewed by Mark Lam. 7 8 Added a stress test for this case, since we don't always run test262. 9 10 * stress/freeze-setter.js: Added. 11 (let.o.set foo): 12 1 13 2016-08-03 Saam Barati <sbarati@apple.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r204084 r204093 1 2016-08-03 Filip Pizlo <fpizlo@apple.com> 2 3 REGRESSION(r203368): broke some test262 tests 4 https://bugs.webkit.org/show_bug.cgi?id=160479 5 6 Reviewed by Mark Lam. 7 8 The optimization in r203368 overlooked a subtle detail: freezing should not set ReadOnly on 9 Accessor properties. 10 11 * runtime/Structure.cpp: 12 (JSC::Structure::nonPropertyTransition): 13 * runtime/StructureTransitionTable.h: 14 (JSC::setsDontDeleteOnAllProperties): 15 (JSC::setsReadOnlyOnNonAccessorProperties): 16 (JSC::setsReadOnlyOnAllProperties): Deleted. 17 1 18 2016-08-03 Csaba Osztrogonác <ossy@webkit.org> 2 19 -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r203793 r204093 653 653 transition->setDidPreventExtensions(true); 654 654 655 unsigned additionalPropertyAttributes = 0; 656 if (setsDontDeleteOnAllProperties(transitionKind)) 657 additionalPropertyAttributes |= DontDelete; 658 if (setsReadOnlyOnAllProperties(transitionKind)) 659 additionalPropertyAttributes |= ReadOnly; 660 if (additionalPropertyAttributes) { 655 if (setsDontDeleteOnAllProperties(transitionKind) 656 || setsReadOnlyOnNonAccessorProperties(transitionKind)) { 661 657 // We pin the property table on transitions that do wholesale editing of the property 662 658 // table, since our logic for walking the property transition chain to rematerialize the … … 669 665 670 666 if (transition->propertyTable()) { 671 for (auto& entry : *transition->propertyTable().get()) 672 entry.attributes |= additionalPropertyAttributes; 667 for (auto& entry : *transition->propertyTable().get()) { 668 if (setsDontDeleteOnAllProperties(transitionKind)) 669 entry.attributes |= DontDelete; 670 if (setsReadOnlyOnNonAccessorProperties(transitionKind) && !(entry.attributes & Accessor)) 671 entry.attributes |= ReadOnly; 672 } 673 673 } 674 674 } else { … … 678 678 } 679 679 680 if (setsReadOnlyOn AllProperties(transitionKind)680 if (setsReadOnlyOnNonAccessorProperties(transitionKind) 681 681 && transition->propertyTable() 682 682 && !transition->propertyTable()->isEmpty()) -
trunk/Source/JavaScriptCore/runtime/StructureTransitionTable.h
r203368 r204093 131 131 } 132 132 133 inline bool setsReadOnlyOn AllProperties(NonPropertyTransition transition)133 inline bool setsReadOnlyOnNonAccessorProperties(NonPropertyTransition transition) 134 134 { 135 135 switch (transition) {
Note:
See TracChangeset
for help on using the changeset viewer.