Ignore:
Timestamp:
Apr 2, 2010, 1:15:53 PM (15 years ago)
Author:
[email protected]
Message:

Inlined toThisString and toThisJSString to avoid virtual function call overhead
https://bugs.webkit.org/show_bug.cgi?id=37039

Reviewed by Oliver Hunt.

Maybe a 1% speedup on iBench JS.

  • runtime/JSCell.cpp:
  • runtime/JSCell.h:
  • runtime/JSNumberCell.cpp:
  • runtime/JSNumberCell.h:
  • runtime/JSString.cpp:
  • runtime/JSString.h:
  • runtime/JSValue.h:
  • runtime/JSZombie.h:

(JSC::JSZombie::toThisObject): Nixed the old virtual-type implementation.

  • runtime/JSObject.h:

(JSC::JSValue::toThisString):
(JSC::JSValue::toThisJSString): Added the inlined implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSCell.cpp

    r52731 r57019  
    164164}
    165165
    166 UString JSCell::toThisString(ExecState* exec) const
    167 {
    168     return toThisObject(exec)->toString(exec);
    169 }
    170 
    171 JSString* JSCell::toThisJSString(ExecState* exec)
    172 {
    173     return jsString(exec, toThisString(exec));
    174 }
    175 
    176166const ClassInfo* JSCell::classInfo() const
    177167{
Note: See TracChangeset for help on using the changeset viewer.