Source/JavaScriptCore: Add static version of JSCell::getCallData
https://bugs.webkit.org/show_bug.cgi?id=68741
Reviewed by Darin Adler.
In this patch we just extract the bodies of the virtual getCallData methods
throughout the JSCell inheritance hierarchy out into static methods, which are
now called from the virtual methods. This is an intermediate step in trying to
move the virtual-ness of getCallData into our own method table stored in
ClassInfo. We need to convert the methods to static methods because static methods
can be represented as function pointers rather than pointers to member functions, and
function pointers are smaller and faster to call than pointers to member functions.
- API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::getCallDataVirtual):
(JSC::JSCallbackFunction::getCallData):
- API/JSCallbackFunction.h:
- API/JSCallbackObject.h:
- API/JSCallbackObjectFunctions.h:
(JSC::::getCallDataVirtual):
(JSC::::getCallData):
(JSObjectIsFunction):
(JSObjectCallAsFunction):
(JSC::Interpreter::privateExecute):
(JSC::DEFINE_STUB_FUNCTION):
- runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getCallDataVirtual):
(JSC::ArrayConstructor::getCallData):
- runtime/ArrayConstructor.h:
- runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::getCallDataVirtual):
(JSC::BooleanConstructor::getCallData):
- runtime/BooleanConstructor.h:
- runtime/DateConstructor.cpp:
(JSC::DateConstructor::getCallDataVirtual):
(JSC::DateConstructor::getCallData):
- runtime/DateConstructor.h:
- runtime/Error.cpp:
(JSC::StrictModeTypeErrorFunction::getCallDataVirtual):
(JSC::StrictModeTypeErrorFunction::getCallData):
- runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::getCallDataVirtual):
(JSC::ErrorConstructor::getCallData):
- runtime/ErrorConstructor.h:
- runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::getCallDataVirtual):
(JSC::FunctionConstructor::getCallData):
- runtime/FunctionConstructor.h:
- runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::getCallDataVirtual):
(JSC::FunctionPrototype::getCallData):
- runtime/FunctionPrototype.h:
- runtime/InternalFunction.h:
- runtime/JSCell.cpp:
(JSC::JSCell::getCallDataVirtual):
(JSC::JSCell::getCallData):
(JSC::getCallData):
(JSC::JSFunction::getCallDataVirtual):
(JSC::JSFunction::getCallData):
- runtime/JSFunction.h:
- runtime/JSONObject.cpp:
(JSC::Stringifier::Stringifier):
(JSC::Stringifier::toJSON):
(JSC::Stringifier::appendStringifiedValue):
(JSC::JSObject::put):
- runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::getCallDataVirtual):
(JSC::NativeErrorConstructor::getCallData):
- runtime/NativeErrorConstructor.h:
- runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getCallDataVirtual):
(JSC::NumberConstructor::getCallData):
- runtime/NumberConstructor.h:
- runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getCallDataVirtual):
(JSC::ObjectConstructor::getCallData):
- runtime/ObjectConstructor.h:
- runtime/Operations.cpp:
(JSC::jsTypeStringForValue):
(JSC::jsIsObjectType):
(JSC::jsIsFunctionType):
- runtime/PropertySlot.cpp:
(JSC::PropertySlot::functionGetter):
- runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getCallDataVirtual):
(JSC::RegExpConstructor::getCallData):
- runtime/RegExpConstructor.h:
- runtime/StringConstructor.cpp:
(JSC::StringConstructor::getCallDataVirtual):
(JSC::StringConstructor::getCallData):
- runtime/StringConstructor.h:
Source/JavaScriptGlue: Add static version of JSCell::getCallData
https://bugs.webkit.org/show_bug.cgi?id=68741
Reviewed by Darin Adler.
In this patch we just extract the bodies of the virtual getCallData methods
throughout the JSCell inheritance hierarchy out into static methods, which are
now called from the virtual methods. This is an intermediate step in trying to
move the virtual-ness of getCallData into our own method table stored in
ClassInfo. We need to convert the methods to static methods because static methods
can be represented as function pointers rather than pointers to member functions, and
function pointers are smaller and faster to call than pointers to member functions.
(JSValueWrapper::JSObjectCallFunction):
(UserObjectImp::getCallDataVirtual):
(UserObjectImp::getCallData):
Source/WebCore: Add static version of JSCell::visitChildren
https://bugs.webkit.org/show_bug.cgi?id=68404
Reviewed by Darin Adler.
No new tests.
In this patch we just extract the bodies of the virtual visitChildren methods
throughout the JSCell inheritance hierarchy out into static methods, which are
now called from the virtual methods. This is an intermediate step in trying to
move the virtual-ness of visitChildren into our own custom vtable stored in
ClassInfo. We need to convert the methods to static methods in order to be
able to more easily store and refer to them in our custom vtable since normal
member methods store some implicit information in their types, making it
impossible to store them generically in ClassInfo.
- WebCore.exp.in:
- bindings/js/JSAttrCustom.cpp:
(WebCore::JSAttr::visitChildrenVirtual):
(WebCore::JSAttr::visitChildren):
- bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContext::visitChildrenVirtual):
(WebCore::JSAudioContext::visitChildren):
- bindings/js/JSCSSRuleCustom.cpp:
(WebCore::JSCSSRule::visitChildrenVirtual):
(WebCore::JSCSSRule::visitChildren):
- bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::visitChildrenVirtual):
(WebCore::JSCSSStyleDeclaration::visitChildren):
- bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::JSCanvasRenderingContext::visitChildrenVirtual):
(WebCore::JSCanvasRenderingContext::visitChildren):
- bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildrenVirtual):
(WebCore::JSDOMGlobalObject::visitChildren):
- bindings/js/JSDOMGlobalObject.h:
- bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitChildrenVirtual):
(WebCore::JSDOMWindow::visitChildren):
- bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::visitChildrenVirtual):
(WebCore::JSDOMWindowShell::visitChildren):
- bindings/js/JSDOMWindowShell.h:
- bindings/js/JSJavaScriptAudioNodeCustom.cpp:
(WebCore::JSJavaScriptAudioNode::visitChildrenVirtual):
(WebCore::JSJavaScriptAudioNode::visitChildren):
- bindings/js/JSMessageChannelCustom.cpp:
(WebCore::JSMessageChannel::visitChildrenVirtual):
(WebCore::JSMessageChannel::visitChildren):
- bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::visitChildrenVirtual):
(WebCore::JSMessagePort::visitChildren):
- bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::visitChildrenVirtual):
(WebCore::JSNamedNodeMap::visitChildren):
- bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::visitChildrenVirtual):
(WebCore::JSNode::visitChildren):
- bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::visitChildrenVirtual):
(WebCore::JSNodeFilter::visitChildren):
- bindings/js/JSNodeIteratorCustom.cpp:
(WebCore::JSNodeIterator::visitChildrenVirtual):
(WebCore::JSNodeIterator::visitChildren):
- bindings/js/JSSVGElementInstanceCustom.cpp:
(WebCore::JSSVGElementInstance::visitChildrenVirtual):
(WebCore::JSSVGElementInstance::visitChildren):
- bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorker::visitChildrenVirtual):
(WebCore::JSSharedWorker::visitChildren):
- bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::visitChildrenVirtual):
(WebCore::JSStyleSheet::visitChildren):
- bindings/js/JSTreeWalkerCustom.cpp:
(WebCore::JSTreeWalker::visitChildrenVirtual):
(WebCore::JSTreeWalker::visitChildren):
- bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::visitChildrenVirtual):
(WebCore::JSWebGLRenderingContext::visitChildren):
- bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::visitChildrenVirtual):
(WebCore::JSWorkerContext::visitChildren):
- bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildrenVirtual):
(WebCore::JSXMLHttpRequest::visitChildren):
- bindings/js/JSXPathResultCustom.cpp:
(WebCore::JSXPathResult::visitChildrenVirtual):
(WebCore::JSXPathResult::visitChildren):
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
- bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::visitChildrenVirtual):
(WebCore::JSTestObj::visitChildren):
- bindings/scripts/test/JS/JSTestObj.h:
- bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtRuntimeObject::visitChildrenVirtual):
(JSC::Bindings::QtRuntimeObject::visitChildren):
- bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual):
(JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
- bridge/qt/qt_runtime.h:
- workers/WorkerContext.h:
Source/WebKit/mac: Add static version of JSCell::getCallData
https://bugs.webkit.org/show_bug.cgi?id=68741
Reviewed by Darin Adler.
In this patch we just extract the bodies of the virtual getCallData methods
throughout the JSCell inheritance hierarchy out into static methods, which are
now called from the virtual methods. This is an intermediate step in trying to
move the virtual-ness of getCallData into our own method table stored in
ClassInfo. We need to convert the methods to static methods because static methods
can be represented as function pointers rather than pointers to member functions, and
function pointers are smaller and faster to call than pointers to member functions.
- Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::invokeDefault):
Source/WebKit2: Add static version of JSCell::getCallData
https://bugs.webkit.org/show_bug.cgi?id=68741
Reviewed by Darin Adler.
In this patch we just extract the bodies of the virtual getCallData methods
throughout the JSCell inheritance hierarchy out into static methods, which are
now called from the virtual methods. This is an intermediate step in trying to
move the virtual-ness of getCallData into our own method table stored in
ClassInfo. We need to convert the methods to static methods because static methods
can be represented as function pointers rather than pointers to member functions, and
function pointers are smaller and faster to call than pointers to member functions.
- WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::getCallDataVirtual):
(WebKit::JSNPMethod::getCallData):
- WebProcess/Plugins/Netscape/JSNPMethod.h:
- WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getCallDataVirtual):
(WebKit::JSNPObject::getCallData):
- WebProcess/Plugins/Netscape/JSNPObject.h: