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

    r55262 r55401  
    3636namespace JSC {
    3737
    38 static JSValue regExpConstructorInput(ExecState*, const Identifier&, const PropertySlot&);
    39 static JSValue regExpConstructorMultiline(ExecState*, const Identifier&, const PropertySlot&);
    40 static JSValue regExpConstructorLastMatch(ExecState*, const Identifier&, const PropertySlot&);
    41 static JSValue regExpConstructorLastParen(ExecState*, const Identifier&, const PropertySlot&);
    42 static JSValue regExpConstructorLeftContext(ExecState*, const Identifier&, const PropertySlot&);
    43 static JSValue regExpConstructorRightContext(ExecState*, const Identifier&, const PropertySlot&);
    44 static JSValue regExpConstructorDollar1(ExecState*, const Identifier&, const PropertySlot&);
    45 static JSValue regExpConstructorDollar2(ExecState*, const Identifier&, const PropertySlot&);
    46 static JSValue regExpConstructorDollar3(ExecState*, const Identifier&, const PropertySlot&);
    47 static JSValue regExpConstructorDollar4(ExecState*, const Identifier&, const PropertySlot&);
    48 static JSValue regExpConstructorDollar5(ExecState*, const Identifier&, const PropertySlot&);
    49 static JSValue regExpConstructorDollar6(ExecState*, const Identifier&, const PropertySlot&);
    50 static JSValue regExpConstructorDollar7(ExecState*, const Identifier&, const PropertySlot&);
    51 static JSValue regExpConstructorDollar8(ExecState*, const Identifier&, const PropertySlot&);
    52 static JSValue regExpConstructorDollar9(ExecState*, const Identifier&, const PropertySlot&);
     38static JSValue regExpConstructorInput(ExecState*, JSValue, const Identifier&);
     39static JSValue regExpConstructorMultiline(ExecState*, JSValue, const Identifier&);
     40static JSValue regExpConstructorLastMatch(ExecState*, JSValue, const Identifier&);
     41static JSValue regExpConstructorLastParen(ExecState*, JSValue, const Identifier&);
     42static JSValue regExpConstructorLeftContext(ExecState*, JSValue, const Identifier&);
     43static JSValue regExpConstructorRightContext(ExecState*, JSValue, const Identifier&);
     44static JSValue regExpConstructorDollar1(ExecState*, JSValue, const Identifier&);
     45static JSValue regExpConstructorDollar2(ExecState*, JSValue, const Identifier&);
     46static JSValue regExpConstructorDollar3(ExecState*, JSValue, const Identifier&);
     47static JSValue regExpConstructorDollar4(ExecState*, JSValue, const Identifier&);
     48static JSValue regExpConstructorDollar5(ExecState*, JSValue, const Identifier&);
     49static JSValue regExpConstructorDollar6(ExecState*, JSValue, const Identifier&);
     50static JSValue regExpConstructorDollar7(ExecState*, JSValue, const Identifier&);
     51static JSValue regExpConstructorDollar8(ExecState*, JSValue, const Identifier&);
     52static JSValue regExpConstructorDollar9(ExecState*, JSValue, const Identifier&);
    5353
    5454static void setRegExpConstructorInput(ExecState*, JSObject*, JSValue);
     
    196196}
    197197
    198 JSValue regExpConstructorDollar1(ExecState* exec, const Identifier&, const PropertySlot& slot)
    199 {
    200     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 1);
    201 }
    202 
    203 JSValue regExpConstructorDollar2(ExecState* exec, const Identifier&, const PropertySlot& slot)
    204 {
    205     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 2);
    206 }
    207 
    208 JSValue regExpConstructorDollar3(ExecState* exec, const Identifier&, const PropertySlot& slot)
    209 {
    210     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 3);
    211 }
    212 
    213 JSValue regExpConstructorDollar4(ExecState* exec, const Identifier&, const PropertySlot& slot)
    214 {
    215     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 4);
    216 }
    217 
    218 JSValue regExpConstructorDollar5(ExecState* exec, const Identifier&, const PropertySlot& slot)
    219 {
    220     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 5);
    221 }
    222 
    223 JSValue regExpConstructorDollar6(ExecState* exec, const Identifier&, const PropertySlot& slot)
    224 {
    225     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 6);
    226 }
    227 
    228 JSValue regExpConstructorDollar7(ExecState* exec, const Identifier&, const PropertySlot& slot)
    229 {
    230     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 7);
    231 }
    232 
    233 JSValue regExpConstructorDollar8(ExecState* exec, const Identifier&, const PropertySlot& slot)
    234 {
    235     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 8);
    236 }
    237 
    238 JSValue regExpConstructorDollar9(ExecState* exec, const Identifier&, const PropertySlot& slot)
    239 {
    240     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 9);
    241 }
    242 
    243 JSValue regExpConstructorInput(ExecState* exec, const Identifier&, const PropertySlot& slot)
    244 {
    245     return jsString(exec, asRegExpConstructor(slot.slotBase())->input());
    246 }
    247 
    248 JSValue regExpConstructorMultiline(ExecState*, const Identifier&, const PropertySlot& slot)
    249 {
    250     return jsBoolean(asRegExpConstructor(slot.slotBase())->multiline());
    251 }
    252 
    253 JSValue regExpConstructorLastMatch(ExecState* exec, const Identifier&, const PropertySlot& slot)
    254 {
    255     return asRegExpConstructor(slot.slotBase())->getBackref(exec, 0);
    256 }
    257 
    258 JSValue regExpConstructorLastParen(ExecState* exec, const Identifier&, const PropertySlot& slot)
    259 {
    260     return asRegExpConstructor(slot.slotBase())->getLastParen(exec);
    261 }
    262 
    263 JSValue regExpConstructorLeftContext(ExecState* exec, const Identifier&, const PropertySlot& slot)
    264 {
    265     return asRegExpConstructor(slot.slotBase())->getLeftContext(exec);
    266 }
    267 
    268 JSValue regExpConstructorRightContext(ExecState* exec, const Identifier&, const PropertySlot& slot)
    269 {
    270     return asRegExpConstructor(slot.slotBase())->getRightContext(exec);
     198JSValue regExpConstructorDollar1(ExecState* exec, JSValue slotBase, const Identifier&)
     199{
     200    return asRegExpConstructor(slotBase)->getBackref(exec, 1);
     201}
     202
     203JSValue regExpConstructorDollar2(ExecState* exec, JSValue slotBase, const Identifier&)
     204{
     205    return asRegExpConstructor(slotBase)->getBackref(exec, 2);
     206}
     207
     208JSValue regExpConstructorDollar3(ExecState* exec, JSValue slotBase, const Identifier&)
     209{
     210    return asRegExpConstructor(slotBase)->getBackref(exec, 3);
     211}
     212
     213JSValue regExpConstructorDollar4(ExecState* exec, JSValue slotBase, const Identifier&)
     214{
     215    return asRegExpConstructor(slotBase)->getBackref(exec, 4);
     216}
     217
     218JSValue regExpConstructorDollar5(ExecState* exec, JSValue slotBase, const Identifier&)
     219{
     220    return asRegExpConstructor(slotBase)->getBackref(exec, 5);
     221}
     222
     223JSValue regExpConstructorDollar6(ExecState* exec, JSValue slotBase, const Identifier&)
     224{
     225    return asRegExpConstructor(slotBase)->getBackref(exec, 6);
     226}
     227
     228JSValue regExpConstructorDollar7(ExecState* exec, JSValue slotBase, const Identifier&)
     229{
     230    return asRegExpConstructor(slotBase)->getBackref(exec, 7);
     231}
     232
     233JSValue regExpConstructorDollar8(ExecState* exec, JSValue slotBase, const Identifier&)
     234{
     235    return asRegExpConstructor(slotBase)->getBackref(exec, 8);
     236}
     237
     238JSValue regExpConstructorDollar9(ExecState* exec, JSValue slotBase, const Identifier&)
     239{
     240    return asRegExpConstructor(slotBase)->getBackref(exec, 9);
     241}
     242
     243JSValue regExpConstructorInput(ExecState* exec, JSValue slotBase, const Identifier&)
     244{
     245    return jsString(exec, asRegExpConstructor(slotBase)->input());
     246}
     247
     248JSValue regExpConstructorMultiline(ExecState*, JSValue slotBase, const Identifier&)
     249{
     250    return jsBoolean(asRegExpConstructor(slotBase)->multiline());
     251}
     252
     253JSValue regExpConstructorLastMatch(ExecState* exec, JSValue slotBase, const Identifier&)
     254{
     255    return asRegExpConstructor(slotBase)->getBackref(exec, 0);
     256}
     257
     258JSValue regExpConstructorLastParen(ExecState* exec, JSValue slotBase, const Identifier&)
     259{
     260    return asRegExpConstructor(slotBase)->getLastParen(exec);
     261}
     262
     263JSValue regExpConstructorLeftContext(ExecState* exec, JSValue slotBase, const Identifier&)
     264{
     265    return asRegExpConstructor(slotBase)->getLeftContext(exec);
     266}
     267
     268JSValue regExpConstructorRightContext(ExecState* exec, JSValue slotBase, const Identifier&)
     269{
     270    return asRegExpConstructor(slotBase)->getRightContext(exec);
    271271}
    272272
Note: See TracChangeset for help on using the changeset viewer.