Ignore:
Timestamp:
Sep 15, 2008, 12:27:14 AM (17 years ago)
Author:
[email protected]
Message:

2008-09-15 Sam Weinig <[email protected]>

Reviewed by Maciej Stachowiak.

Patch for https://bugs.webkit.org/show_bug.cgi?id=20849
Cache property names for getEnumerablePropertyNames in the StructureID.

~0.5% speedup on Sunspider overall (9.7% speedup on string-fasta). ~1% speedup
on the v8 test suite.

  • kjs/JSObject.cpp: (JSC::JSObject::getPropertyNames):
  • kjs/PropertyMap.cpp: (JSC::PropertyMap::getEnumerablePropertyNames):
  • kjs/PropertyMap.h:
  • kjs/StructureID.cpp: (JSC::StructureID::StructureID): (JSC::StructureID::getEnumerablePropertyNames):
  • kjs/StructureID.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/StructureID.h

    r36401 r36429  
    4040
    4141    class JSValue;
     42    class PropertyNameArray;
    4243    class StructureIDChain;
    4344
     
    108109        PropertyMap& propertyMap() { return m_propertyMap; }
    109110
     111        void getEnumerablePropertyNames(PropertyNameArray&) const;
     112
    110113        static void transitionTo(StructureID* oldStructureID, StructureID* newStructureID, JSObject* slotBase);
    111114
     
    131134        TransitionTable m_transitionTable;
    132135
     136        mutable Vector<UString::Rep*> m_cachedPropertyNameArray;
     137
    133138        PropertyMap m_propertyMap;
    134139    };
Note: See TracChangeset for help on using the changeset viewer.