Ignore:
Timestamp:
Feb 5, 2014, 4:58:13 PM (12 years ago)
Author:
[email protected]
Message:

Change custom getter signature to make the base reference an object pointer
https://bugs.webkit.org/show_bug.cgi?id=128279

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Make custom getters take a JSObject* instead of EncodedJSValue as the base
reference. This allows us to drop one pointer from the JSVALUE32_64 calling
convention.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::staticFunctionGetter):
(JSC::JSCallbackObject<Parent>::callbackGetter):

  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:

(JSC::generateProtoChainAccessStub):
(JSC::tryBuildGetByIDList):

  • runtime/JSActivation.cpp:

(JSC::JSActivation::argumentsGetter):

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

(JSC::JSFunction::argumentsGetter):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::lengthGetter):
(JSC::JSFunction::nameGetter):

  • runtime/JSFunction.h:
  • runtime/JSObject.h:

(JSC::PropertySlot::getValue):

  • runtime/NumberConstructor.cpp:

(JSC::numberConstructorNaNValue):
(JSC::numberConstructorNegInfinity):
(JSC::numberConstructorPosInfinity):
(JSC::numberConstructorMaxValue):
(JSC::numberConstructorMinValue):

  • runtime/PropertySlot.h:
  • runtime/RegExpConstructor.cpp:

(JSC::regExpConstructorDollar1):
(JSC::regExpConstructorDollar2):
(JSC::regExpConstructorDollar3):
(JSC::regExpConstructorDollar4):
(JSC::regExpConstructorDollar5):
(JSC::regExpConstructorDollar6):
(JSC::regExpConstructorDollar7):
(JSC::regExpConstructorDollar8):
(JSC::regExpConstructorDollar9):
(JSC::regExpConstructorInput):
(JSC::regExpConstructorMultiline):
(JSC::regExpConstructorLastMatch):
(JSC::regExpConstructorLastParen):
(JSC::regExpConstructorLeftContext):
(JSC::regExpConstructorRightContext):

  • runtime/RegExpObject.cpp:

(JSC::regExpObjectGlobal):
(JSC::regExpObjectIgnoreCase):
(JSC::regExpObjectMultiline):
(JSC::regExpObjectSource):

Source/WebCore:

Update everything to the new calling convention.

  • bindings/js/JSCSSStyleDeclarationCustom.cpp:

(WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
(WebCore::cssPropertyGetterCallback):

  • bindings/js/JSDOMBinding.cpp:

(WebCore::objectToStringFunctionGetter):

  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDOMMimeTypeArrayCustom.cpp:

(WebCore::JSDOMMimeTypeArray::nameGetter):

  • bindings/js/JSDOMPluginArrayCustom.cpp:

(WebCore::JSDOMPluginArray::nameGetter):

  • bindings/js/JSDOMPluginCustom.cpp:

(WebCore::JSDOMPlugin::nameGetter):

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::nonCachingStaticFunctionGetter):
(WebCore::childFrameGetter):
(WebCore::indexGetter):
(WebCore::namedItemGetter):

  • bindings/js/JSHTMLAllCollectionCustom.cpp:

(WebCore::JSHTMLAllCollection::nameGetter):

  • bindings/js/JSHTMLCollectionCustom.cpp:

(WebCore::JSHTMLCollection::nameGetter):

  • bindings/js/JSHTMLDocumentCustom.cpp:

(WebCore::JSHTMLDocument::nameGetter):

  • bindings/js/JSHTMLFormControlsCollectionCustom.cpp:

(WebCore::JSHTMLFormControlsCollection::nameGetter):

  • bindings/js/JSHTMLFormElementCustom.cpp:

(WebCore::JSHTMLFormElement::nameGetter):

  • bindings/js/JSHTMLFrameSetElementCustom.cpp:

(WebCore::JSHTMLFrameSetElement::nameGetter):

  • bindings/js/JSHistoryCustom.cpp:

(WebCore::nonCachingStaticBackFunctionGetter):
(WebCore::nonCachingStaticForwardFunctionGetter):
(WebCore::nonCachingStaticGoFunctionGetter):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::nonCachingStaticReplaceFunctionGetter):
(WebCore::nonCachingStaticReloadFunctionGetter):
(WebCore::nonCachingStaticAssignFunctionGetter):

  • bindings/js/JSNamedNodeMapCustom.cpp:

(WebCore::JSNamedNodeMap::nameGetter):

  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginElementPropertyGetter):

  • bindings/js/JSPluginElementFunctions.h:
  • bindings/js/JSRTCStatsResponseCustom.cpp:

(WebCore::JSRTCStatsResponse::nameGetter):

  • bindings/js/JSStorageCustom.cpp:

(WebCore::JSStorage::nameGetter):

  • bindings/js/JSStyleSheetListCustom.cpp:

(WebCore::JSStyleSheetList::nameGetter):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::lengthGetter):
(JSC::RuntimeArray::indexGetter):

  • bridge/runtime_array.h:
  • bridge/runtime_method.cpp:

(JSC::RuntimeMethod::lengthGetter):

  • bridge/runtime_method.h:
  • bridge/runtime_object.cpp:

(JSC::Bindings::RuntimeObject::fallbackObjectGetter):
(JSC::Bindings::RuntimeObject::fieldGetter):
(JSC::Bindings::RuntimeObject::methodGetter):

  • bridge/runtime_object.h:

Source/WebKit2:

Update everything to the new calling convention.

  • WebProcess/Plugins/Netscape/JSNPObject.cpp:

(WebKit::JSNPObject::propertyGetter):
(WebKit::JSNPObject::methodGetter):

  • WebProcess/Plugins/Netscape/JSNPObject.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r163321 r163496  
    224224}
    225225
    226 EncodedJSValue JSFunction::argumentsGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    227 {
    228     JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
     226EncodedJSValue JSFunction::argumentsGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName)
     227{
     228    JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
    229229    ASSERT(!thisObj->isHostFunction());
    230230
     
    279279}
    280280
    281 EncodedJSValue JSFunction::callerGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    282 {
    283     JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
     281EncodedJSValue JSFunction::callerGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName)
     282{
     283    JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
    284284    ASSERT(!thisObj->isHostFunction());
    285285    JSValue caller = retrieveCallerFunction(exec, thisObj);
     
    294294}
    295295
    296 EncodedJSValue JSFunction::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    297 {
    298     JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
     296EncodedJSValue JSFunction::lengthGetter(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName)
     297{
     298    JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
    299299    ASSERT(!thisObj->isHostFunction());
    300300    return JSValue::encode(jsNumber(thisObj->jsExecutable()->parameterCount()));
    301301}
    302302
    303 EncodedJSValue JSFunction::nameGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    304 {
    305     JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
     303EncodedJSValue JSFunction::nameGetter(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName)
     304{
     305    JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
    306306    ASSERT(!thisObj->isHostFunction());
    307307    return JSValue::encode(thisObj->jsExecutable()->nameValue());
Note: See TracChangeset for help on using the changeset viewer.