Guest User

Untitled

a guest
Jun 3rd, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.33 KB | None | 0 0
  1. Index: WebCore/WebCore.pri
  2. ===================================================================
  3. --- WebCore/WebCore.pri (revision 64971)
  4. +++ WebCore/WebCore.pri (working copy)
  5. @@ -707,7 +707,7 @@
  6. cssprops.output = $${WC_GENERATED_SOURCES_DIR}/CSSPropertyNames.cpp
  7. cssprops.input = WALDOCSSPROPS
  8. 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
  9. -cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES}
  10. +cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} $$cssprops.wkScript
  11. addExtraCompiler(cssprops)
  12.  
  13. # GENERATOR 6-B:
  14. @@ -715,7 +715,7 @@
  15. cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/CSSValueKeywords.cpp
  16. cssvalues.input = WALDOCSSVALUES
  17. 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
  18. -cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES}
  19. +cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES} $$cssvalues.wkScript
  20. cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.h
  21. addExtraCompiler(cssvalues)
  22.  
  23. Index: WebCore/ChangeLog
  24. ===================================================================
  25. --- WebCore/ChangeLog (revision 64971)
  26. +++ WebCore/ChangeLog (working copy)
  27. @@ -1,3 +1,41 @@
  28. +2010-08-09 Andras Becsi <abecsi@webkit.org>
  29. +
  30. + Reviewed by NOBODY (OOPS!).
  31. +
  32. + Undefined reference errors when linking due to gperf and inlining.
  33. + webkit.org/b/29244
  34. +
  35. + EFL CMake changes by Leandro Pereira <leandro@profusion.mobi>
  36. +
  37. + Refactor gperf code generation and usage to fix the debug build with gcc>4.4.
  38. + Hitherto gperf generated C code, these files were included in multiple C++ files across WebCore
  39. + to access the functionality provided. This resulted in debug build failure with newer gcc versions
  40. + because of a behaviour change of gcc, which disables C style inlining in debug mode.
  41. + The make-hash-tools.pl script lets gperf generate C++ code for all gperf files now, which are compiled
  42. + in their own compilation unit.
  43. + The functionality provided by the generated code is wrapped behind HashTools.h, so there is no need
  44. + for multiple inclusions of generated C files to access these functions.
  45. +
  46. + No new tests needed.
  47. +
  48. + * CMakeLists.txt:
  49. + * WebCore.vcproj/WebCore.vcproj:
  50. + * WebCore.gyp/WebCore.gyp:
  51. + * WebCore.pri:
  52. + * WebCore.xcodeproj/project.pbxproj:
  53. + * css/CSSParser.cpp:
  54. + * css/makeprop.pl:
  55. + * css/makevalues.pl:
  56. + * html/DocTypeStrings.gperf:
  57. + * html/HTMLDocument.cpp:
  58. + * html/HTMLEntityNames.gperf:
  59. + * html/HTMLEntityParser.cpp:
  60. + * html/LegacyHTMLDocumentParser.cpp:
  61. + * html/LegacyPreloadScanner.cpp:
  62. + * make-hash-tools.pl:
  63. + * platform/ColorData.gperf:
  64. + * platform/graphics/Color.cpp:
  65. +
  66. 2010-08-09 Ariya Hidayat <ariya@sencha.com>
  67.  
  68. Reviewed by Kenneth Rohde Christiansen.
  69. Index: WebCore/WebCore.vcproj/WebCore.vcproj
  70. ===================================================================
  71. --- WebCore/WebCore.vcproj/WebCore.vcproj (revision 64971)
  72. +++ WebCore/WebCore.vcproj/WebCore.vcproj (working copy)
  73. @@ -545,6 +545,30 @@
  74. >
  75. </File>
  76. <File
  77. + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\HashTools.h"
  78. + >
  79. + </File>
  80. + <File
  81. + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\HTMLEntityNames.cpp"
  82. + >
  83. + </File>
  84. + <File
  85. + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\DocTypeStrings.cpp"
  86. + >
  87. + </File>
  88. + <File
  89. + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\CSSValueKeywords.cpp"
  90. + >
  91. + </File>
  92. + <File
  93. + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\CSSPropertyNames.cpp"
  94. + >
  95. + </File>
  96. + <File
  97. + RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\ColorData.cpp"
  98. + >
  99. + </File>
  100. + <File
  101. RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\InspectorBackendDispatcher.cpp"
  102. >
  103. </File>
  104. Index: WebCore/WebCore.gyp/WebCore.gyp
  105. ===================================================================
  106. --- WebCore/WebCore.gyp/WebCore.gyp (revision 64971)
  107. +++ WebCore/WebCore.gyp/WebCore.gyp (working copy)
  108. @@ -607,7 +607,6 @@
  109. '<(SHARED_INTERMEDIATE_DIR)/webkit',
  110. '<(RULE_INPUT_PATH)',
  111. ],
  112. - 'process_outputs_as_sources': 0,
  113. },
  114. # Rule to build generated JavaScript (V8) bindings from .idl source.
  115. {
  116. @@ -702,6 +701,13 @@
  117. # in webcore_files.
  118. '<@(derived_sources_aggregate_files)',
  119.  
  120. + # Additional .cpp files for HashTools.h
  121. + '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityNames.cpp',
  122. + '<(SHARED_INTERMEDIATE_DIR)/webkit/DocTypeStrings.cpp',
  123. + '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorData.cpp',
  124. + '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
  125. + '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
  126. +
  127. # Additional .cpp files from webcore_bindings_sources actions.
  128. '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
  129. '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
  130. Index: WebCore/make-hash-tools.pl
  131. ===================================================================
  132. --- WebCore/make-hash-tools.pl (revision 64971)
  133. +++ WebCore/make-hash-tools.pl (working copy)
  134. @@ -26,35 +26,181 @@
  135. my $outdir = $ARGV[0];
  136. shift;
  137. my $option = basename($ARGV[0],".gperf");
  138. +my $hashToolsHeader = "$outdir/HashTools.h";
  139.  
  140. +sub createHashToolsHeader() {
  141. +
  142. +open HEADER, ">$hashToolsHeader" || die "Could not open $hashToolsHeader for writing";
  143. +print HEADER << "EOF";
  144. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  145. +
  146. +#ifndef HashTools_h
  147. +#define HashTools_h
  148. +
  149. +#include "wtf/Platform.h"
  150. +
  151. +namespace WebCore {
  152. +
  153. +struct Entity {
  154. + const char* name;
  155. + int code;
  156. +};
  157. +
  158. +struct PubIDInfo {
  159. + enum eMode {
  160. + eQuirks,
  161. + eQuirks3,
  162. + eAlmostStandards
  163. + };
  164. +
  165. + const char* name;
  166. + eMode mode_if_no_sysid;
  167. + eMode mode_if_sysid;
  168. +};
  169. +
  170. +struct NamedColor {
  171. + const char* name;
  172. + int RGBValue;
  173. +};
  174. +
  175. +struct Property {
  176. + const char* name;
  177. + int id;
  178. +};
  179. +
  180. +struct Value {
  181. + const char* name;
  182. + int id;
  183. +};
  184. +
  185. +const Entity* findEntity(register const char* str, register unsigned int len);
  186. +const PubIDInfo* findDoctypeEntry(register const char* str, register unsigned int len);
  187. +const NamedColor* findColor(register const char* str, register unsigned int len);
  188. +const Property* findProperty(register const char* str, register unsigned int len);
  189. +const Value* findValue(register const char* str, register unsigned int len);
  190. +
  191. +#if PLATFORM(CHROMIUM)
  192. +
  193. +const Entity* wordList();
  194. +const int wordListSize();
  195. +
  196. +#endif
  197. +
  198. +}
  199. +
  200. +#endif // HashTools_h
  201. +
  202. +EOF
  203. +close HEADER;
  204. +
  205. +}
  206. +
  207. +
  208. +
  209. switch ($option) {
  210.  
  211. case "HTMLEntityNames" {
  212.  
  213. - my $htmlEntityNamesGenerated = "$outdir/HTMLEntityNames.cpp";
  214. + createHashToolsHeader();
  215. +
  216. + my $htmlEntityNamesImpl = "$outdir/HTMLEntityNames.cpp";
  217. + my $htmlEntityNamesGenerated = "$outdir/HTMLEntityNamesHash.h";
  218. my $htmlEntityNamesGperf = $ARGV[0];
  219. shift;
  220.  
  221. + open ENTITIES, ">$htmlEntityNamesImpl" || die "Could not open $htmlEntityNamesImpl for writing";
  222. + print ENTITIES << "EOF";
  223. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  224. +
  225. +#include "HashTools.h"
  226. +
  227. +namespace WebCore {
  228. +#include "HTMLEntityNamesHash.h"
  229. +
  230. +const Entity* findEntity(register const char* str, register unsigned int len)
  231. +{
  232. + return HTMLEntityHash::findEntityImpl(str, len);
  233. +}
  234. +
  235. +#if PLATFORM(CHROMIUM)
  236. +
  237. +const Entity* wordList()
  238. +{
  239. + return WebCore::entity_wordlist;
  240. +}
  241. +
  242. +const int wordListSize()
  243. +{
  244. + return sizeof(WebCore::entity_wordlist) / sizeof(Entity);
  245. +}
  246. +
  247. +#endif // PLATFORM(CHROMIUM)
  248. +
  249. +} // namespace WebCore
  250. +
  251. +EOF
  252. + close ENTITIES;
  253. +
  254. system("gperf --key-positions=\"*\" -D -s 2 $htmlEntityNamesGperf > $htmlEntityNamesGenerated") == 0 || die "calling gperf failed: $?";
  255.  
  256. } # case "HTMLEntityNames"
  257.  
  258. case "DocTypeStrings" {
  259.  
  260. - my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp";
  261. + my $docTypeStringsImpl = "$outdir/DocTypeStrings.cpp";
  262. + my $docTypeStringsGenerated = "$outdir/DocTypeStringsHash.h";
  263. my $docTypeStringsGperf = $ARGV[0];
  264. shift;
  265.  
  266. + open DOCTYPESTRINGS, ">$docTypeStringsImpl" || die "Could not open $docTypeStringsImpl for writing";
  267. + print DOCTYPESTRINGS << "EOF";
  268. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  269. +
  270. +#include "HashTools.h"
  271. +
  272. +namespace WebCore {
  273. +#include "DocTypeStringsHash.h"
  274. +
  275. +const PubIDInfo* findDoctypeEntry (register const char* str, register unsigned int len)
  276. +{
  277. + return DocTypeStringsHash::findDoctypeEntryImpl(str, len);
  278. +}
  279. +
  280. +}
  281. +
  282. +EOF
  283. + close DOCTYPESTRINGS;
  284. +
  285. system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?";
  286.  
  287. } # case "DocTypeStrings"
  288.  
  289. case "ColorData" {
  290.  
  291. - my $colorDataGenerated = "$outdir/ColorData.cpp";
  292. - my $colorDataGperf = $ARGV[0];
  293. + my $colorDataImpl = "$outdir/ColorData.cpp";
  294. + my $colorDataGenerated = "$outdir/ColorDataHash.h";
  295. + my $colorDataGperf = $ARGV[0];
  296. shift;
  297.  
  298. + open COLORDATA, ">$colorDataImpl" || die "Could not open $colorDataImpl for writing";
  299. + print COLORDATA << "EOF";
  300. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  301. +
  302. +#include "HashTools.h"
  303. +
  304. +namespace WebCore {
  305. +#include "ColorDataHash.h"
  306. +
  307. +const struct NamedColor* findColor (register const char* str, register unsigned int len)
  308. +{
  309. + return ColorDataHash::findColorImpl(str, len);
  310. +}
  311. +
  312. +}
  313. +
  314. +EOF
  315. + close COLORDATA;
  316. +
  317. system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?";
  318.  
  319. } # case "ColorData"
  320. Index: WebCore/CMakeLists.txt
  321. ===================================================================
  322. --- WebCore/CMakeLists.txt (revision 64971)
  323. +++ WebCore/CMakeLists.txt (working copy)
  324. @@ -531,6 +531,10 @@
  325. ${DERIVED_SOURCES_DIR}/CSSGrammar.cpp
  326. ${DERIVED_SOURCES_DIR}/HTMLElementFactory.cpp
  327. ${DERIVED_SOURCES_DIR}/HTMLEntityNames.cpp
  328. + ${DERIVED_SOURCES_DIR}/DocTypeStrings.cpp
  329. + ${DERIVED_SOURCES_DIR}/CSSValueKeywords.cpp
  330. + ${DERIVED_SOURCES_DIR}/CSSPropertyNames.cpp
  331. + ${DERIVED_SOURCES_DIR}/ColorData.cpp
  332. ${DERIVED_SOURCES_DIR}/HTMLNames.cpp
  333. ${DERIVED_SOURCES_DIR}/JSHTMLElementWrapperFactory.cpp
  334. ${DERIVED_SOURCES_DIR}/MathMLElementFactory.cpp
  335. @@ -1820,9 +1824,11 @@
  336.  
  337. LIST(APPEND WebCore_SOURCES ${JS_IDL_FILES} ${Inspector_IDL_FILES})
  338.  
  339. -GENERATE_GPERF(${WEBCORE_DIR}/html/HTMLEntityNames.gperf)
  340. -GENERATE_GPERF(${WEBCORE_DIR}/platform/ColorData.gperf)
  341. -GENERATE_GPERF(${WEBCORE_DIR}/html/DocTypeStrings.gperf)
  342. +MAKE_HASH_TOOLS(${WEBCORE_DIR}/html/HTMLEntityNames)
  343. +MAKE_HASH_TOOLS(${WEBCORE_DIR}/html/DocTypeStrings)
  344. +MAKE_HASH_TOOLS(${DERIVED_SOURCES_DIR}/CSSValueKeywords)
  345. +MAKE_HASH_TOOLS(${DERIVED_SOURCES_DIR}/CSSPropertyNames)
  346. +MAKE_HASH_TOOLS(${WEBCORE_DIR}/platform/ColorData)
  347.  
  348. GENERATE_TOKENIZER()
  349. GENERATE_USER_AGENT_STYLES()
  350. @@ -1833,6 +1839,7 @@
  351. GENERATE_CSS_PROPERTY_NAMES()
  352. GENERATE_CSS_VALUE_KEYWORDS()
  353.  
  354. +ADD_SOURCE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_DIR}/HashTools.h HTMLEntityNames.cpp DocTypeStrings.cpp CSSValueKeywords.cpp CSSPropertyNames.cpp ColorData.cpp)
  355. ADD_SOURCE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_DIR}/CSSGrammar.cpp CSSValueKeywords.h)
  356. ADD_SOURCE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_DIR}/CSSGrammar.cpp CSSPropertyNames.h)
  357. ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSPrimitiveValueMappings.h CSSValueKeywords.h)
  358. Index: ChangeLog
  359. ===================================================================
  360. --- ChangeLog (revision 64971)
  361. +++ ChangeLog (working copy)
  362. @@ -1,3 +1,23 @@
  363. +2010-08-09 Andras Becsi <abecsi@webkit.org>
  364. +
  365. + Reviewed by NOBODY (OOPS!).
  366. +
  367. + Undefined reference errors when linking due to gperf and inlining.
  368. + webkit.org/b/29244
  369. +
  370. + EFL CMake changes by Leandro Pereira <leandro@profusion.mobi>
  371. +
  372. + Refactor gperf code generation and usage to fix the debug build with gcc>4.4.
  373. + Hitherto gperf generated C code, these files were included in multiple C++ files across WebCore
  374. + to access the functionality provided. This resulted in debug build failure with newer gcc versions
  375. + because of a behaviour change of gcc, which disables C style inlining in debug mode.
  376. + The make-hash-tools.pl script lets gperf generate C++ code for all gperf files now, which are compiled
  377. + in their own compilation unit.
  378. + The functionality provided by the generated code is wrapped behind HashTools.h, so there is no need
  379. + for multiple inclusions of generated C files to access these functions.
  380. +
  381. + * cmake/WebKitGenerators.cmake:
  382. +
  383. 2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com>
  384.  
  385. Unreviewed, rolling out r64904.
Add Comment
Please, Sign In to add comment