Ignore:
Timestamp:
Oct 29, 2008, 7:44:46 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Oliver Hunt.

Remove direct use of PropertyMap.

  • JavaScriptCore.exp:
  • runtime/JSObject.cpp: (JSC::JSObject::mark): (JSC::JSObject::put): (JSC::JSObject::deleteProperty): (JSC::JSObject::getPropertyAttributes): (JSC::JSObject::removeDirect):
  • runtime/JSObject.h: (JSC::JSObject::getDirect): (JSC::JSObject::getDirectLocation): (JSC::JSObject::hasCustomProperties): (JSC::JSObject::JSObject): (JSC::JSObject::putDirect):
  • runtime/PropertyMap.cpp: (JSC::PropertyMap::get):
  • runtime/PropertyMap.h: (JSC::PropertyMap::isEmpty): (JSC::PropertyMap::get):
  • runtime/StructureID.cpp: (JSC::StructureID::dumpStatistics):
  • runtime/StructureID.h: (JSC::StructureID::propertyStorageSize): (JSC::StructureID::get): (JSC::StructureID::put): (JSC::StructureID::remove): (JSC::StructureID::isEmpty):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSObject.h

    r37938 r37989  
    2929#include "ExecState.h"
    3030#include "JSNumberCell.h"
    31 #include "PropertyMap.h"
    3231#include "PropertySlot.h"
    3332#include "PutPropertySlot.h"
     
    5352    };
    5453
     54    typedef JSValue** PropertyStorage;
     55
    5556    class JSObject : public JSCell {
    5657        friend class BatchedTransitionOptimizer;
     
    124125        JSValue* getDirect(const Identifier& propertyName) const
    125126        {
    126             size_t offset = m_structureID->propertyMap().get(propertyName);
     127            size_t offset = m_structureID->get(propertyName);
    127128            return offset != WTF::notFound ? m_propertyStorage[offset] : noValue();
    128129        }
     
    130131        JSValue** getDirectLocation(const Identifier& propertyName)
    131132        {
    132             size_t offset = m_structureID->propertyMap().get(propertyName);
     133            size_t offset = m_structureID->get(propertyName);
    133134            return offset != WTF::notFound ? locationForOffset(offset) : 0;
    134135        }
     
    136137        JSValue** getDirectLocation(const Identifier& propertyName, unsigned& attributes)
    137138        {
    138             size_t offset = m_structureID->propertyMap().get(propertyName, attributes);
     139            size_t offset = m_structureID->get(propertyName, attributes);
    139140            return offset != WTF::notFound ? locationForOffset(offset) : 0;
    140141        }
     
    153154
    154155        void removeDirect(const Identifier& propertyName);
    155         bool hasCustomProperties() { return !m_structureID->propertyMap().isEmpty(); }
     156        bool hasCustomProperties() { return !m_structureID->isEmpty(); }
    156157        bool hasGetterSetterProperties() { return m_structureID->hasGetterSetterProperties(); }
    157158
     
    221222    ASSERT(m_structureID);
    222223    ASSERT(m_structureID->propertyStorageCapacity() == inlineStorageCapacity);
    223     ASSERT(m_structureID->propertyMap().isEmpty());
     224    ASSERT(m_structureID->isEmpty());
    224225    ASSERT(prototype()->isNull() || Heap::heap(this) == Heap::heap(prototype()));
    225226}
     
    389390    if (m_structureID->isDictionary()) {
    390391        unsigned currentAttributes;
    391         size_t offset = m_structureID->propertyMap().get(propertyName, currentAttributes);
     392        size_t offset = m_structureID->get(propertyName, currentAttributes);
    392393        if (offset != WTF::notFound) {
    393394            if (checkReadOnly && currentAttributes & ReadOnly)
     
    399400
    400401        size_t currentCapacity = m_structureID->propertyStorageCapacity();
    401         offset = m_structureID->propertyMap().put(propertyName, attributes);
    402         if (m_structureID->propertyMap().storageSize() > m_structureID->propertyStorageCapacity()) {
     402        offset = m_structureID->put(propertyName, attributes);
     403        if (m_structureID->propertyStorageSize() > m_structureID->propertyStorageCapacity()) {
    403404            m_structureID->growPropertyStorageCapacity();
    404405            allocatePropertyStorage(currentCapacity, m_structureID->propertyStorageCapacity());
     
    412413
    413414    unsigned currentAttributes;
    414     size_t offset = m_structureID->propertyMap().get(propertyName, currentAttributes);
     415    size_t offset = m_structureID->get(propertyName, currentAttributes);
    415416    if (offset != WTF::notFound) {
    416417        if (checkReadOnly && currentAttributes & ReadOnly)
Note: See TracChangeset for help on using the changeset viewer.