Ignore:
Timestamp:
Oct 5, 2008, 5:58:42 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Maciej Stachowiak.

Avoid an extra lookup when transitioning to an existing StructureID
by caching the offset of property that caused the transition.

1% win on V8 suite. Wash on SunSpider.

  • kjs/PropertyMap.cpp: (JSC::PropertyMap::put):
  • kjs/PropertyMap.h:
  • kjs/StructureID.cpp: (JSC::StructureID::StructureID): (JSC::StructureID::addPropertyTransition):
  • kjs/StructureID.h: (JSC::StructureID::setCachedTransistionOffset): (JSC::StructureID::cachedTransistionOffset):
File:
1 edited

Legend:

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

    r36789 r37321  
    116116        PropertyMap& propertyMap() { return m_propertyMap; }
    117117
     118        void setCachedTransistionOffset(size_t offset) { m_cachedTransistionOffset = offset; }
     119        size_t cachedTransistionOffset() const { return m_cachedTransistionOffset; }
     120
    118121        void getEnumerablePropertyNames(ExecState*, PropertyNameArray&, JSObject*);
    119122        void clearEnumerationCache();
     
    146149
    147150        PropertyMap m_propertyMap;
     151
     152        size_t m_cachedTransistionOffset;
    148153    };
    149154
Note: See TracChangeset for help on using the changeset viewer.