Skip to content
  • tony@chromium.org's avatar
    Speed up supplemental dependency computation · 73fddb23
    tony@chromium.org authored
    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
    73fddb23