Title: [171606] branches/ftlopt/Source/_javascript_Core
Revision
171606
Author
[email protected]
Date
2014-07-25 12:04:50 -0700 (Fri, 25 Jul 2014)

Log Message

Reindent PropertyNameArray.h
https://bugs.webkit.org/show_bug.cgi?id=135067

Reviewed by Geoffrey Garen.

* runtime/PropertyNameArray.h:
(JSC::RefCountedIdentifierSet::contains):
(JSC::RefCountedIdentifierSet::size):
(JSC::RefCountedIdentifierSet::add):
(JSC::PropertyNameArrayData::create):
(JSC::PropertyNameArrayData::propertyNameVector):
(JSC::PropertyNameArrayData::PropertyNameArrayData):
(JSC::PropertyNameArray::PropertyNameArray):
(JSC::PropertyNameArray::vm):
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):
(JSC::PropertyNameArray::operator[]):
(JSC::PropertyNameArray::setData):
(JSC::PropertyNameArray::data):
(JSC::PropertyNameArray::releaseData):
(JSC::PropertyNameArray::identifierSet):
(JSC::PropertyNameArray::canAddKnownUniqueForStructure):
(JSC::PropertyNameArray::size):
(JSC::PropertyNameArray::begin):
(JSC::PropertyNameArray::end):
(JSC::PropertyNameArray::numCacheableSlots):
(JSC::PropertyNameArray::setNumCacheableSlotsForObject):
(JSC::PropertyNameArray::setBaseObject):
(JSC::PropertyNameArray::setPreviouslyEnumeratedLength):

Modified Paths

Diff

Modified: branches/ftlopt/Source/_javascript_Core/ChangeLog (171605 => 171606)


--- branches/ftlopt/Source/_javascript_Core/ChangeLog	2014-07-25 18:46:46 UTC (rev 171605)
+++ branches/ftlopt/Source/_javascript_Core/ChangeLog	2014-07-25 19:04:50 UTC (rev 171606)
@@ -1,3 +1,35 @@
+2014-07-25  Mark Hahnenberg  <[email protected]>
+
+        Reindent PropertyNameArray.h
+        https://bugs.webkit.org/show_bug.cgi?id=135067
+
+        Reviewed by Geoffrey Garen.
+
+        * runtime/PropertyNameArray.h:
+        (JSC::RefCountedIdentifierSet::contains):
+        (JSC::RefCountedIdentifierSet::size):
+        (JSC::RefCountedIdentifierSet::add):
+        (JSC::PropertyNameArrayData::create):
+        (JSC::PropertyNameArrayData::propertyNameVector):
+        (JSC::PropertyNameArrayData::PropertyNameArrayData):
+        (JSC::PropertyNameArray::PropertyNameArray):
+        (JSC::PropertyNameArray::vm):
+        (JSC::PropertyNameArray::add):
+        (JSC::PropertyNameArray::addKnownUnique):
+        (JSC::PropertyNameArray::operator[]):
+        (JSC::PropertyNameArray::setData):
+        (JSC::PropertyNameArray::data):
+        (JSC::PropertyNameArray::releaseData):
+        (JSC::PropertyNameArray::identifierSet):
+        (JSC::PropertyNameArray::canAddKnownUniqueForStructure):
+        (JSC::PropertyNameArray::size):
+        (JSC::PropertyNameArray::begin):
+        (JSC::PropertyNameArray::end):
+        (JSC::PropertyNameArray::numCacheableSlots):
+        (JSC::PropertyNameArray::setNumCacheableSlotsForObject):
+        (JSC::PropertyNameArray::setBaseObject):
+        (JSC::PropertyNameArray::setPreviouslyEnumeratedLength):
+
 2014-07-23  Mark Hahnenberg  <[email protected]>
 
         Refactor our current implementation of for-in

Modified: branches/ftlopt/Source/_javascript_Core/runtime/PropertyNameArray.h (171605 => 171606)


--- branches/ftlopt/Source/_javascript_Core/runtime/PropertyNameArray.h	2014-07-25 18:46:46 UTC (rev 171605)
+++ branches/ftlopt/Source/_javascript_Core/runtime/PropertyNameArray.h	2014-07-25 19:04:50 UTC (rev 171606)
@@ -27,123 +27,123 @@
 #include <wtf/Vector.h>
 
 namespace JSC {
-    
-    class JSPropertyNameEnumerator;
-    class Structure;
-    class StructureChain;
 
-    class RefCountedIdentifierSet : public RefCounted<RefCountedIdentifierSet> {
-    public:
-        typedef HashSet<StringImpl*, PtrHash<StringImpl*>> Set;
+class JSPropertyNameEnumerator;
+class Structure;
+class StructureChain;
 
-        bool contains(StringImpl* impl) const { return m_set.contains(impl); }
-        size_t size() const  { return m_set.size(); }
-        Set::AddResult add(StringImpl* impl) { return m_set.add(impl); }
+class RefCountedIdentifierSet : public RefCounted<RefCountedIdentifierSet> {
+public:
+    typedef HashSet<StringImpl*, PtrHash<StringImpl*>> Set;
 
-    private:
-        Set m_set;
-    };
+    bool contains(StringImpl* impl) const { return m_set.contains(impl); }
+    size_t size() const  { return m_set.size(); }
+    Set::AddResult add(StringImpl* impl) { return m_set.add(impl); }
 
-    // FIXME: Rename to PropertyNameArray.
-    class PropertyNameArrayData : public RefCounted<PropertyNameArrayData> {
-    public:
-        typedef Vector<Identifier, 20> PropertyNameVector;
+private:
+    Set m_set;
+};
 
-        static PassRefPtr<PropertyNameArrayData> create() { return adoptRef(new PropertyNameArrayData); }
+// FIXME: Rename to PropertyNameArray.
+class PropertyNameArrayData : public RefCounted<PropertyNameArrayData> {
+public:
+    typedef Vector<Identifier, 20> PropertyNameVector;
 
-        PropertyNameVector& propertyNameVector() { return m_propertyNameVector; }
+    static PassRefPtr<PropertyNameArrayData> create() { return adoptRef(new PropertyNameArrayData); }
 
-    private:
-        PropertyNameArrayData()
-        {
-        }
+    PropertyNameVector& propertyNameVector() { return m_propertyNameVector; }
 
-        PropertyNameVector m_propertyNameVector;
-    };
+private:
+    PropertyNameArrayData()
+    {
+    }
 
-    // FIXME: Rename to PropertyNameArrayBuilder.
-    class PropertyNameArray {
-    public:
-        PropertyNameArray(VM* vm)
-            : m_data(PropertyNameArrayData::create())
-            , m_set(adoptRef(new RefCountedIdentifierSet))
-            , m_vm(vm)
-            , m_numCacheableSlots(0)
-            , m_baseObject(0)
-            , m_previouslyEnumeratedLength(0)
-        {
-        }
+    PropertyNameVector m_propertyNameVector;
+};
 
-        PropertyNameArray(ExecState* exec)
-            : m_data(PropertyNameArrayData::create())
-            , m_set(adoptRef(new RefCountedIdentifierSet))
-            , m_vm(&exec->vm())
-            , m_numCacheableSlots(0)
-            , m_baseObject(0)
-            , m_previouslyEnumeratedLength(0)
-        {
-        }
+// FIXME: Rename to PropertyNameArrayBuilder.
+class PropertyNameArray {
+public:
+    PropertyNameArray(VM* vm)
+        : m_data(PropertyNameArrayData::create())
+        , m_set(adoptRef(new RefCountedIdentifierSet))
+        , m_vm(vm)
+        , m_numCacheableSlots(0)
+        , m_baseObject(0)
+        , m_previouslyEnumeratedLength(0)
+    {
+    }
 
-        VM* vm() { return m_vm; }
+    PropertyNameArray(ExecState* exec)
+        : m_data(PropertyNameArrayData::create())
+        , m_set(adoptRef(new RefCountedIdentifierSet))
+        , m_vm(&exec->vm())
+        , m_numCacheableSlots(0)
+        , m_baseObject(0)
+        , m_previouslyEnumeratedLength(0)
+    {
+    }
 
-        void add(uint32_t index)
-        {
-            if (index < m_previouslyEnumeratedLength)
-                return;
-            add(Identifier::from(m_vm, index));
-        }
+    VM* vm() { return m_vm; }
 
-        void add(const Identifier& identifier) { add(identifier.impl()); }
-        JS_EXPORT_PRIVATE void add(StringImpl*);
-        void addKnownUnique(StringImpl* identifier)
-        {
-            m_set->add(identifier);
-            m_data->propertyNameVector().append(Identifier(m_vm, identifier));
-        }
+    void add(uint32_t index)
+    {
+        if (index < m_previouslyEnumeratedLength)
+            return;
+        add(Identifier::from(m_vm, index));
+    }
 
-        Identifier& operator[](unsigned i) { return m_data->propertyNameVector()[i]; }
-        const Identifier& operator[](unsigned i) const { return m_data->propertyNameVector()[i]; }
+    void add(const Identifier& identifier) { add(identifier.impl()); }
+    JS_EXPORT_PRIVATE void add(StringImpl*);
+    void addKnownUnique(StringImpl* identifier)
+    {
+        m_set->add(identifier);
+        m_data->propertyNameVector().append(Identifier(m_vm, identifier));
+    }
 
-        void setData(PassRefPtr<PropertyNameArrayData> data) { m_data = data; }
-        PropertyNameArrayData* data() { return m_data.get(); }
-        PassRefPtr<PropertyNameArrayData> releaseData() { return m_data.release(); }
+    Identifier& operator[](unsigned i) { return m_data->propertyNameVector()[i]; }
+    const Identifier& operator[](unsigned i) const { return m_data->propertyNameVector()[i]; }
 
-        RefCountedIdentifierSet* identifierSet() const { return m_set.get(); }
+    void setData(PassRefPtr<PropertyNameArrayData> data) { m_data = data; }
+    PropertyNameArrayData* data() { return m_data.get(); }
+    PassRefPtr<PropertyNameArrayData> releaseData() { return m_data.release(); }
 
-        // FIXME: Remove these functions.
-        bool canAddKnownUniqueForStructure() const { return !m_set->size() && (!m_alternateSet || !m_alternateSet->size()); }
-        typedef PropertyNameArrayData::PropertyNameVector::const_iterator const_iterator;
-        size_t size() const { return m_data->propertyNameVector().size(); }
-        const_iterator begin() const { return m_data->propertyNameVector().begin(); }
-        const_iterator end() const { return m_data->propertyNameVector().end(); }
+    RefCountedIdentifierSet* identifierSet() const { return m_set.get(); }
 
-        size_t numCacheableSlots() const { return m_numCacheableSlots; }
-        void setNumCacheableSlotsForObject(JSObject* object, size_t numCacheableSlots)
-        {
-            if (object != m_baseObject)
-                return;
-            m_numCacheableSlots = numCacheableSlots;
-        }
-        void setBaseObject(JSObject* object)
-        {
-            if (m_baseObject)
-                return;
-            m_baseObject = object;
-        }
+    // FIXME: Remove these functions.
+    bool canAddKnownUniqueForStructure() const { return !m_set->size() && (!m_alternateSet || !m_alternateSet->size()); }
+    typedef PropertyNameArrayData::PropertyNameVector::const_iterator const_iterator;
+    size_t size() const { return m_data->propertyNameVector().size(); }
+    const_iterator begin() const { return m_data->propertyNameVector().begin(); }
+    const_iterator end() const { return m_data->propertyNameVector().end(); }
 
-        void setPreviouslyEnumeratedLength(uint32_t length) { m_previouslyEnumeratedLength = length; }
-        void setPreviouslyEnumeratedProperties(const JSPropertyNameEnumerator*);
+    size_t numCacheableSlots() const { return m_numCacheableSlots; }
+    void setNumCacheableSlotsForObject(JSObject* object, size_t numCacheableSlots)
+    {
+        if (object != m_baseObject)
+            return;
+        m_numCacheableSlots = numCacheableSlots;
+    }
+    void setBaseObject(JSObject* object)
+    {
+        if (m_baseObject)
+            return;
+        m_baseObject = object;
+    }
 
-    private:
-        RefPtr<PropertyNameArrayData> m_data;
-        RefPtr<RefCountedIdentifierSet> m_set;
-        RefPtr<RefCountedIdentifierSet> m_alternateSet;
-        VM* m_vm;
-        size_t m_numCacheableSlots;
-        JSObject* m_baseObject;
-        uint32_t m_previouslyEnumeratedLength;
-    };
+    void setPreviouslyEnumeratedLength(uint32_t length) { m_previouslyEnumeratedLength = length; }
+    void setPreviouslyEnumeratedProperties(const JSPropertyNameEnumerator*);
 
+private:
+    RefPtr<PropertyNameArrayData> m_data;
+    RefPtr<RefCountedIdentifierSet> m_set;
+    RefPtr<RefCountedIdentifierSet> m_alternateSet;
+    VM* m_vm;
+    size_t m_numCacheableSlots;
+    JSObject* m_baseObject;
+    uint32_t m_previouslyEnumeratedLength;
+};
+
 } // namespace JSC
 
 #endif // PropertyNameArray_h
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to