Changeset 190785 in webkit


Ignore:
Timestamp:
Oct 9, 2015 6:44:42 AM (9 years ago)
Author:
youenn.fablet@crf.canon.fr
Message:

Rationalize JSXXConstructor class definition
https://bugs.webkit.org/show_bug.cgi?id=149923

Reviewed by Darin Adler.

Declaration of JSXXConstructor::construct and JSXXConstructor::getConstructData
as long as JSXX is constructable from JavaScript.

Previously, JSXXConstructor::construct was not generated in case of CustomConstructor.
It is now generated and directly calls the custom constructor function.

getConstructData was declared conditionally with #if in case of ConstructorConditional.
The #if are now within getConstructData body.

Covered by binding tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorDeclaration):
(GenerateOverloadedConstructorDefinition):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
(GenerateConstructorDefinitions):.

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):.

  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::JSTestEventConstructorConstructor::construct):
(WebCore::JSTestEventConstructorConstructor::getConstructData):

  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::JSTestInterfaceConstructor::construct):
(WebCore::JSTestInterfaceConstructor::getConstructData):

  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:

(WebCore::JSTestJSBuiltinConstructorConstructor::construct):
(WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):

  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:

(WebCore::JSTestNamedConstructorNamedConstructor::construct):
(WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):

  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::JSTestNodeConstructor::construct):
(WebCore::JSTestNodeConstructor::getConstructData):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObjConstructor::construct):
(WebCore::JSTestObjConstructor::getConstructData):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:

(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors2):
(WebCore::constructJSTestOverloadedConstructors3):
(WebCore::constructJSTestOverloadedConstructors4):
(WebCore::constructJSTestOverloadedConstructors5):
(WebCore::JSTestOverloadedConstructorsConstructor::construct):
(WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):

  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::JSTestTypedefsConstructor::construct):
(WebCore::JSTestTypedefsConstructor::getConstructData):

Location:
trunk/Source/WebCore
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r190784 r190785  
     12015-10-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
     2
     3        Rationalize JSXXConstructor class definition
     4        https://bugs.webkit.org/show_bug.cgi?id=149923
     5
     6        Reviewed by Darin Adler.
     7
     8        Declaration of JSXXConstructor::construct and JSXXConstructor::getConstructData
     9        as long as JSXX is constructable from JavaScript.
     10
     11        Previously, JSXXConstructor::construct was not generated in case of CustomConstructor.
     12        It is now generated and directly calls the custom constructor function.
     13
     14        getConstructData was declared conditionally with #if in case of ConstructorConditional.
     15        The #if are now within getConstructData body.
     16
     17        Covered by binding tests.
     18
     19        * bindings/scripts/CodeGeneratorJS.pm:
     20        (GenerateConstructorDeclaration):
     21        (GenerateOverloadedConstructorDefinition):
     22        (GenerateConstructorDefinition):
     23        (GenerateConstructorHelperMethods):
     24        (GenerateConstructorDefinitions):.
     25        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
     26        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
     27        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
     28        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):.
     29        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
     30        (WebCore::JSTestEventConstructorConstructor::construct):
     31        (WebCore::JSTestEventConstructorConstructor::getConstructData):
     32        * bindings/scripts/test/JS/JSTestInterface.cpp:
     33        (WebCore::JSTestInterfaceConstructor::construct):
     34        (WebCore::JSTestInterfaceConstructor::getConstructData):
     35        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
     36        (WebCore::JSTestJSBuiltinConstructorConstructor::construct):
     37        (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
     38        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
     39        (WebCore::JSTestNamedConstructorNamedConstructor::construct):
     40        (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
     41        * bindings/scripts/test/JS/JSTestNode.cpp:
     42        (WebCore::JSTestNodeConstructor::construct):
     43        (WebCore::JSTestNodeConstructor::getConstructData):
     44        * bindings/scripts/test/JS/JSTestObj.cpp:
     45        (WebCore::JSTestObjConstructor::construct):
     46        (WebCore::JSTestObjConstructor::getConstructData):
     47        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
     48        (WebCore::constructJSTestOverloadedConstructors1):
     49        (WebCore::constructJSTestOverloadedConstructors2):
     50        (WebCore::constructJSTestOverloadedConstructors3):
     51        (WebCore::constructJSTestOverloadedConstructors4):
     52        (WebCore::constructJSTestOverloadedConstructors5):
     53        (WebCore::JSTestOverloadedConstructorsConstructor::construct):
     54        (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
     55        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
     56        (WebCore::JSTestTypedefsConstructor::construct):
     57        (WebCore::JSTestTypedefsConstructor::getConstructData):
     58
    1592015-10-07  Sergio Villar Senin  <svillar@igalia.com>
    260
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r190714 r190785  
    46274627
    46284628    if (IsConstructable($interface) && !$interface->extendedAttributes->{"NamedConstructor"}) {
    4629         if (!HasCustomConstructor($interface)) {
    4630             push(@$outputArray, "protected:\n");
    4631             push(@$outputArray, "    static JSC::EncodedJSValue JSC_HOST_CALL construct${className}(JSC::ExecState*);\n");
    4632             my @constructors = @{$interface->constructors};
    4633             if (@constructors > 1) {
    4634                 foreach my $constructor (@constructors) {
    4635                     my $overloadedIndex = "" . $constructor->{overloadedIndex};
    4636                     push(@$outputArray, "    static JSC::EncodedJSValue JSC_HOST_CALL construct${className}${overloadedIndex}(JSC::ExecState*);\n");
    4637                 }
    4638             }
    4639         }
    4640 
    4641         my $conditionalString = $codeGenerator->GenerateConstructorConditionalString($interface);
    4642         push(@$outputArray, "#if $conditionalString\n") if $conditionalString;
     4629        push(@$outputArray, "protected:\n");
     4630        push(@$outputArray, "    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);\n");
    46434631        push(@$outputArray, "    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);\n");
    4644         push(@$outputArray, "#endif // $conditionalString\n") if $conditionalString;
    46454632    }
    46464633    push(@$outputArray, "};\n\n");
     
    46684655private:
    46694656    JS${interfaceName}NamedConstructor(JSC::Structure*, JSDOMGlobalObject&);
    4670     static JSC::EncodedJSValue JSC_HOST_CALL constructJS${interfaceName}(JSC::ExecState*);
     4657    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    46714658    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    46724659    void finishCreation(JSC::VM&, JSDOMGlobalObject&);
     
    47104697    my $interface = shift;
    47114698
    4712     my $functionName = "${className}Constructor::construct${className}";
    4713 
    47144699    # FIXME: Implement support for overloaded constructors with variadic arguments.
    47154700    my $lengthOfLongestOverloadedConstructorParameterList = LengthOfLongestFunctionParameterList($interface->constructors);
    47164701
    47174702    push(@$outputArray, <<END);
    4718 EncodedJSValue JSC_HOST_CALL ${functionName}(ExecState* state)
     4703EncodedJSValue JSC_HOST_CALL ${className}Constructor::construct(ExecState* state)
    47194704{
    47204705    size_t argsCount = std::min<size_t>($lengthOfLongestOverloadedConstructorParameterList, state->argumentCount());
     
    47264711    my @constructors = @{$interface->constructors};
    47274712    foreach my $overload (@constructors) {
     4713        my $functionName = "construct${className}";
    47284714        my ($numMandatoryParams, $parametersCheck, @neededArguments) = GenerateFunctionParametersCheck($overload);
    47294715        $leastNumMandatoryParams = $numMandatoryParams if ($numMandatoryParams < $leastNumMandatoryParams);
     
    47694755
    47704756            push(@$outputArray, <<END);
    4771 EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct${className}(ExecState* state)
     4757EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct(ExecState* state)
    47724758{
    47734759    auto* jsConstructor = jsCast<${constructorClassName}*>(state->callee());
     
    48334819
    48344820END
    4835         } elsif ($interface->extendedAttributes->{"JSBuiltinConstructor"}) {
    4836             push(@$outputArray, "JSC::EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct${className}(JSC::ExecState* state)\n");
     4821         } elsif ($interface->extendedAttributes->{"CustomConstructor"}) {
     4822            push(@$outputArray, "JSC::EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct(JSC::ExecState* state)\n");
     4823            push(@$outputArray, "{\n");
     4824            push(@$outputArray, "    return construct${className}(state);\n");
     4825            push(@$outputArray, "}\n\n");
     4826         } elsif ($interface->extendedAttributes->{"JSBuiltinConstructor"}) {
     4827            push(@$outputArray, "JSC::EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct(JSC::ExecState* state)\n");
    48374828            push(@$outputArray, "{\n");
    48384829
     
    48424833            push(@$outputArray, "}\n\n");
    48434834        } elsif (!HasCustomConstructor($interface) && (!$interface->extendedAttributes->{"NamedConstructor"} || $generatingNamedConstructor)) {
    4844             my $overloadedIndexString = "";
    48454835            if ($function->{overloadedIndex} && $function->{overloadedIndex} > 0) {
    4846                 $overloadedIndexString .= $function->{overloadedIndex};
    4847             }
    4848 
    4849             push(@$outputArray, "EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct${className}${overloadedIndexString}(ExecState* state)\n");
     4836                push(@$outputArray, "static inline EncodedJSValue construct${className}$function->{overloadedIndex}(ExecState* state)\n");
     4837            }
     4838            else {
     4839                push(@$outputArray, "EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct(ExecState* state)\n");
     4840            }
     4841
    48504842            push(@$outputArray, "{\n");
    48514843            push(@$outputArray, "    auto* castedThis = jsCast<${constructorClassName}*>(state->callee());\n");
     
    50185010        if (!$interface->extendedAttributes->{"NamedConstructor"} || $generatingNamedConstructor) {
    50195011            my $conditionalString = $codeGenerator->GenerateConstructorConditionalString($interface);
    5020             push(@$outputArray, "#if $conditionalString\n") if $conditionalString;
    50215012            push(@$outputArray, "ConstructType ${constructorClassName}::getConstructData(JSCell*, ConstructData& constructData)\n");
    50225013            push(@$outputArray, "{\n");
    5023             push(@$outputArray, "    constructData.native.function = construct${className};\n");
    5024             push(@$outputArray, "    return ConstructTypeHost;\n");
     5014            if ($conditionalString) {
     5015                push(@$outputArray, "#if $conditionalString\n");
     5016                push(@$outputArray, "    constructData.native.function = construct;\n");
     5017                push(@$outputArray, "    return ConstructTypeHost;\n");
     5018                push(@$outputArray, "#else\n");
     5019                push(@$outputArray, "    return Base::getConstructData(cell, constructData);\n");
     5020                push(@$outputArray, "#endif\n");
     5021            } else {
     5022                push(@$outputArray, "    constructData.native.function = construct;\n");
     5023                push(@$outputArray, "    return ConstructTypeHost;\n");
     5024            }
    50255025            push(@$outputArray, "}\n");
    5026             push(@$outputArray, "#endif // $conditionalString\n") if $conditionalString;
    50275026            push(@$outputArray, "\n");
    50285027        }
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp

    r190714 r190785  
    7777        return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
    7878    }
     79protected:
     80    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    7981    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    8082};
     83
     84JSC::EncodedJSValue JSC_HOST_CALL JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct(JSC::ExecState* state)
     85{
     86    return constructJSTestCustomConstructorWithNoInterfaceObject(state);
     87}
    8188
    8289const ClassInfo JSTestCustomConstructorWithNoInterfaceObjectConstructor::s_info = { "TestCustomConstructorWithNoInterfaceObjectConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCustomConstructorWithNoInterfaceObjectConstructor) };
     
    98105ConstructType JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData(JSCell*, ConstructData& constructData)
    99106{
    100     constructData.native.function = constructJSTestCustomConstructorWithNoInterfaceObject;
     107    constructData.native.function = construct;
    101108    return ConstructTypeHost;
    102109}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r190714 r190785  
    8484    }
    8585protected:
    86     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestEventConstructor(JSC::ExecState*);
     86    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    8787    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    8888};
    8989
    90 EncodedJSValue JSC_HOST_CALL JSTestEventConstructorConstructor::constructJSTestEventConstructor(ExecState* state)
     90EncodedJSValue JSC_HOST_CALL JSTestEventConstructorConstructor::construct(ExecState* state)
    9191{
    9292    auto* jsConstructor = jsCast<JSTestEventConstructorConstructor*>(state->callee());
     
    147147ConstructType JSTestEventConstructorConstructor::getConstructData(JSCell*, ConstructData& constructData)
    148148{
    149     constructData.native.function = constructJSTestEventConstructor;
     149    constructData.native.function = construct;
    150150    return ConstructTypeHost;
    151151}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r190714 r190785  
    164164    }
    165165protected:
    166     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestInterface(JSC::ExecState*);
    167 #if ENABLE(TEST_INTERFACE)
     166    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    168167    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    169 #endif // ENABLE(TEST_INTERFACE)
    170168};
    171169
     
    265263#endif
    266264
    267 EncodedJSValue JSC_HOST_CALL JSTestInterfaceConstructor::constructJSTestInterface(ExecState* state)
     265EncodedJSValue JSC_HOST_CALL JSTestInterfaceConstructor::construct(ExecState* state)
    268266{
    269267    auto* castedThis = jsCast<JSTestInterfaceConstructor*>(state->callee());
     
    305303}
    306304
     305ConstructType JSTestInterfaceConstructor::getConstructData(JSCell*, ConstructData& constructData)
     306{
    307307#if ENABLE(TEST_INTERFACE)
    308 ConstructType JSTestInterfaceConstructor::getConstructData(JSCell*, ConstructData& constructData)
    309 {
    310     constructData.native.function = constructJSTestInterface;
     308    constructData.native.function = construct;
    311309    return ConstructTypeHost;
    312 }
    313 #endif // ENABLE(TEST_INTERFACE)
     310#else
     311    return Base::getConstructData(cell, constructData);
     312#endif
     313}
    314314
    315315/* Hash table for prototype */
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp

    r190714 r190785  
    7979    }
    8080protected:
    81     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestJSBuiltinConstructor(JSC::ExecState*);
     81    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    8282    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    8383};
    8484
    85 JSC::EncodedJSValue JSC_HOST_CALL JSTestJSBuiltinConstructorConstructor::constructJSTestJSBuiltinConstructor(JSC::ExecState* state)
     85JSC::EncodedJSValue JSC_HOST_CALL JSTestJSBuiltinConstructorConstructor::construct(JSC::ExecState* state)
    8686{
    8787    auto* castedThis = jsCast<JSTestJSBuiltinConstructorConstructor*>(state->callee());
     
    108108ConstructType JSTestJSBuiltinConstructorConstructor::getConstructData(JSCell*, ConstructData& constructData)
    109109{
    110     constructData.native.function = constructJSTestJSBuiltinConstructor;
     110    constructData.native.function = construct;
    111111    return ConstructTypeHost;
    112112}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp

    r190714 r190785  
    102102private:
    103103    JSTestNamedConstructorNamedConstructor(JSC::Structure*, JSDOMGlobalObject&);
    104     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestNamedConstructor(JSC::ExecState*);
     104    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    105105    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    106106    void finishCreation(JSC::VM&, JSDOMGlobalObject&);
     
    123123}
    124124
    125 EncodedJSValue JSC_HOST_CALL JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor(ExecState* state)
     125EncodedJSValue JSC_HOST_CALL JSTestNamedConstructorNamedConstructor::construct(ExecState* state)
    126126{
    127127    auto* castedThis = jsCast<JSTestNamedConstructorNamedConstructor*>(state->callee());
     
    164164ConstructType JSTestNamedConstructorNamedConstructor::getConstructData(JSCell*, ConstructData& constructData)
    165165{
    166     constructData.native.function = constructJSTestNamedConstructor;
     166    constructData.native.function = construct;
    167167    return ConstructTypeHost;
    168168}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp

    r190714 r190785  
    8484    }
    8585protected:
    86     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestNode(JSC::ExecState*);
     86    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    8787    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    8888};
    8989
    90 EncodedJSValue JSC_HOST_CALL JSTestNodeConstructor::constructJSTestNode(ExecState* state)
     90EncodedJSValue JSC_HOST_CALL JSTestNodeConstructor::construct(ExecState* state)
    9191{
    9292    auto* castedThis = jsCast<JSTestNodeConstructor*>(state->callee());
     
    113113ConstructType JSTestNodeConstructor::getConstructData(JSCell*, ConstructData& constructData)
    114114{
    115     constructData.native.function = constructJSTestNode;
     115    constructData.native.function = construct;
    116116    return ConstructTypeHost;
    117117}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r190714 r190785  
    366366    }
    367367protected:
    368     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestObj(JSC::ExecState*);
     368    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    369369    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    370370};
     
    469469COMPILE_ASSERT(0 == TestObj::readonly, TestObjEnumreadonlyIsWrongUseDoNotCheckConstants);
    470470
    471 EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* state)
     471EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::construct(ExecState* state)
    472472{
    473473    auto* castedThis = jsCast<JSTestObjConstructor*>(state->callee());
     
    503503ConstructType JSTestObjConstructor::getConstructData(JSCell*, ConstructData& constructData)
    504504{
    505     constructData.native.function = constructJSTestObj;
     505    constructData.native.function = construct;
    506506    return ConstructTypeHost;
    507507}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp

    r190714 r190785  
    8181    }
    8282protected:
    83     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors(JSC::ExecState*);
    84     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors1(JSC::ExecState*);
    85     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors2(JSC::ExecState*);
    86     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors3(JSC::ExecState*);
    87     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors4(JSC::ExecState*);
    88     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors5(JSC::ExecState*);
     83    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    8984    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    9085};
    9186
    92 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1(ExecState* state)
     87static inline EncodedJSValue constructJSTestOverloadedConstructors1(ExecState* state)
    9388{
    9489    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(state->callee());
     
    10297}
    10398
    104 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2(ExecState* state)
     99static inline EncodedJSValue constructJSTestOverloadedConstructors2(ExecState* state)
    105100{
    106101    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(state->callee());
     
    114109}
    115110
    116 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3(ExecState* state)
     111static inline EncodedJSValue constructJSTestOverloadedConstructors3(ExecState* state)
    117112{
    118113    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(state->callee());
     
    126121}
    127122
    128 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4(ExecState* state)
     123static inline EncodedJSValue constructJSTestOverloadedConstructors4(ExecState* state)
    129124{
    130125    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(state->callee());
     
    138133}
    139134
    140 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5(ExecState* state)
     135static inline EncodedJSValue constructJSTestOverloadedConstructors5(ExecState* state)
    141136{
    142137    auto* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(state->callee());
     
    148143}
    149144
    150 EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors(ExecState* state)
     145EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::construct(ExecState* state)
    151146{
    152147    size_t argsCount = std::min<size_t>(1, state->argumentCount());
    153148    JSValue arg0(state->argument(0));
    154149    if ((argsCount == 1 && ((arg0.isObject() && asObject(arg0)->inherits(JSArrayBuffer::info())))))
    155         return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1(state);
     150        return constructJSTestOverloadedConstructors1(state);
    156151    if ((argsCount == 1 && ((arg0.isObject() && asObject(arg0)->inherits(JSArrayBufferView::info())))))
    157         return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2(state);
     152        return constructJSTestOverloadedConstructors2(state);
    158153    if ((argsCount == 1 && ((arg0.isObject() && asObject(arg0)->inherits(JSBlob::info())))))
    159         return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3(state);
     154        return constructJSTestOverloadedConstructors3(state);
    160155    if (argsCount == 1)
    161         return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4(state);
     156        return constructJSTestOverloadedConstructors4(state);
    162157    if ()
    163         return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5(state);
     158        return constructJSTestOverloadedConstructors5(state);
    164159    if (argsCount < 1)
    165160        return throwVMError(state, createNotEnoughArgumentsError(state));
     
    185180ConstructType JSTestOverloadedConstructorsConstructor::getConstructData(JSCell*, ConstructData& constructData)
    186181{
    187     constructData.native.function = constructJSTestOverloadedConstructors;
     182    constructData.native.function = construct;
    188183    return ConstructTypeHost;
    189184}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r190714 r190785  
    118118    }
    119119protected:
    120     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestTypedefs(JSC::ExecState*);
     120    static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
    121121    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
    122122};
     
    143143};
    144144
    145 EncodedJSValue JSC_HOST_CALL JSTestTypedefsConstructor::constructJSTestTypedefs(ExecState* state)
     145EncodedJSValue JSC_HOST_CALL JSTestTypedefsConstructor::construct(ExecState* state)
    146146{
    147147    auto* castedThis = jsCast<JSTestTypedefsConstructor*>(state->callee());
     
    177177ConstructType JSTestTypedefsConstructor::getConstructData(JSCell*, ConstructData& constructData)
    178178{
    179     constructData.native.function = constructJSTestTypedefs;
     179    constructData.native.function = construct;
    180180    return ConstructTypeHost;
    181181}
Note: See TracChangeset for help on using the changeset viewer.