Ignore:
Timestamp:
Sep 14, 2008, 1:18:49 AM (17 years ago)
Author:
[email protected]
Message:

Bug 20821: Cache property transitions to speed up object initialization
https://bugs.webkit.org/show_bug.cgi?id=20821

Reviewed by Cameron Zwarich.

Implement a transition cache to improve the performance of new properties
being added to objects. This is extremely beneficial in constructors and
shows up as a 34% improvement on access-binary-trees in SunSpider (0.8%
overall)

File:
1 edited

Legend:

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

    r36368 r36401  
    7373    class StructureID : public RefCounted<StructureID> {
    7474    public:
     75        friend class CTI;
    7576        static PassRefPtr<StructureID> create(JSValue* prototype, JSType type = ObjectType)
    7677        {
     
    9899        JSValue* storedPrototype() const { return m_prototype; }
    99100        JSValue* prototypeForLookup(ExecState*);
    100        
     101
     102        StructureID* previousID() const { return m_previous.get(); }
     103
    101104        void setCachedPrototypeChain(PassRefPtr<StructureIDChain> cachedPrototypeChain) { m_cachedPrototypeChain = cachedPrototypeChain; }
    102105        StructureIDChain* cachedPrototypeChain() const { return m_cachedPrototypeChain.get(); }
     
    104107        const PropertyMap& propertyMap() const { return m_propertyMap; }
    105108        PropertyMap& propertyMap() { return m_propertyMap; }
     109
     110        static void transitionTo(StructureID* oldStructureID, StructureID* newStructureID, JSObject* slotBase);
    106111
    107112    private:
Note: See TracChangeset for help on using the changeset viewer.