⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 204093 in webkit


Ignore:
Timestamp:
Aug 3, 2016, 11:50:57 AM (10 years ago)
Author:
fpizlo@apple.com
Message:

REGRESSION(r203368): broke some test262 tests
​https://bugs.webkit.org/show_bug.cgi?id=160479

Reviewed by Mark Lam.

JSTests:

Added a stress test for this case, since we don't always run test262.

  • stress/freeze-setter.js: Added.

(let.o.set foo):

Source/JavaScriptCore:

The optimization in r203368 overlooked a subtle detail: freezing should not set ReadOnly on
Accessor properties.

  • runtime/Structure.cpp:

(JSC::Structure::nonPropertyTransition):

  • runtime/StructureTransitionTable.h:

(JSC::setsDontDeleteOnAllProperties):
(JSC::setsReadOnlyOnNonAccessorProperties):
(JSC::setsReadOnlyOnAllProperties): Deleted.

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r204078 r204093  
     12016-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
    1132016-08-03  Saam Barati  <sbarati@apple.com>
    214
  • trunk/Source/JavaScriptCore/ChangeLog

    r204084 r204093  
     12016-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
    1182016-08-03  Csaba Osztrogonác  <ossy@webkit.org>
    219
  • trunk/Source/JavaScriptCore/runtime/Structure.cpp

    r203793 r204093  
    653653        transition->setDidPreventExtensions(true);
    654654   
    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)) {
    661657        // We pin the property table on transitions that do wholesale editing of the property
    662658        // table, since our logic for walking the property transition chain to rematerialize the
    … …  
    669665       
    670666        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            }
    673673        }
    674674    } else {
    … …  
    678678    }
    679679   
    680     if (setsReadOnlyOnAllProperties(transitionKind)
     680    if (setsReadOnlyOnNonAccessorProperties(transitionKind)
    681681        && transition->propertyTable()
    682682        && !transition->propertyTable()->isEmpty())
  • trunk/Source/JavaScriptCore/runtime/StructureTransitionTable.h

    r203368 r204093  
    131131}
    132132
    133 inline bool setsReadOnlyOnAllProperties(NonPropertyTransition transition)
     133inline bool setsReadOnlyOnNonAccessorProperties(NonPropertyTransition transition)
    134134{
    135135    switch (transition) {
Note: See TracChangeset for help on using the changeset viewer.