Ignore:
Timestamp:
Oct 16, 2009, 7:31:42 PM (16 years ago)
Author:
[email protected]
Message:

Roll out r49717 as it broke the build.

File:
1 edited

Legend:

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

    r49717 r49726  
    2525#include "Identifier.h"
    2626#include <wtf/HashSet.h>
    27 #include <wtf/OwnArrayPtr.h>
    2827#include <wtf/Vector.h>
    2928
     
    3332    class StructureChain;
    3433
    35     // FIXME: Rename to PropertyNameArray.
    3634    class PropertyNameArrayData : public RefCounted<PropertyNameArrayData> {
    3735    public:
    3836        typedef Vector<Identifier, 20> PropertyNameVector;
     37        typedef PropertyNameVector::const_iterator const_iterator;
    3938
    4039        static PassRefPtr<PropertyNameArrayData> create() { return adoptRef(new PropertyNameArrayData); }
    4140
     41        const_iterator begin() const { return m_propertyNameVector.begin(); }
     42        const_iterator end() const { return m_propertyNameVector.end(); }
     43
    4244        PropertyNameVector& propertyNameVector() { return m_propertyNameVector; }
     45
     46        void setCachedStructure(Structure* structure) { m_cachedStructure = structure; }
     47        Structure* cachedStructure() const { return m_cachedStructure; }
     48
     49        void setCachedPrototypeChain(NonNullPassRefPtr<StructureChain> cachedPrototypeChain) { m_cachedPrototypeChain = cachedPrototypeChain; }
     50        StructureChain* cachedPrototypeChain() { return m_cachedPrototypeChain.get(); }
    4351
    4452    private:
    4553        PropertyNameArrayData()
     54            : m_cachedStructure(0)
    4655        {
    4756        }
    4857
    4958        PropertyNameVector m_propertyNameVector;
     59        Structure* m_cachedStructure;
     60        RefPtr<StructureChain> m_cachedPrototypeChain;
    5061    };
    5162
    52     // FIXME: Rename to PropertyNameArrayBuilder.
    5363    class PropertyNameArray {
    5464    public:
     65        typedef PropertyNameArrayData::const_iterator const_iterator;
     66
    5567        PropertyNameArray(JSGlobalData* globalData)
    5668            : m_data(PropertyNameArrayData::create())
     
    7385        void addKnownUnique(UString::Rep* identifier) { m_data->propertyNameVector().append(Identifier(m_globalData, identifier)); }
    7486
     87        size_t size() const { return m_data->propertyNameVector().size(); }
     88
    7589        Identifier& operator[](unsigned i) { return m_data->propertyNameVector()[i]; }
    7690        const Identifier& operator[](unsigned i) const { return m_data->propertyNameVector()[i]; }
    7791
     92        const_iterator begin() const { return m_data->begin(); }
     93        const_iterator end() const { return m_data->end(); }
     94
    7895        void setData(PassRefPtr<PropertyNameArrayData> data) { m_data = data; }
    7996        PropertyNameArrayData* data() { return m_data.get(); }
     97
    8098        PassRefPtr<PropertyNameArrayData> releaseData() { return m_data.release(); }
    8199
    82         // FIXME: Remove these functions.
    83         typedef PropertyNameArrayData::PropertyNameVector::const_iterator const_iterator;
    84         size_t size() const { return m_data->propertyNameVector().size(); }
    85         const_iterator begin() const { return m_data->propertyNameVector().begin(); }
    86         const_iterator end() const { return m_data->propertyNameVector().end(); }
     100        void setShouldCache(bool shouldCache) { m_shouldCache = shouldCache; }
     101        bool shouldCache() const { return m_shouldCache; }
    87102
    88103    private:
Note: See TracChangeset for help on using the changeset viewer.