Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: Tools/Scripts/webkitpy/bindings/main.py

Issue 670663002: IDL: Use IdlReader to compute interface_info_individual (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/bindings/core/generated.gyp ('K') | « Source/bindings/scripts/utilities.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/bindings/main.py
diff --git a/Tools/Scripts/webkitpy/bindings/main.py b/Tools/Scripts/webkitpy/bindings/main.py
index cdbb6cdd3a0a1f204664073f6fe42d0ea0d8fc4d..38a4777ae89ecaf7d0d24c594f1ea1737c841b6b 100644
--- a/Tools/Scripts/webkitpy/bindings/main.py
+++ b/Tools/Scripts/webkitpy/bindings/main.py
@@ -45,6 +45,7 @@ from bindings.scripts.compute_interfaces_info_individual import compute_info_ind
import bindings.scripts.compute_interfaces_info_overall
from bindings.scripts.compute_interfaces_info_overall import compute_interfaces_info_overall, interfaces_info
from bindings.scripts.idl_compiler import IdlCompilerDictionaryImpl, IdlCompilerV8
+from bindings.scripts.idl_reader import IdlReader
PASS_MESSAGE = 'All tests PASS!'
@@ -68,6 +69,11 @@ DEPENDENCY_IDL_FILES = frozenset([
'TestPartialInterface3.idl',
])
+# core/inspector/InspectorInstrumentation.idl is not a valid Blink IDL.
+NON_BLINK_IDL_FILES = frozenset([
+ 'InspectorInstrumentation.idl',
+])
+
COMPONENT_DIRECTORY = frozenset(['core', 'modules'])
test_input_directory = os.path.join(source_path, 'bindings', 'tests', 'idls')
@@ -92,7 +98,7 @@ def TemporaryDirectory():
shutil.rmtree(name)
-def generate_interface_dependencies():
+def generate_interface_dependencies(output_directory):
def idl_paths_recursive(directory):
# This is slow, especially on Windows, due to os.walk making
# excess stat() calls. Faster versions may appear in Python 3.5 or
@@ -122,8 +128,11 @@ def generate_interface_dependencies():
# includes are invalid), but that's brittle (would need to update this file
# for each new component) and doesn't test the code generator any better
# than using a single component.
+ reader = IdlReader(outputdir=output_directory)
for idl_filename in idl_paths_recursive(source_path):
- compute_info_individual(idl_filename)
+ if os.path.basename(idl_filename) in NON_BLINK_IDL_FILES:
+ continue
+ compute_info_individual(idl_filename, reader)
info_individuals = [info_individual()]
# TestDictionary.{h,cpp} are placed under Source/bindings/tests/idls/core.
# However, IdlCompiler generates TestDictionary.{h,cpp} by using relative_dir.
@@ -222,7 +231,7 @@ def bindings_tests(output_directory, verbose):
return True
try:
- generate_interface_dependencies()
+ generate_interface_dependencies(output_directory)
for component in COMPONENT_DIRECTORY:
output_dir = os.path.join(output_directory, component)
if not os.path.exists(output_dir):
« Source/bindings/core/generated.gyp ('K') | « Source/bindings/scripts/utilities.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698