Skip to content
  • mhahnenberg@apple.com's avatar
    De-virtualize JSCell::toObject · b6e2ac66
    mhahnenberg@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=68937
    
    Reviewed by Darin Adler.
    
    * JavaScriptCore.exp:
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
    
    De-virtualized JSCell::toObject and changed its implementation to manually check the
    cases for JSString and JSObject rather than leaving it up to the virtual method call.
    * runtime/JSCell.cpp:
    (JSC::JSCell::toObject):
    * runtime/JSCell.h:
    
    Removed JSNotAnObject::toObject because the case for JSObject works for it.
    Also removed JSObject::toObject because it was essentially the identity function,
    which is not necessary since toObject is no longer virtual.
    * runtime/JSNotAnObject.cpp:
    * runtime/JSNotAnObject.h:
    * runtime/JSObject.cpp:
    * runtime/JSObject.h:
    
    De-virtualized JSObject::toObject and JSString::toObject.
    * runtime/JSString.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b6e2ac66