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/PutPropertySlot.h

    r36263 r36401  
    4141            : m_type(Invalid)
    4242            , m_base(0)
     43            , m_wasTransition(false)
    4344        {
    4445        }
     
    6667            return m_offset;
    6768        }
    68 
     69       
     70        bool wasTransition() const { return m_wasTransition; }
     71        void setWasTransition(bool wasTransition) { m_wasTransition = wasTransition; }
    6972    private:
    7073        Type m_type;
    7174        JSObject* m_base;
     75        bool m_wasTransition;
    7276        size_t m_offset;
    7377    };
Note: See TracChangeset for help on using the changeset viewer.