2008-09-01  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Eagerly allocate the Math object's numeric constants. This avoids
        constantly reallocating them in loops, and also ensures that the Math
        object will not use the single property optimization, which makes
        properties ineligible for caching.

        SunSpider reports a small speedup, in combination with inline caching.

        * kjs/MathObject.cpp:
        (KJS::MathObject::MathObject):
        (KJS::MathObject::getOwnPropertySlot):
        * kjs/MathObject.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3 files changed