Changeset 90709 in webkit
- Timestamp:
- Jul 10, 2011 7:55:23 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r90707 r90709 1 2011-07-10 Patrick Gansterer <paroga@webkit.org> 2 3 Remove array size from generated JSC binding tables 4 https://bugs.webkit.org/show_bug.cgi?id=64229 5 6 Reviewed by Brent Fulgham. 7 8 Because many items in the array are surrounded with #if(ENABLE_XXX) lines, 9 the array size isn't fix and correct in all cases. 10 So let the compiler calculate the correct size itself. 11 12 * bindings/scripts/CodeGeneratorJS.pm: 13 (GenerateHashTable): 14 * bindings/scripts/test/JS/JSTestInterface.cpp: 15 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 16 * bindings/scripts/test/JS/JSTestObj.cpp: 17 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 18 1 19 2011-07-10 Kenichi Ishibashi <bashi@chromium.org> 2 20 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r90680 r90709 2828 2828 2829 2829 # Dump the hash table 2830 my $count = scalar @{$keys} + 1;2831 2830 push(@implContent, "#if ENABLE(JIT)\n"); 2832 2831 push(@implContent, "#define THUNK_GENERATOR(generator) , generator\n"); … … 2834 2833 push(@implContent, "#define THUNK_GENERATOR(generator)\n"); 2835 2834 push(@implContent, "#endif\n"); 2836 push(@implContent, "\nstatic const HashTableValue $nameEntries\[ $count\] =\n\{\n");2835 push(@implContent, "\nstatic const HashTableValue $nameEntries\[\] =\n\{\n"); 2837 2836 $i = 0; 2838 2837 foreach my $key (@{$keys}) { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r87360 r90709 41 41 #endif 42 42 43 static const HashTableValue JSTestInterfaceTableValues[ 2] =43 static const HashTableValue JSTestInterfaceTableValues[] = 44 44 { 45 45 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, … … 56 56 #endif 57 57 58 static const HashTableValue JSTestInterfaceConstructorTableValues[ 1] =58 static const HashTableValue JSTestInterfaceConstructorTableValues[] = 59 59 { 60 60 { 0, 0, 0, 0 THUNK_GENERATOR(0) } … … 120 120 #endif 121 121 122 static const HashTableValue JSTestInterfacePrototypeTableValues[ 1] =122 static const HashTableValue JSTestInterfacePrototypeTableValues[] = 123 123 { 124 124 { 0, 0, 0, 0 THUNK_GENERATOR(0) } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r87360 r90709 42 42 #endif 43 43 44 static const HashTableValue JSTestMediaQueryListListenerTableValues[ 2] =44 static const HashTableValue JSTestMediaQueryListListenerTableValues[] = 45 45 { 46 46 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestMediaQueryListListenerConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, … … 57 57 #endif 58 58 59 static const HashTableValue JSTestMediaQueryListListenerConstructorTableValues[ 1] =59 static const HashTableValue JSTestMediaQueryListListenerConstructorTableValues[] = 60 60 { 61 61 { 0, 0, 0, 0 THUNK_GENERATOR(0) } … … 105 105 #endif 106 106 107 static const HashTableValue JSTestMediaQueryListListenerPrototypeTableValues[ 2] =107 static const HashTableValue JSTestMediaQueryListListenerPrototypeTableValues[] = 108 108 { 109 109 { "method", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestMediaQueryListListenerPrototypeFunctionMethod), (intptr_t)1 THUNK_GENERATOR(0) }, -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r89315 r90709 56 56 #endif 57 57 58 static const HashTableValue JSTestObjTableValues[ 37] =58 static const HashTableValue JSTestObjTableValues[] = 59 59 { 60 60 { "readOnlyIntAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyIntAttr), (intptr_t)0 THUNK_GENERATOR(0) }, … … 112 112 #endif 113 113 114 static const HashTableValue JSTestObjConstructorTableValues[ 12] =114 static const HashTableValue JSTestObjConstructorTableValues[] = 115 115 { 116 116 { "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0 THUNK_GENERATOR(0) }, … … 184 184 #endif 185 185 186 static const HashTableValue JSTestObjPrototypeTableValues[ 48] =186 static const HashTableValue JSTestObjPrototypeTableValues[] = 187 187 { 188 188 { "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0 THUNK_GENERATOR(0) }, -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r87360 r90709 42 42 #endif 43 43 44 static const HashTableValue JSTestSerializedScriptValueInterfaceTableValues[ 3] =44 static const HashTableValue JSTestSerializedScriptValueInterfaceTableValues[] = 45 45 { 46 46 { "value", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSerializedScriptValueInterfaceValue), (intptr_t)0 THUNK_GENERATOR(0) }, … … 58 58 #endif 59 59 60 static const HashTableValue JSTestSerializedScriptValueInterfaceConstructorTableValues[ 1] =60 static const HashTableValue JSTestSerializedScriptValueInterfaceConstructorTableValues[] = 61 61 { 62 62 { 0, 0, 0, 0 THUNK_GENERATOR(0) } … … 106 106 #endif 107 107 108 static const HashTableValue JSTestSerializedScriptValueInterfacePrototypeTableValues[ 1] =108 static const HashTableValue JSTestSerializedScriptValueInterfacePrototypeTableValues[] = 109 109 { 110 110 { 0, 0, 0, 0 THUNK_GENERATOR(0) }
Note: See TracChangeset
for help on using the changeset viewer.