Ignore:
Timestamp:
Sep 12, 2008, 9:57:35 PM (17 years ago)
Author:
[email protected]
Message:

2008-09-12 Cameron Zwarich <[email protected]>

Reviewed by Maciej Stachowiak.

Bug 20819: JSValue::isObject() is slow
<https://bugs.webkit.org/show_bug.cgi?id=20819>

Optimize JSCell::isObject() and JSCell::isString() by making them
non-virtual calls that rely on the StructureID type information.

This is a 0.7% speedup on SunSpider and a 1.0% speedup on the V8
benchmark suite.

  • JavaScriptCore.exp:
  • kjs/JSCell.cpp:
  • kjs/JSCell.h: (JSC::JSCell::isObject): (JSC::JSCell::isString):
  • kjs/JSObject.cpp:
  • kjs/JSObject.h:
  • kjs/JSString.cpp:
  • kjs/JSString.h: (JSC::JSString::JSString):
  • kjs/StructureID.h: (JSC::StructureID::type):
File:
1 edited

Legend:

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

    r36325 r36368  
    9494        bool isDictionary() const { return m_isDictionary; }
    9595
     96        JSType type() const { return m_type; }
     97
    9698        JSValue* storedPrototype() const { return m_prototype; }
    9799        JSValue* prototypeForLookup(ExecState*);
Note: See TracChangeset for help on using the changeset viewer.