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

Side by Side Diff: tools/dom/scripts/dartdomgenerator.py

Issue 1001983003: Added --examine to produce analysis of IDL files (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed is_dictionary to check_dictionaries Created 5 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/dom/scripts/database.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This is the entry point to create Dart APIs from the IDL database.""" 6 """This is the entry point to create Dart APIs from the IDL database."""
7 7
8 import css_code_generator 8 import css_code_generator
9 import os 9 import os
10 import sys 10 import sys
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 default=False, 226 default=False,
227 help='''Use the cached database from the previous run to 227 help='''Use the cached database from the previous run to
228 improve startup performance''') 228 improve startup performance''')
229 parser.add_option('--update-dom-metadata', dest='update_dom_metadata', 229 parser.add_option('--update-dom-metadata', dest='update_dom_metadata',
230 action='store_true', 230 action='store_true',
231 default=False, 231 default=False,
232 help='''Update the metadata list of DOM APIs''') 232 help='''Update the metadata list of DOM APIs''')
233 parser.add_option('--verbose', dest='logging_level', 233 parser.add_option('--verbose', dest='logging_level',
234 action='store_false', default=logging.WARNING, 234 action='store_false', default=logging.WARNING,
235 help='Output all informational messages') 235 help='Output all informational messages')
236 parser.add_option('--examine', dest='examine_idls',
237 action='store_true', default=None,
238 help='Analyze IDL files')
236 parser.add_option('--logging', dest='logging', type='int', 239 parser.add_option('--logging', dest='logging', type='int',
237 action='store', default=logging.NOTSET, 240 action='store', default=logging.NOTSET,
238 help='Level of logging 20 is Info, 30 is Warnings, 40 is Err ors') 241 help='Level of logging 20 is Info, 30 is Warnings, 40 is Err ors')
239 242
240 (options, args) = parser.parse_args() 243 (options, args) = parser.parse_args()
241 244
242 current_dir = os.path.dirname(__file__) 245 current_dir = os.path.dirname(__file__)
243 database_dir = os.path.join(current_dir, '..', 'database') 246 database_dir = os.path.join(current_dir, '..', 'database')
244 logging.config.fileConfig(os.path.join(current_dir, 'logging.conf')) 247 logging.config.fileConfig(os.path.join(current_dir, 'logging.conf'))
245 systems = options.systems.split(',') 248 systems = options.systems.split(',')
(...skipping 10 matching lines...) Expand all
256 dartium_output_dir = os.path.join(output_dir, 'dartium') 259 dartium_output_dir = os.path.join(output_dir, 'dartium')
257 260
258 logging_level = options.logging_level \ 261 logging_level = options.logging_level \
259 if options.logging == logging.NOTSET else options.logging 262 if options.logging == logging.NOTSET else options.logging
260 263
261 start_time = time.time() 264 start_time = time.time()
262 265
263 UpdateCssProperties() 266 UpdateCssProperties()
264 267
265 # Parse the IDL and create the database. 268 # Parse the IDL and create the database.
266 database = fremontcutbuilder.main(options.parallel, logging_level=logging_leve l) 269 database = fremontcutbuilder.main(options.parallel, logging_level=logging_leve l, examine_idls=options.examine_idls)
267 270
268 GenerateFromDatabase(database, dart2js_output_dir, dartium_output_dir, 271 GenerateFromDatabase(database, dart2js_output_dir, dartium_output_dir,
269 options.update_dom_metadata, logging_level) 272 options.update_dom_metadata, logging_level)
270 273
271 file_generation_start_time = time.time() 274 file_generation_start_time = time.time()
272 275
273 if 'htmldart2js' in systems: 276 if 'htmldart2js' in systems:
274 _logger.info('Generating dart2js single files.') 277 _logger.info('Generating dart2js single files.')
275 278
276 for library_name in HTML_LIBRARY_NAMES: 279 for library_name in HTML_LIBRARY_NAMES:
(...skipping 11 matching lines...) Expand all
288 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) 291 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium'))
289 292
290 print '\nGenerating single file %s seconds' % round(time.time() - file_generat ion_start_time, 2) 293 print '\nGenerating single file %s seconds' % round(time.time() - file_generat ion_start_time, 2)
291 294
292 end_time = time.time() 295 end_time = time.time()
293 296
294 print '\nDone (dartdomgenerator) %s seconds' % round(end_time - start_time, 2) 297 print '\nDone (dartdomgenerator) %s seconds' % round(end_time - start_time, 2)
295 298
296 if __name__ == '__main__': 299 if __name__ == '__main__':
297 sys.exit(main()) 300 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/dom/scripts/database.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698