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

    r54050 r57019  
    6363        virtual JSObject* toObject(ExecState*) const;
    6464
    65         virtual UString toThisString(ExecState*) const;
    6665        virtual JSObject* toThisObject(ExecState*) const;
    6766        virtual JSValue getJSNumber();
Note: See TracChangeset for help on using the changeset viewer.