Index: tools/dom/scripts/fremontcutbuilder.py |
diff --git a/tools/dom/scripts/fremontcutbuilder.py b/tools/dom/scripts/fremontcutbuilder.py |
index b8c80a6ce5bceb16a2d406d6d92aeff75a76f7ba..ed11625c82b8f1484ba30eb57b1fec304f280deb 100755 |
--- a/tools/dom/scripts/fremontcutbuilder.py |
+++ b/tools/dom/scripts/fremontcutbuilder.py |
@@ -36,7 +36,7 @@ FEATURE_DEFINES = [ |
] |
def build_database(idl_files, database_dir, feature_defines=None, |
- logging_level=logging.WARNING): |
+ logging_level=logging.WARNING, examine_idls=False): |
"""This code reconstructs the FremontCut IDL database from W3C, |
WebKit and Dart IDL files.""" |
current_dir = os.path.dirname(__file__) |
@@ -98,6 +98,11 @@ def build_database(idl_files, database_dir, feature_defines=None, |
# Map any IDL defined dictionaries to Dictionary. |
builder.map_dictionaries() |
+ # Examine all IDL and produce a diagnoses of areas (e.g., list dictionaries |
+ # declared and usage, etc.) |
+ if examine_idls: |
+ builder.examine_database() |
+ |
conditionals_met = set( |
'ENABLE_' + conditional for conditional in builder.conditionals_met) |
known_conditionals = set(FEATURE_DEFINES + FEATURE_DISABLED) |
@@ -116,12 +121,9 @@ def build_database(idl_files, database_dir, feature_defines=None, |
print 'Merging interfaces %s seconds' % round(time.time() - start_time, 2) |
-# TODO(terry): Don't generate the database cache. |
-# db.Save() |
- |
return db |
-def main(parallel=False, logging_level=logging.WARNING): |
+def main(parallel=False, logging_level=logging.WARNING, examine_idls=False): |
current_dir = os.path.dirname(__file__) |
idl_files = [] |
@@ -167,7 +169,7 @@ def main(parallel=False, logging_level=logging.WARNING): |
database_dir = os.path.join(current_dir, '..', 'database') |
- return build_database(idl_files, database_dir, logging_level=logging_level) |
+ return build_database(idl_files, database_dir, logging_level=logging_level, examine_idls=examine_idls) |
if __name__ == '__main__': |
sys.exit(main()) |