Commit 37510bb3 authored by yaar@chromium.org's avatar yaar@chromium.org
Browse files

2010-05-19 Yaar Schnitman <yaar@chromium.org>

        Reviewed by Eric Seidel.

        Fixed warnings by JSC overloads changes. Also updated the binding reference files for JSC.
        https://bugs.webkit.org/show_bug.cgi?id=39390

        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 38b0fd77
2010-05-19 Yaar Schnitman <yaar@chromium.org>
Reviewed by Eric Seidel.
Fixed warnings by JSC overloads changes. Also updated the binding reference files for JSC.
https://bugs.webkit.org/show_bug.cgi?id=39390
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::):
2010-05-19 Darin Fisher <darin@chromium.org>
 
Reviewed by Nate Chapin.
......@@ -985,7 +985,7 @@ sub GenerateHeader
if ($numFunctions > 0) {
push(@headerContent,"// Functions\n\n");
foreach my $function (@{$dataNode->functions}) {
next if $function->{overloadIndex} > 1;
next if $function->{overloadIndex} && $function->{overloadIndex} > 1;
my $functionName = $codeGenerator->WK_lcfirst($className) . "PrototypeFunction" . $codeGenerator->WK_ucfirst($function->signature->name);
push(@headerContent, "JSC::JSValue JSC_HOST_CALL ${functionName}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);\n");
}
......@@ -1254,7 +1254,7 @@ sub GenerateImplementation
}
foreach my $function (@{$dataNode->functions}) {
next if $function->{overloadIndex} > 1;
next if $function->{overloadIndex} && $function->{overloadIndex} > 1;
my $name = $function->signature->name;
push(@hashKeys, $name);
......@@ -1781,7 +1781,7 @@ sub GenerateImplementation
my $functionName = $codeGenerator->WK_lcfirst($className) . "PrototypeFunction" . $codeGenerator->WK_ucfirst($function->signature->name);
if (@{$function->{overloads}} > 1) {
if ($function->{overloads} && @{$function->{overloads}} > 1) {
# Append a number to an overloaded method's name to make it unique:
$functionName = $functionName . $function->{overloadIndex};
}
......@@ -1953,7 +1953,7 @@ sub GenerateImplementation
}
push(@implContent, "}\n\n");
if (@{$function->{overloads}} > 1 && $function->{overloadIndex} == @{$function->{overloads}}) {
if ($function->{overloads} && @{$function->{overloads}} > 1 && $function->{overloadIndex} == @{$function->{overloads}}) {
# Generate a function dispatching call to the rest of the overloads.
GenerateOverloadedPrototypeFunction($function, $dataNode, $implClassName);
}
......
......@@ -44,13 +44,7 @@ static const HashTableValue JSTestInterfaceTableValues[2] =
};
#undef THUNK_GENERATOR
static JSC_CONST_HASHTABLE HashTable JSTestInterfaceTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTestInterfaceTableValues, 0 };
#else
{ 2, 1, JSTestInterfaceTableValues, 0 };
#endif
static JSC_CONST_HASHTABLE HashTable JSTestInterfaceTable = { 2, 1, JSTestInterfaceTableValues, 0 };
/* Hash table for constructor */
#if ENABLE(JIT)
#define THUNK_GENERATOR(generator) , generator
......@@ -64,13 +58,7 @@ static const HashTableValue JSTestInterfaceConstructorTableValues[1] =
};
#undef THUNK_GENERATOR
static JSC_CONST_HASHTABLE HashTable JSTestInterfaceConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTestInterfaceConstructorTableValues, 0 };
#else
{ 1, 0, JSTestInterfaceConstructorTableValues, 0 };
#endif
static JSC_CONST_HASHTABLE HashTable JSTestInterfaceConstructorTable = { 1, 0, JSTestInterfaceConstructorTableValues, 0 };
class JSTestInterfaceConstructor : public DOMConstructorObject {
public:
JSTestInterfaceConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
......@@ -129,13 +117,7 @@ static const HashTableValue JSTestInterfacePrototypeTableValues[1] =
};
#undef THUNK_GENERATOR
static JSC_CONST_HASHTABLE HashTable JSTestInterfacePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTestInterfacePrototypeTableValues, 0 };
#else
{ 1, 0, JSTestInterfacePrototypeTableValues, 0 };
#endif
static JSC_CONST_HASHTABLE HashTable JSTestInterfacePrototypeTable = { 1, 0, JSTestInterfacePrototypeTableValues, 0 };
const ClassInfo JSTestInterfacePrototype::s_info = { "TestInterfacePrototype", 0, &JSTestInterfacePrototypeTable, 0 };
JSObject* JSTestInterfacePrototype::self(ExecState* exec, JSGlobalObject* globalObject)
......
......@@ -66,13 +66,7 @@ static const HashTableValue JSTestObjTableValues[15] =
};
#undef THUNK_GENERATOR
static JSC_CONST_HASHTABLE HashTable JSTestObjTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 127, JSTestObjTableValues, 0 };
#else
{ 34, 31, JSTestObjTableValues, 0 };
#endif
static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 34, 31, JSTestObjTableValues, 0 };
/* Hash table for constructor */
#if ENABLE(JIT)
#define THUNK_GENERATOR(generator) , generator
......@@ -86,13 +80,7 @@ static const HashTableValue JSTestObjConstructorTableValues[1] =
};
#undef THUNK_GENERATOR
static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 0, JSTestObjConstructorTableValues, 0 };
#else
{ 1, 0, JSTestObjConstructorTableValues, 0 };
#endif
static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable = { 1, 0, JSTestObjConstructorTableValues, 0 };
class JSTestObjConstructor : public DOMConstructorObject {
public:
JSTestObjConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
......@@ -167,13 +155,7 @@ static const HashTableValue JSTestObjPrototypeTableValues[29] =
};
#undef THUNK_GENERATOR
static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 8191, JSTestObjPrototypeTableValues, 0 };
#else
{ 69, 63, JSTestObjPrototypeTableValues, 0 };
#endif
static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = { 69, 63, JSTestObjPrototypeTableValues, 0 };
const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", 0, &JSTestObjPrototypeTable, 0 };
JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment