Ignore:
Timestamp:
Sep 27, 2011, 3:46:51 PM (14 years ago)
Author:
[email protected]
Message:

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):

  • API/JSObjectRef.cpp:

(JSObjectIsFunction):
(JSObjectCallAsFunction):

(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(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):

  • runtime/JSCell.h:

(JSC::getCallData):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::getCallDataVirtual):
(JSC::JSFunction::getCallData):

  • runtime/JSFunction.h:
  • runtime/JSONObject.cpp:

(JSC::Stringifier::Stringifier):
(JSC::Stringifier::toJSON):
(JSC::Stringifier::appendStringifiedValue):

  • runtime/JSObject.cpp:

(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.cpp:

(JSValueWrapper::JSObjectCallFunction):

  • UserObjectImp.cpp:

(UserObjectImp::getCallDataVirtual):
(UserObjectImp::getCallData):

  • UserObjectImp.h:

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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/JavaScriptCore.exp

    r96146 r96164  
    253253__ZN3JSC4Yarr9interpretEPNS0_15BytecodePatternERKNS_7UStringEjjPi
    254254__ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
    255 __ZN3JSC6JSCell11getCallDataERNS_8CallDataE
    256255__ZN3JSC6JSCell14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
    257256__ZN3JSC6JSCell14deletePropertyEPNS_9ExecStateEj
    258257__ZN3JSC6JSCell16getConstructDataERNS_13ConstructDataE
     258__ZN3JSC6JSCell18getCallDataVirtualERNS_8CallDataE
    259259__ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
    260260__ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
Note: See TracChangeset for help on using the changeset viewer.