Ignore:
Timestamp:
Oct 7, 2008, 4:49:59 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-07 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

Move hasGetterSetterProperties flag from PropertyMap to StructureID.

  • kjs/JSObject.cpp: (JSC::JSObject::put): (JSC::JSObject::defineGetter): (JSC::JSObject::defineSetter):
  • kjs/JSObject.h: (JSC::JSObject::hasGetterSetterProperties): (JSC::JSObject::getOwnPropertySlotForWrite): (JSC::JSObject::getOwnPropertySlot):
  • kjs/PropertyMap.h:
  • kjs/StructureID.cpp: (JSC::StructureID::StructureID): (JSC::StructureID::addPropertyTransition): (JSC::StructureID::toDictionaryTransition): (JSC::StructureID::changePrototypeTransition): (JSC::StructureID::getterSetterTransition):
  • kjs/StructureID.h: (JSC::StructureID::hasGetterSetterProperties): (JSC::StructureID::setHasGetterSetterProperties):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSObject.cpp

    r37388 r37400  
    126126    // Check if there are any setters or getters in the prototype chain
    127127    JSValue* prototype;
    128     for (JSObject* obj = this; !obj->structureID()->propertyMap().hasGetterSetterProperties(); obj = static_cast<JSObject*>(prototype)) {
     128    for (JSObject* obj = this; !obj->structureID()->hasGetterSetterProperties(); obj = static_cast<JSObject*>(prototype)) {
    129129        prototype = obj->prototype();
    130130        if (prototype->isNull()) {
     
    293293    JSValue* object = getDirect(propertyName);
    294294    if (object && object->isGetterSetter()) {
    295         ASSERT(m_structureID->propertyMap().hasGetterSetterProperties());
     295        ASSERT(m_structureID->hasGetterSetterProperties());
    296296        GetterSetter* getterSetter = static_cast<GetterSetter*>(object);
    297297        getterSetter->setGetter(getterFunction);
     
    313313    }
    314314
    315     m_structureID->propertyMap().setHasGetterSetterProperties(true);
     315    m_structureID->setHasGetterSetterProperties(true);
    316316    getterSetter->setGetter(getterFunction);
    317317}
     
    321321    JSValue* object = getDirect(propertyName);
    322322    if (object && object->isGetterSetter()) {
    323         ASSERT(m_structureID->propertyMap().hasGetterSetterProperties());
     323        ASSERT(m_structureID->hasGetterSetterProperties());
    324324        GetterSetter* getterSetter = static_cast<GetterSetter*>(object);
    325325        getterSetter->setSetter(setterFunction);
     
    341341    }
    342342
    343     m_structureID->propertyMap().setHasGetterSetterProperties(true);
     343    m_structureID->setHasGetterSetterProperties(true);
    344344    getterSetter->setSetter(setterFunction);
    345345}
Note: See TracChangeset for help on using the changeset viewer.