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/RegExpObject.cpp

    r162740 r163496  
    4040namespace JSC {
    4141
    42 static EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
    43 static EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
    44 static EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
    45 static EncodedJSValue regExpObjectSource(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
     42static EncodedJSValue regExpObjectGlobal(ExecState*, JSObject*, EncodedJSValue, PropertyName);
     43static EncodedJSValue regExpObjectIgnoreCase(ExecState*, JSObject*, EncodedJSValue, PropertyName);
     44static EncodedJSValue regExpObjectMultiline(ExecState*, JSObject*, EncodedJSValue, PropertyName);
     45static EncodedJSValue regExpObjectSource(ExecState*, JSObject*, EncodedJSValue, PropertyName);
    4646
    4747} // namespace JSC
     
    161161}
    162162
    163 EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
     163EncodedJSValue regExpObjectGlobal(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName)
    164164{
    165165    return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->global()));
    166166}
    167167
    168 EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
     168EncodedJSValue regExpObjectIgnoreCase(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName)
    169169{
    170170    return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase()));
    171171}
    172172 
    173 EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
     173EncodedJSValue regExpObjectMultiline(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName)
    174174{           
    175175    return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->multiline()));
     
    284284   
    285285   
    286 EncodedJSValue regExpObjectSource(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
     286EncodedJSValue regExpObjectSource(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName)
    287287{
    288288    String pattern = asRegExpObject(slotBase)->regExp()->pattern();
Note: See TracChangeset for help on using the changeset viewer.