Ignore:
Timestamp:
Mar 2, 2010, 12:20:48 AM (15 years ago)
Author:
[email protected]
Message:

2010-03-01 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Refactor named getter function signature to be in line with indexing getter signature
https://bugs.webkit.org/show_bug.cgi?id=35563

This removes the PropertySlot argument from getter functions, and makes them directly
pass the slot base. This makes the semantics for the functions match that of the
indexing getters.

On the down side, this means that we can no longer simply use a proxy function for
JS getters, so we now add another marker value to indicate that a getter is present
and branch accordingly.

Against all rationality sunspider reports this as a perf win, but i suspect it's just noise.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h: (JSC::::staticValueGetter): (JSC::::staticFunctionGetter): (JSC::::callbackGetter):
  • JavaScriptCore.exp:
  • runtime/JSActivation.cpp: (JSC::JSActivation::argumentsGetter):
  • runtime/JSActivation.h:
  • runtime/JSFunction.cpp: (JSC::JSFunction::argumentsGetter): (JSC::JSFunction::callerGetter): (JSC::JSFunction::lengthGetter):
  • runtime/JSFunction.h:
  • runtime/NumberConstructor.cpp: (JSC::numberConstructorNaNValue): (JSC::numberConstructorNegInfinity): (JSC::numberConstructorPosInfinity): (JSC::numberConstructorMaxValue): (JSC::numberConstructorMinValue):
  • runtime/PropertySlot.cpp: (JSC::PropertySlot::functionGetter):
  • runtime/PropertySlot.h: (JSC::PropertySlot::getValue): (JSC::PropertySlot::setGetterSlot): (JSC::PropertySlot::setCacheableGetterSlot):
  • 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): (JSC::regExpObjectLastIndex):

2010-03-01 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Refactor named getter function signature to be in line with indexing getter signature
https://bugs.webkit.org/show_bug.cgi?id=35563

Fix method signature and update code as appropriate

  • UserObjectImp.cpp: (UserObjectImp::userObjectGetter):
  • UserObjectImp.h:

2010-03-01 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Refactor named getter function signature to be in line with indexing getter signature
https://bugs.webkit.org/show_bug.cgi?id=35563

Fix up WebCore to use the new named getter function signature, update the
codegenerator to the new calling convention, and fix the custom bindings.

  • bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter):
  • bindings/js/JSDOMBinding.cpp: (WebCore::objectToStringFunctionGetter):
  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDOMWindowCustom.cpp: (WebCore::nonCachingStaticFunctionGetter): (WebCore::childFrameGetter): (WebCore::namedItemGetter):
  • bindings/js/JSDataGridColumnListCustom.cpp: (WebCore::JSDataGridColumnList::nameGetter):
  • bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::nameGetter):
  • bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter):
  • bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::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/JSMimeTypeArrayCustom.cpp: (WebCore::JSMimeTypeArray::nameGetter):
  • bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter):
  • bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeList::nameGetter):
  • bindings/js/JSPluginArrayCustom.cpp: (WebCore::JSPluginArray::nameGetter):
  • bindings/js/JSPluginCustom.cpp: (WebCore::JSPlugin::nameGetter):
  • bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectPropertyGetter):
  • bindings/js/JSPluginElementFunctions.h:
  • bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter):
  • bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter):
  • bindings/scripts/CodeGeneratorJS.pm:
  • bridge/runtime_array.cpp: (JSC::RuntimeArray::lengthGetter):
  • 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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/NumberConstructor.cpp

    r48836 r55401  
    3030ASSERT_CLASS_FITS_IN_CELL(NumberConstructor);
    3131
    32 static JSValue numberConstructorNaNValue(ExecState*, const Identifier&, const PropertySlot&);
    33 static JSValue numberConstructorNegInfinity(ExecState*, const Identifier&, const PropertySlot&);
    34 static JSValue numberConstructorPosInfinity(ExecState*, const Identifier&, const PropertySlot&);
    35 static JSValue numberConstructorMaxValue(ExecState*, const Identifier&, const PropertySlot&);
    36 static JSValue numberConstructorMinValue(ExecState*, const Identifier&, const PropertySlot&);
     32static JSValue numberConstructorNaNValue(ExecState*, JSValue, const Identifier&);
     33static JSValue numberConstructorNegInfinity(ExecState*, JSValue, const Identifier&);
     34static JSValue numberConstructorPosInfinity(ExecState*, JSValue, const Identifier&);
     35static JSValue numberConstructorMaxValue(ExecState*, JSValue, const Identifier&);
     36static JSValue numberConstructorMinValue(ExecState*, JSValue, const Identifier&);
    3737
    3838} // namespace JSC
     
    7474}
    7575
    76 static JSValue numberConstructorNaNValue(ExecState* exec, const Identifier&, const PropertySlot&)
     76static JSValue numberConstructorNaNValue(ExecState* exec, JSValue, const Identifier&)
    7777{
    7878    return jsNaN(exec);
    7979}
    8080
    81 static JSValue numberConstructorNegInfinity(ExecState* exec, const Identifier&, const PropertySlot&)
     81static JSValue numberConstructorNegInfinity(ExecState* exec, JSValue, const Identifier&)
    8282{
    8383    return jsNumber(exec, -Inf);
    8484}
    8585
    86 static JSValue numberConstructorPosInfinity(ExecState* exec, const Identifier&, const PropertySlot&)
     86static JSValue numberConstructorPosInfinity(ExecState* exec, JSValue, const Identifier&)
    8787{
    8888    return jsNumber(exec, Inf);
    8989}
    9090
    91 static JSValue numberConstructorMaxValue(ExecState* exec, const Identifier&, const PropertySlot&)
     91static JSValue numberConstructorMaxValue(ExecState* exec, JSValue, const Identifier&)
    9292{
    9393    return jsNumber(exec, 1.7976931348623157E+308);
    9494}
    9595
    96 static JSValue numberConstructorMinValue(ExecState* exec, const Identifier&, const PropertySlot&)
     96static JSValue numberConstructorMinValue(ExecState* exec, JSValue, const Identifier&)
    9797{
    9898    return jsNumber(exec, 5E-324);
Note: See TracChangeset for help on using the changeset viewer.