Speed up supplemental dependency computation
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2013 18:25:07 +0000 (18:25 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2013 18:25:07 +0000 (18:25 +0000)
commit73fddb231af4833d2717cae3dc2d90e32d433822
treec40b92da2cd4739ba3663f4625b37ad13b0ece83
parente3f71726becc447802023dbc829731df9dc88a74
Speed up supplemental dependency computation
https://bugs.webkit.org/show_bug.cgi?id=106503

Reviewed by Adam Barth.

.:

* Source/cmake/WebKitMacros.cmake: Add --idlAttributesFile to the binding generation step in cmake.

Source/WebCore:

On my machine, generating supplemental IDL dependencies was taking about 18s
because it has to run the C preprocessor on each IDL file. Avoid this by using
a regular expression to find the Supplemental= value in each IDL file rather than
doing a full parse. Now generating supplemental IDL dependencies is less than a
second.

preprocess-idls.pl used to also check IDL attributes against IDLAttributes.txt.
Move this code to run in generate-bindings.pl. This change revealed that
TestRunner.idl uses PassContext so add that to IDLAttributes.txt.

No new tests, this is a build refactor. EWS bots should be green.

* DerivedSources.make: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
* DerivedSources.pri: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
* GNUmakefile.am: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
* UseJSC.cmake: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
* UseV8.cmake: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
* WebCore.gyp/WebCore.gyp: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
* bindings/scripts/IDLAttributes.txt: Add PassContext needed by TestRunner.idl.
* bindings/scripts/generate-bindings.pl:
(loadIDLAttributes): Moved from preprocess-idls.pl.
(checkIDLAttributes): Moved from preprocess-idls.pl.
(checkIfIDLAttributesExists): Moved from preprocess-idls.pl.
* bindings/scripts/preprocess-idls.pl:
(getSupplementalFromIDLFile): Helper method to get Supplemental=* quickly.

Tools:

Pass the IDL attributes file for generating the bindings in WebKitTestRunner.

* WebKitTestRunner/CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/DerivedSources.pri
Source/WebCore/GNUmakefile.am
Source/WebCore/UseJSC.cmake
Source/WebCore/UseV8.cmake
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/bindings/scripts/IDLAttributes.txt
Source/WebCore/bindings/scripts/generate-bindings.pl
Source/WebCore/bindings/scripts/preprocess-idls.pl
Source/cmake/WebKitMacros.cmake
Tools/ChangeLog
Tools/WebKitTestRunner/CMakeLists.txt