De-virtualize JSCell::toThisObject
https://bugs.webkit.org/show_bug.cgi?id=70958
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.
- API/JSContextRef.cpp:
- JavaScriptCore.exp:
- JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
- runtime/ClassInfo.h:
- runtime/JSActivation.cpp:
(JSC::JSActivation::toThisObject):
- runtime/JSActivation.h:
- runtime/JSCell.cpp:
(JSC::JSCell::toThisObject):
- runtime/JSCell.h:
- runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::toThisObject):
(JSC::JSValue::toThisObject):
- runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::toThisObject):
- runtime/JSStaticScopeObject.h:
- runtime/JSString.cpp:
(JSC::JSString::toThisObject):
- runtime/JSString.h:
- runtime/StrictEvalActivation.cpp:
(JSC::StrictEvalActivation::toThisObject):
- runtime/StrictEvalActivation.h:
Source/WebCore:
No new tests.
Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.
- bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::toThisObject):
- bindings/js/JSDOMWindowBase.h:
- bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
(_NPN_Invoke):
- bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeConnectionMethod::call):
Source/WebKit/mac:
Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.
- Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::invoke):
(WebKit::NetscapePluginInstanceProxy::invokeDefault):
Source/WebKit2:
Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.
- WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::invoke):