Changeset 61091 in webkit
- Timestamp:
- Jun 13, 2010 6:54:07 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r61089 r61091 1 2010-06-13 Andras Becsi <abecsi@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Centralize the gperf code generation commands into make-hash-tools.pl 6 to avoid redundancy across multiple build systems. 7 Do this in preparation of refactoring the usage of these generated 8 sources to fix the debug linking error on Linux with gcc >= 4.4.0. 9 10 webkit.org/b/29244 11 12 No functionality change, so no new tests needed. 13 14 * DerivedSources.make: 15 * GNUmakefile.am: 16 * WebCore.gyp/WebCore.gyp: 17 * WebCore.gyp/scripts/rule_gperf.py: Removed. 18 * WebCore.pri: 19 * WebCore.xcodeproj/project.pbxproj: 20 * css/CSSParser.cpp: 21 (WebCore::cssPropertyID): 22 (WebCore::cssValueKeywordID): 23 * css/makeprop.pl: 24 * css/makevalues.pl: 25 * html/DocTypeStrings.gperf: 26 * html/HTML5EntityParser.cpp: 27 * html/HTMLDocumentParser.cpp: 28 * html/HTMLEntityNames.gperf: 29 * html/PreloadScanner.cpp: 30 * make-hash-tools.pl: Added. 31 * platform/ColorData.gperf: 32 * platform/graphics/Color.cpp: 33 1 34 2010-06-13 Noam Rosenthal <noam.rosenthal@nokia.com> 2 35 -
trunk/WebCore/DerivedSources.make
r60902 r61091 474 474 CSSPropertyNames.h \ 475 475 CSSValueKeywords.h \ 476 ColorData.c \476 ColorData.cpp \ 477 477 DocTypeStrings.cpp \ 478 478 HTMLElementFactory.cpp \ 479 HTMLEntityNames.c \479 HTMLEntityNames.cpp \ 480 480 HTMLNames.cpp \ 481 481 WMLElementFactory.cpp \ … … 565 565 # DOCTYPE strings 566 566 567 DocTypeStrings.cpp : html/DocTypeStrings.gperf 568 gperf -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $< > $@567 DocTypeStrings.cpp : html/DocTypeStrings.gperf $(WebCore)/make-hash-tools.pl 568 perl $(WebCore)/make-hash-tools.pl . $(WebCore)/html/DocTypeStrings.gperf 569 569 570 570 # -------- … … 572 572 # HTML entity names 573 573 574 HTMLEntityNames.c : html/HTMLEntityNames.gperf575 gperf -a -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 $< > $@574 HTMLEntityNames.cpp : html/HTMLEntityNames.gperf $(WebCore)/make-hash-tools.pl 575 perl $(WebCore)/make-hash-tools.pl . $(WebCore)/html/HTMLEntityNames.gperf 576 576 577 577 # -------- … … 579 579 # color names 580 580 581 ColorData.c : platform/ColorData.gperf582 gperf -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@581 ColorData.cpp : platform/ColorData.gperf $(WebCore)/make-hash-tools.pl 582 perl $(WebCore)/make-hash-tools.pl . $(WebCore)/platform/ColorData.gperf 583 583 584 584 # -------- -
trunk/WebCore/GNUmakefile.am
r61085 r61091 84 84 DerivedSources/DocTypeStrings.cpp \ 85 85 DerivedSources/tokenizer.cpp \ 86 DerivedSources/ColorData.c \86 DerivedSources/ColorData.cpp \ 87 87 DerivedSources/webkit/webkitdomdummy.c 88 88 … … 93 93 DerivedSources/CSSValueKeywords.h \ 94 94 DerivedSources/HTMLElementFactory.cpp \ 95 DerivedSources/HTMLEntityNames.c \95 DerivedSources/HTMLEntityNames.cpp \ 96 96 DerivedSources/HTMLNames.cpp \ 97 97 DerivedSources/JSHTMLElementWrapperFactory.cpp \ … … 3807 3807 3808 3808 # DOCTYPE strings 3809 DerivedSources/DocTypeStrings.cpp : $(WebCore)/html/DocTypeStrings.gperf 3810 $( AM_V_GEN)$(GPERF) -CEot -I -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $(WebCore)/html/DocTypeStrings.gperf > $@3809 DerivedSources/DocTypeStrings.cpp : $(WebCore)/html/DocTypeStrings.gperf $(WebCore)/make-hash-tools.pl 3810 $(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES) $(WebCore)/html/DocTypeStrings.gperf 3811 3811 3812 3812 # HTML entity names 3813 DerivedSources/HTMLEntityNames.c : $(WebCore)/html/HTMLEntityNames.gperf 3814 $(AM_V_GEN)$(GPERF) -a -I -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 \ 3815 $(WebCore)/html/HTMLEntityNames.gperf > $@ 3813 DerivedSources/HTMLEntityNames.cpp : $(WebCore)/html/HTMLEntityNames.gperf $(WebCore)/make-hash-tools.pl 3814 $(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES) $(WebCore)/html/HTMLEntityNames.gperf 3816 3815 3817 3816 # color names 3818 DerivedSources/ColorData.c : $(WebCore)/platform/ColorData.gperf3819 $( AM_V_GEN)$(GPERF) -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@3817 DerivedSources/ColorData.cpp: $(WebCore)/platform/ColorData.gperf $(WebCore)/make-hash-tools.pl 3818 $(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES) $(WebCore)/platform/ColorData.gperf 3820 3819 3821 3820 # CSS tokenizer -
trunk/WebCore/WebCore.gyp/WebCore.gyp
r60326 r61091 315 315 ], 316 316 'outputs': [ 317 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.c ',317 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp', 318 318 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.h', 319 319 ], … … 532 532 'rule_name': 'gperf', 533 533 'extension': 'gperf', 534 # gperf output is only ever #included by other source files. As535 # such, process_outputs_as_sources is off. Some gperf output is536 # #included as *.c and some as *.cpp. Since there's no way to tell537 # which one will be needed in a rule definition, declare both as538 # outputs. The harness script will generate one file and copy it to539 # the other.540 534 # 541 # This rule places outputs in SHARED_INTERMEDIATE_DIR because glue 542 # needs access to HTMLEntityNames.c. 543 'outputs': [ 544 '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).c', 535 # gperf outputs are generated by WebCore/make-hash-tools.pl 536 # 537 'outputs': [ 545 538 '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp', 546 539 ], 547 'action': [ 548 'python', 549 'scripts/rule_gperf.py', 540 'dependencies': [ 541 '../make-hash-tools.pl', 542 ], 543 'action': [ 544 'perl', 545 '../make-hash-tools.pl', 546 '<(SHARED_INTERMEDIATE_DIR)/webkit', 550 547 '<(RULE_INPUT_PATH)', 551 '<(SHARED_INTERMEDIATE_DIR)/webkit'552 548 ], 553 549 'process_outputs_as_sources': 0, -
trunk/WebCore/WebCore.pri
r60902 r61091 182 182 TOKENIZER = $$PWD/css/tokenizer.flex 183 183 184 DOCTYPESTRINGS = $$PWD/html/DocTypeStrings.gperf184 DOCTYPESTRINGS_GPERF = $$PWD/html/DocTypeStrings.gperf 185 185 186 186 CSSBISON = $$PWD/css/CSSGrammar.y … … 194 194 ENTITIES_GPERF = $$PWD/html/HTMLEntityNames.gperf 195 195 196 COLORDAT _GPERF = $$PWD/platform/ColorData.gperf196 COLORDATA_GPERF = $$PWD/platform/ColorData.gperf 197 197 198 198 WALDOCSSPROPS = $$PWD/css/CSSPropertyNames.in … … 663 663 664 664 # GENERATOR 6-A: 665 cssprops.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp 665 cssprops.wkScript = $$PWD/css/makeprop.pl 666 cssprops.output = $${WC_GENERATED_SOURCES_DIR}/CSSPropertyNames.cpp 666 667 cssprops.input = WALDOCSSPROPS 667 cssprops.wkScript = $$PWD/css/makeprop.pl668 668 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 669 669 cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} … … 671 671 672 672 # GENERATOR 6-B: 673 cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.c 673 cssvalues.wkScript = $$PWD/css/makevalues.pl 674 cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/CSSValueKeywords.cpp 674 675 cssvalues.input = WALDOCSSVALUES 675 cssvalues.wkScript = $$PWD/css/makevalues.pl676 676 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 677 677 cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES} … … 730 730 731 731 # GENERATOR 8-A: 732 entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c 732 entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.cpp 733 733 entities.input = ENTITIES_GPERF 734 entities.commands = gperf -a -L ANSI-C -C -G -c -o -t --includes --key-positions="*" -N findEntity -D -s 2 < $$PWD/html/HTMLEntityNames.gperf > $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c 734 entities.wkScript = $$PWD/make-hash-tools.pl 735 entities.commands = perl $$entities.wkScript $${WC_GENERATED_SOURCES_DIR} $$ENTITIES_GPERF 735 736 entities.clean = ${QMAKE_FILE_OUT} 737 entities.depends = $$PWD/make-hash-tools.pl 736 738 addExtraCompiler(entities) 737 739 738 740 # GENERATOR 8-B: 739 doctypestrings.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp 740 doctypestrings.input = DOCTYPESTRINGS 741 doctypestrings.commands = gperf -CEot -L ANSI-C --includes --key-positions="*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT} 741 doctypestrings.output = $${WC_GENERATED_SOURCES_DIR}/DocTypeStrings.cpp 742 doctypestrings.input = DOCTYPESTRINGS_GPERF 743 doctypestrings.wkScript = $$PWD/make-hash-tools.pl 744 doctypestrings.commands = perl $$doctypestrings.wkScript $${WC_GENERATED_SOURCES_DIR} $$DOCTYPESTRINGS_GPERF 742 745 doctypestrings.clean = ${QMAKE_FILE_OUT} 746 doctypestrings.depends = $$PWD/make-hash-tools.pl 743 747 addExtraCompiler(doctypestrings) 744 748 745 749 # GENERATOR 8-C: 746 colordata.output = $${WC_GENERATED_SOURCES_DIR}/ColorData.c 747 colordata.input = COLORDAT_GPERF 748 colordata.commands = gperf -CDEot -L ANSI-C --includes --key-positions="*" -N findColor -D -s 2 < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT} 750 colordata.output = $${WC_GENERATED_SOURCES_DIR}/ColorData.cpp 751 colordata.input = COLORDATA_GPERF 752 colordata.wkScript = $$PWD/make-hash-tools.pl 753 colordata.commands = perl $$colordata.wkScript $${WC_GENERATED_SOURCES_DIR} $$COLORDATA_GPERF 754 colordata.clean = ${QMAKE_FILE_OUT} 755 colordata.depends = $$PWD/make-hash-tools.pl 749 756 addExtraCompiler(colordata) 750 757 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r61073 r61091 6893 6893 65653F2B0D9727D200CA9723 /* SVGAltGlyphElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAltGlyphElement.h; sourceTree = "<group>"; }; 6894 6894 65653F2C0D9727D200CA9723 /* SVGAltGlyphElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGAltGlyphElement.idl; sourceTree = "<group>"; }; 6895 656580ED09D12B20000E61D7 /* CSSPropertyNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPropertyNames.cpp; sourceTree = "<group>"; };6896 6895 656580EE09D12B20000E61D7 /* CSSPropertyNames.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSPropertyNames.gperf; sourceTree = "<group>"; }; 6897 6896 656580EF09D12B20000E61D7 /* CSSPropertyNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSPropertyNames.h; sourceTree = "<group>"; }; 6898 6565811C09D12DB2000E61D7 /* DocTypeStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DocTypeStrings.cpp; sourceTree = "<group>"; };6899 6897 6565814409D13043000E61D7 /* CSSGrammar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGrammar.cpp; sourceTree = "<group>"; }; 6900 6565814609D13043000E61D7 /* CSSValueKeywords.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = CSSValueKeywords.c; sourceTree = "<group>"; };6901 6898 6565814709D13043000E61D7 /* CSSValueKeywords.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSValueKeywords.gperf; sourceTree = "<group>"; }; 6902 6899 6565814809D13043000E61D7 /* CSSValueKeywords.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSValueKeywords.h; sourceTree = "<group>"; }; 6903 6565814B09D13043000E61D7 /* HTMLEntityNames.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = HTMLEntityNames.c; sourceTree = "<group>"; };6904 6900 6565814C09D13043000E61D7 /* tokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tokenizer.cpp; sourceTree = "<group>"; }; 6905 6901 656581AC09D14EE6000E61D7 /* CharsetData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CharsetData.cpp; sourceTree = "<group>"; }; 6906 656581AD09D14EE6000E61D7 /* ColorData.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ColorData.c; sourceTree = "<group>"; };6907 6902 656581AE09D14EE6000E61D7 /* UserAgentStyleSheets.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UserAgentStyleSheets.h; sourceTree = "<group>"; }; 6908 6903 656581AF09D14EE6000E61D7 /* UserAgentStyleSheetsData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UserAgentStyleSheetsData.cpp; sourceTree = "<group>"; }; … … 10551 10546 E1FF57A20F01255B00891EBB /* ThreadGlobalData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadGlobalData.h; sourceTree = "<group>"; }; 10552 10547 E1FF57A50F01256B00891EBB /* ThreadGlobalData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadGlobalData.cpp; sourceTree = "<group>"; }; 10548 E406F3FA1198304D009D59D6 /* DocTypeStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocTypeStrings.cpp; path = DocTypeStrings.cpp; sourceTree = "<group>"; }; 10549 E406F3FB1198307D009D59D6 /* ColorData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorData.cpp; path = ColorData.cpp; sourceTree = "<group>"; }; 10550 E406F4021198329A009D59D6 /* HTMLEntityNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLEntityNames.cpp; path = HTMLEntityNames.cpp; sourceTree = "<group>"; }; 10551 E41EA038119836DB00710BC5 /* CSSPropertyNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSPropertyNames.cpp; path = CSSPropertyNames.cpp; sourceTree = "<group>"; }; 10552 E41EA0391198374900710BC5 /* CSSValueKeywords.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSValueKeywords.cpp; path = CSSValueKeywords.cpp; sourceTree = "<group>"; }; 10553 10553 E415F10C0D9A05870033CE97 /* ElementTimeControl.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ElementTimeControl.idl; sourceTree = "<group>"; }; 10554 10554 E415F1680D9A165D0033CE97 /* DOMElementTimeControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMElementTimeControl.h; sourceTree = "<group>"; }; … … 11847 11847 isa = PBXGroup; 11848 11848 children = ( 11849 E41EA0391198374900710BC5 /* CSSValueKeywords.cpp */, 11850 E41EA038119836DB00710BC5 /* CSSPropertyNames.cpp */, 11851 E406F4021198329A009D59D6 /* HTMLEntityNames.cpp */, 11852 E406F3FB1198307D009D59D6 /* ColorData.cpp */, 11853 E406F3FA1198304D009D59D6 /* DocTypeStrings.cpp */, 11849 11854 656581AC09D14EE6000E61D7 /* CharsetData.cpp */, 11850 656581AD09D14EE6000E61D7 /* ColorData.c */,11851 11855 6565814409D13043000E61D7 /* CSSGrammar.cpp */, 11852 11856 650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */, 11853 656580ED09D12B20000E61D7 /* CSSPropertyNames.cpp */,11854 11857 656580EE09D12B20000E61D7 /* CSSPropertyNames.gperf */, 11855 11858 656580EF09D12B20000E61D7 /* CSSPropertyNames.h */, 11856 6565814609D13043000E61D7 /* CSSValueKeywords.c */,11857 11859 6565814709D13043000E61D7 /* CSSValueKeywords.gperf */, 11858 11860 6565814809D13043000E61D7 /* CSSValueKeywords.h */, 11859 6565811C09D12DB2000E61D7 /* DocTypeStrings.cpp */,11860 11861 A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */, 11861 11862 A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */, 11862 6565814B09D13043000E61D7 /* HTMLEntityNames.c */,11863 11863 A8D06B380A265DCD005E7203 /* HTMLNames.cpp */, 11864 11864 A8D06B370A265DCD005E7203 /* HTMLNames.h */, -
trunk/WebCore/css/CSSParser.cpp
r60849 r61091 90 90 91 91 #include "CSSPropertyNames.cpp" 92 #include "CSSValueKeywords.c "92 #include "CSSValueKeywords.cpp" 93 93 94 94 namespace WebCore { … … 5561 5561 } 5562 5562 5563 const props* hashTableEntry = findProp(name, length);5563 const Property* hashTableEntry = findProperty(name, length); 5564 5564 return hashTableEntry ? hashTableEntry->id : 0; 5565 5565 } … … 5603 5603 } 5604 5604 5605 const css_value* hashTableEntry = findValue(buffer, length);5605 const Value* hashTableEntry = findValue(buffer, length); 5606 5606 return hashTableEntry ? hashTableEntry->id : 0; 5607 5607 } -
trunk/WebCore/css/makeprop.pl
r46237 r61091 6 6 # Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 7 7 # Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 8 # Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged 8 9 # 9 10 # This library is free software; you can redistribute it and/or … … 40 41 #include \"CSSPropertyNames.h\" 41 42 %} 42 struct props { 43 %struct-type 44 struct Property { 43 45 const char* name; 44 46 int id; 45 47 }; 48 %language=ANSI-C 49 %readonly-tables 50 %global-table 51 %compare-strncmp 52 %define lookup-function-name findProperty 53 %define hash-function-name propery_hash_function 54 %define word-array-name property_wordlist 55 %includes 56 %enum 46 57 %% 47 58 EOF … … 89 100 const char* getPropertyName(CSSPropertyID); 90 101 91 #endif 102 #endif // CSSPropertyNames_h 103 92 104 EOF 93 105 94 106 close HEADER; 95 107 96 system("gperf - a -L ANSI-C -E -C -c -o -t --key-positions=\"*\" -NfindProp -Hhash_prop -Wwordlist_prop -D-s 2 CSSPropertyNames.gperf > CSSPropertyNames.cpp") == 0 || die "calling gperf failed: $?";108 system("gperf --key-positions=\"*\" -D -n -s 2 CSSPropertyNames.gperf > CSSPropertyNames.cpp") == 0 || die "calling gperf failed: $?"; 97 109 98 110 open C, ">>CSSPropertyNames.cpp" || die "Could not open CSSPropertyNames.cpp for writing"; -
trunk/WebCore/css/makevalues.pl
r49584 r61091 6 6 # Copyright (C) 2007 Apple Inc. All rights reserved. 7 7 # Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 8 # Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged 8 9 # 9 10 # This library is free software; you can redistribute it and/or … … 41 42 #include \"CSSValueKeywords.h\" 42 43 %} 43 struct css_value { 44 %struct-type 45 struct Value { 44 46 const char* name; 45 47 int id; 46 48 }; 49 %language=ANSI-C 50 %readonly-tables 51 %compare-strncmp 52 %define lookup-function-name findValue 53 %define hash-function-name value_hash_function 54 %define word-array-name value_word_list 55 %includes 56 %enum 47 57 %% 48 58 EOF … … 60 70 /* This file is automatically generated from CSSValueKeywords.in by makevalues, do not edit */ 61 71 62 #ifndef CSSValue s_h63 #define CSSValue s_h72 #ifndef CSSValueKeywords_h 73 #define CSSValueKeywords_h 64 74 65 75 const int CSSValueInvalid = 0; … … 83 93 const char* getValueName(unsigned short id); 84 94 85 #endif 95 #endif // CSSValueKeywords_h 86 96 EOF 87 97 close HEADER; 88 98 89 system("gperf - L ANSI-C -E -C -n -o -t --key-positions=\"*\" -NfindValue -Hhash_val -Wwordlist_value -D CSSValueKeywords.gperf > CSSValueKeywords.c") == 0 || die "calling gperf failed: $?";99 system("gperf --key-positions=\"*\" -D -n -s 2 CSSValueKeywords.gperf > CSSValueKeywords.cpp") == 0 || die "calling gperf failed: $?"; 90 100 91 open C, ">>CSSValueKeywords.c " || die "Could not open CSSValueKeywords.cfor writing";101 open C, ">>CSSValueKeywords.cpp" || die "Could not open CSSValueKeywords.cpp for writing"; 92 102 print C "static const char * const valueList[] = {\n"; 93 103 print C "\"\",\n"; -
trunk/WebCore/html/DocTypeStrings.gperf
r13397 r61091 1 %struct-type 1 2 struct PubIDInfo { 2 3 enum eMode { … … 10 11 eMode mode_if_sysid; 11 12 } 13 %language=ANSI-C 14 %readonly-tables 15 %global-table 16 %compare-strncmp 17 %define initializer-suffix ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards 18 %define lookup-function-name findDoctypeEntry 19 %define hash-function-name doctype_hash_function 20 %includes 21 %enum 12 22 %% 13 23 "+//silmaril//dtd html pro v0r11 19970101//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3 -
trunk/WebCore/html/HTML5EntityParser.cpp
r60941 r61091 34 34 #ifdef __GNUC__ 35 35 // The main tokenizer includes this too so we are getting two copies of the data. However, this way the code gets inlined. 36 #include "HTMLEntityNames.c "36 #include "HTMLEntityNames.cpp" 37 37 #else 38 38 // Not inlined for non-GCC compilers -
trunk/WebCore/html/HTMLDocumentParser.cpp
r61073 r61091 56 56 #include <wtf/CurrentTime.h> 57 57 58 #include "HTMLEntityNames.c "58 #include "HTMLEntityNames.cpp" 59 59 60 60 #define PRELOAD_SCANNER_ENABLED 1 -
trunk/WebCore/html/HTMLEntityNames.gperf
r39556 r61091 22 22 23 23 HTMLEntityNames.gperf: input file to generate a hash table for entities 24 HTMLEntityNames.c: DO NOT EDIT! generated by the command 25 "gperf -a -L "ANSI-C" -C -G -c -o -t -k '*' -NfindEntity -D -s 2 HTMLEntityNames.gperf > entities.c" 26 from HTMLEntityNames.gperf 24 HTMLEntityNames.cpp: DO NOT EDIT! generated by WebCore/make-hash-tools.pl 27 25 */ 28 26 %} 27 %struct-type 29 28 struct Entity { 30 29 const char *name; 31 30 int code; 32 31 }; 32 %language=ANSI-C 33 %readonly-tables 34 %global-table 35 %compare-strncmp 36 %define lookup-function-name findEntity 37 %define hash-function-name entity_hash_function 38 %includes 39 %enum 33 40 %% 34 41 AElig, 0x00c6 -
trunk/WebCore/html/PreloadScanner.cpp
r59511 r61091 48 48 #ifdef __GNUC__ 49 49 // The main tokenizer includes this too so we are getting two copies of the data. However, this way the code gets inlined. 50 #include "HTMLEntityNames.c "50 #include "HTMLEntityNames.cpp" 51 51 #else 52 52 // Not inlined for non-GCC compilers -
trunk/WebCore/platform/ColorData.gperf
r12340 r61091 1 struct NamedColor { const char *name; int RGBValue; }; 1 %struct-type 2 struct NamedColor { 3 const char *name; 4 int RGBValue; 5 }; 6 %language=ANSI-C 7 %readonly-tables 8 %global-table 9 %compare-strncmp 10 %define lookup-function-name findColor 11 %define hash-function-name colordata_hash_function 12 %includes 13 %enum 2 14 %% 3 15 aliceblue, 0xf0f8ff -
trunk/WebCore/platform/graphics/Color.cpp
r59768 r61091 32 32 #include <wtf/MathExtras.h> 33 33 34 #include "ColorData.c "34 #include "ColorData.cpp" 35 35 36 36 using namespace std; -
trunk/WebKit/chromium/ChangeLog
r61073 r61091 1 2010-06-13 Andras Becsi <abecsi@inf.u-szeged.hu> 2 3 Reviewed by Darin Adler. 4 5 Centralize the gperf code generation commands into make-hash-tools.pl 6 to avoid redundancy across multiple build systems. 7 Do this in preparation of refactoring the usage of these generated 8 sources to fix the debug linking error on Linux with gcc >= 4.4.0. 9 10 webkit.org/b/29244 11 12 * src/WebEntities.cpp: 13 1 14 2010-06-11 Eric Seidel <eric@webkit.org> 2 15 -
trunk/WebKit/chromium/src/WebEntities.cpp
r61073 r61091 48 48 // this is low priority since the data is less than 4K. We use anonymous 49 49 // namespace to prevent name collisions. 50 #include "HTMLEntityNames.c " // NOLINT50 #include "HTMLEntityNames.cpp" // NOLINT 51 51 } 52 52
Note: See TracChangeset
for help on using the changeset viewer.