Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: WebCore/WebCore.pri
- ===================================================================
- --- WebCore/WebCore.pri (revision 64971)
- +++ WebCore/WebCore.pri (working copy)
- @@ -707,7 +707,7 @@
- cssprops.output = $${WC_GENERATED_SOURCES_DIR}/CSSPropertyNames.cpp
- cssprops.input = WALDOCSSPROPS
- cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssprops.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
- -cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES}
- +cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} $$cssprops.wkScript
- addExtraCompiler(cssprops)
- # GENERATOR 6-B:
- @@ -715,7 +715,7 @@
- cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/CSSValueKeywords.cpp
- cssvalues.input = WALDOCSSVALUES
- cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssvalues.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
- -cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES}
- +cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES} $$cssvalues.wkScript
- cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.h
- addExtraCompiler(cssvalues)
- Index: WebCore/ChangeLog
- ===================================================================
- --- WebCore/ChangeLog (revision 64971)
- +++ WebCore/ChangeLog (working copy)
- @@ -1,3 +1,41 @@
- +2010-08-09 Andras Becsi <abecsi@webkit.org>
- +
- + Reviewed by NOBODY (OOPS!).
- +
- + Undefined reference errors when linking due to gperf and inlining.
- + webkit.org/b/29244
- +
- + EFL CMake changes by Leandro Pereira <leandro@profusion.mobi>
- +
- + Refactor gperf code generation and usage to fix the debug build with gcc>4.4.
- + Hitherto gperf generated C code, these files were included in multiple C++ files across WebCore
- + to access the functionality provided. This resulted in debug build failure with newer gcc versions
- + because of a behaviour change of gcc, which disables C style inlining in debug mode.
- + The make-hash-tools.pl script lets gperf generate C++ code for all gperf files now, which are compiled
- + in their own compilation unit.
- + The functionality provided by the generated code is wrapped behind HashTools.h, so there is no need
- + for multiple inclusions of generated C files to access these functions.
- +
- + No new tests needed.
- +
- + * CMakeLists.txt:
- + * WebCore.vcproj/WebCore.vcproj:
- + * WebCore.gyp/WebCore.gyp:
- + * WebCore.pri:
- + * WebCore.xcodeproj/project.pbxproj:
- + * css/CSSParser.cpp:
- + * css/makeprop.pl:
- + * css/makevalues.pl:
- + * html/DocTypeStrings.gperf:
- + * html/HTMLDocument.cpp:
- + * html/HTMLEntityNames.gperf:
- + * html/HTMLEntityParser.cpp:
- + * html/LegacyHTMLDocumentParser.cpp:
- + * html/LegacyPreloadScanner.cpp:
- + * make-hash-tools.pl:
- + * platform/ColorData.gperf:
- + * platform/graphics/Color.cpp:
- +
- 2010-08-09 Ariya Hidayat <ariya@sencha.com>
- Reviewed by Kenneth Rohde Christiansen.
- Index: WebCore/WebCore.vcproj/WebCore.vcproj
- ===================================================================
- --- WebCore/WebCore.vcproj/WebCore.vcproj (revision 64971)
- +++ WebCore/WebCore.vcproj/WebCore.vcproj (working copy)
- @@ -545,6 +545,30 @@
- >
- </File>
- <File
- + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\HashTools.h"
- + >
- + </File>
- + <File
- + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\HTMLEntityNames.cpp"
- + >
- + </File>
- + <File
- + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\DocTypeStrings.cpp"
- + >
- + </File>
- + <File
- + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\CSSValueKeywords.cpp"
- + >
- + </File>
- + <File
- + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\CSSPropertyNames.cpp"
- + >
- + </File>
- + <File
- + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\ColorData.cpp"
- + >
- + </File>
- + <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\InspectorBackendDispatcher.cpp"
- >
- </File>
- Index: WebCore/WebCore.gyp/WebCore.gyp
- ===================================================================
- --- WebCore/WebCore.gyp/WebCore.gyp (revision 64971)
- +++ WebCore/WebCore.gyp/WebCore.gyp (working copy)
- @@ -607,7 +607,6 @@
- '<(SHARED_INTERMEDIATE_DIR)/webkit',
- '<(RULE_INPUT_PATH)',
- ],
- - 'process_outputs_as_sources': 0,
- },
- # Rule to build generated JavaScript (V8) bindings from .idl source.
- {
- @@ -702,6 +701,13 @@
- # in webcore_files.
- '<@(derived_sources_aggregate_files)',
- + # Additional .cpp files for HashTools.h
- + '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityNames.cpp',
- + '<(SHARED_INTERMEDIATE_DIR)/webkit/DocTypeStrings.cpp',
- + '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorData.cpp',
- + '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
- + '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
- +
- # Additional .cpp files from webcore_bindings_sources actions.
- '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
- Index: WebCore/make-hash-tools.pl
- ===================================================================
- --- WebCore/make-hash-tools.pl (revision 64971)
- +++ WebCore/make-hash-tools.pl (working copy)
- @@ -26,35 +26,181 @@
- my $outdir = $ARGV[0];
- shift;
- my $option = basename($ARGV[0],".gperf");
- +my $hashToolsHeader = "$outdir/HashTools.h";
- +sub createHashToolsHeader() {
- +
- +open HEADER, ">$hashToolsHeader" || die "Could not open $hashToolsHeader for writing";
- +print HEADER << "EOF";
- +/* This file is automatically generated by make-hash-tools.pl, do not edit */
- +
- +#ifndef HashTools_h
- +#define HashTools_h
- +
- +#include "wtf/Platform.h"
- +
- +namespace WebCore {
- +
- +struct Entity {
- + const char* name;
- + int code;
- +};
- +
- +struct PubIDInfo {
- + enum eMode {
- + eQuirks,
- + eQuirks3,
- + eAlmostStandards
- + };
- +
- + const char* name;
- + eMode mode_if_no_sysid;
- + eMode mode_if_sysid;
- +};
- +
- +struct NamedColor {
- + const char* name;
- + int RGBValue;
- +};
- +
- +struct Property {
- + const char* name;
- + int id;
- +};
- +
- +struct Value {
- + const char* name;
- + int id;
- +};
- +
- +const Entity* findEntity(register const char* str, register unsigned int len);
- +const PubIDInfo* findDoctypeEntry(register const char* str, register unsigned int len);
- +const NamedColor* findColor(register const char* str, register unsigned int len);
- +const Property* findProperty(register const char* str, register unsigned int len);
- +const Value* findValue(register const char* str, register unsigned int len);
- +
- +#if PLATFORM(CHROMIUM)
- +
- +const Entity* wordList();
- +const int wordListSize();
- +
- +#endif
- +
- +}
- +
- +#endif // HashTools_h
- +
- +EOF
- +close HEADER;
- +
- +}
- +
- +
- +
- switch ($option) {
- case "HTMLEntityNames" {
- - my $htmlEntityNamesGenerated = "$outdir/HTMLEntityNames.cpp";
- + createHashToolsHeader();
- +
- + my $htmlEntityNamesImpl = "$outdir/HTMLEntityNames.cpp";
- + my $htmlEntityNamesGenerated = "$outdir/HTMLEntityNamesHash.h";
- my $htmlEntityNamesGperf = $ARGV[0];
- shift;
- + open ENTITIES, ">$htmlEntityNamesImpl" || die "Could not open $htmlEntityNamesImpl for writing";
- + print ENTITIES << "EOF";
- +/* This file is automatically generated by make-hash-tools.pl, do not edit */
- +
- +#include "HashTools.h"
- +
- +namespace WebCore {
- +#include "HTMLEntityNamesHash.h"
- +
- +const Entity* findEntity(register const char* str, register unsigned int len)
- +{
- + return HTMLEntityHash::findEntityImpl(str, len);
- +}
- +
- +#if PLATFORM(CHROMIUM)
- +
- +const Entity* wordList()
- +{
- + return WebCore::entity_wordlist;
- +}
- +
- +const int wordListSize()
- +{
- + return sizeof(WebCore::entity_wordlist) / sizeof(Entity);
- +}
- +
- +#endif // PLATFORM(CHROMIUM)
- +
- +} // namespace WebCore
- +
- +EOF
- + close ENTITIES;
- +
- system("gperf --key-positions=\"*\" -D -s 2 $htmlEntityNamesGperf > $htmlEntityNamesGenerated") == 0 || die "calling gperf failed: $?";
- } # case "HTMLEntityNames"
- case "DocTypeStrings" {
- - my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp";
- + my $docTypeStringsImpl = "$outdir/DocTypeStrings.cpp";
- + my $docTypeStringsGenerated = "$outdir/DocTypeStringsHash.h";
- my $docTypeStringsGperf = $ARGV[0];
- shift;
- + open DOCTYPESTRINGS, ">$docTypeStringsImpl" || die "Could not open $docTypeStringsImpl for writing";
- + print DOCTYPESTRINGS << "EOF";
- +/* This file is automatically generated by make-hash-tools.pl, do not edit */
- +
- +#include "HashTools.h"
- +
- +namespace WebCore {
- +#include "DocTypeStringsHash.h"
- +
- +const PubIDInfo* findDoctypeEntry (register const char* str, register unsigned int len)
- +{
- + return DocTypeStringsHash::findDoctypeEntryImpl(str, len);
- +}
- +
- +}
- +
- +EOF
- + close DOCTYPESTRINGS;
- +
- system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?";
- } # case "DocTypeStrings"
- case "ColorData" {
- - my $colorDataGenerated = "$outdir/ColorData.cpp";
- - my $colorDataGperf = $ARGV[0];
- + my $colorDataImpl = "$outdir/ColorData.cpp";
- + my $colorDataGenerated = "$outdir/ColorDataHash.h";
- + my $colorDataGperf = $ARGV[0];
- shift;
- + open COLORDATA, ">$colorDataImpl" || die "Could not open $colorDataImpl for writing";
- + print COLORDATA << "EOF";
- +/* This file is automatically generated by make-hash-tools.pl, do not edit */
- +
- +#include "HashTools.h"
- +
- +namespace WebCore {
- +#include "ColorDataHash.h"
- +
- +const struct NamedColor* findColor (register const char* str, register unsigned int len)
- +{
- + return ColorDataHash::findColorImpl(str, len);
- +}
- +
- +}
- +
- +EOF
- + close COLORDATA;
- +
- system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?";
- } # case "ColorData"
- Index: WebCore/CMakeLists.txt
- ===================================================================
- --- WebCore/CMakeLists.txt (revision 64971)
- +++ WebCore/CMakeLists.txt (working copy)
- @@ -531,6 +531,10 @@
- ${DERIVED_SOURCES_DIR}/CSSGrammar.cpp
- ${DERIVED_SOURCES_DIR}/HTMLElementFactory.cpp
- ${DERIVED_SOURCES_DIR}/HTMLEntityNames.cpp
- + ${DERIVED_SOURCES_DIR}/DocTypeStrings.cpp
- + ${DERIVED_SOURCES_DIR}/CSSValueKeywords.cpp
- + ${DERIVED_SOURCES_DIR}/CSSPropertyNames.cpp
- + ${DERIVED_SOURCES_DIR}/ColorData.cpp
- ${DERIVED_SOURCES_DIR}/HTMLNames.cpp
- ${DERIVED_SOURCES_DIR}/JSHTMLElementWrapperFactory.cpp
- ${DERIVED_SOURCES_DIR}/MathMLElementFactory.cpp
- @@ -1820,9 +1824,11 @@
- LIST(APPEND WebCore_SOURCES ${JS_IDL_FILES} ${Inspector_IDL_FILES})
- -GENERATE_GPERF(${WEBCORE_DIR}/html/HTMLEntityNames.gperf)
- -GENERATE_GPERF(${WEBCORE_DIR}/platform/ColorData.gperf)
- -GENERATE_GPERF(${WEBCORE_DIR}/html/DocTypeStrings.gperf)
- +MAKE_HASH_TOOLS(${WEBCORE_DIR}/html/HTMLEntityNames)
- +MAKE_HASH_TOOLS(${WEBCORE_DIR}/html/DocTypeStrings)
- +MAKE_HASH_TOOLS(${DERIVED_SOURCES_DIR}/CSSValueKeywords)
- +MAKE_HASH_TOOLS(${DERIVED_SOURCES_DIR}/CSSPropertyNames)
- +MAKE_HASH_TOOLS(${WEBCORE_DIR}/platform/ColorData)
- GENERATE_TOKENIZER()
- GENERATE_USER_AGENT_STYLES()
- @@ -1833,6 +1839,7 @@
- GENERATE_CSS_PROPERTY_NAMES()
- GENERATE_CSS_VALUE_KEYWORDS()
- +ADD_SOURCE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_DIR}/HashTools.h HTMLEntityNames.cpp DocTypeStrings.cpp CSSValueKeywords.cpp CSSPropertyNames.cpp ColorData.cpp)
- ADD_SOURCE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_DIR}/CSSGrammar.cpp CSSValueKeywords.h)
- ADD_SOURCE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_DIR}/CSSGrammar.cpp CSSPropertyNames.h)
- ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSPrimitiveValueMappings.h CSSValueKeywords.h)
- Index: ChangeLog
- ===================================================================
- --- ChangeLog (revision 64971)
- +++ ChangeLog (working copy)
- @@ -1,3 +1,23 @@
- +2010-08-09 Andras Becsi <abecsi@webkit.org>
- +
- + Reviewed by NOBODY (OOPS!).
- +
- + Undefined reference errors when linking due to gperf and inlining.
- + webkit.org/b/29244
- +
- + EFL CMake changes by Leandro Pereira <leandro@profusion.mobi>
- +
- + Refactor gperf code generation and usage to fix the debug build with gcc>4.4.
- + Hitherto gperf generated C code, these files were included in multiple C++ files across WebCore
- + to access the functionality provided. This resulted in debug build failure with newer gcc versions
- + because of a behaviour change of gcc, which disables C style inlining in debug mode.
- + The make-hash-tools.pl script lets gperf generate C++ code for all gperf files now, which are compiled
- + in their own compilation unit.
- + The functionality provided by the generated code is wrapped behind HashTools.h, so there is no need
- + for multiple inclusions of generated C files to access these functions.
- +
- + * cmake/WebKitGenerators.cmake:
- +
- 2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com>
- Unreviewed, rolling out r64904.
Add Comment
Please, Sign In to add comment