| OLD | NEW |
| 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 dartgenerator | 8 import dartgenerator |
| 9 import database | 9 import database |
| 10 import fremontcutbuilder | 10 import fremontcutbuilder |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 # Generate Dart interfaces for the WebKit DOM. | 63 # Generate Dart interfaces for the WebKit DOM. |
| 64 generator.FilterInterfaces(database = webkit_database, | 64 generator.FilterInterfaces(database = webkit_database, |
| 65 or_annotations = ['WebKit', 'Dart'], | 65 or_annotations = ['WebKit', 'Dart'], |
| 66 exclude_displaced = ['WebKit'], | 66 exclude_displaced = ['WebKit'], |
| 67 exclude_suppressed = ['WebKit', 'Dart']) | 67 exclude_suppressed = ['WebKit', 'Dart']) |
| 68 generator.FixEventTargets(webkit_database) | 68 generator.FixEventTargets(webkit_database) |
| 69 generator.AddMissingArguments(webkit_database) | 69 generator.AddMissingArguments(webkit_database) |
| 70 | 70 |
| 71 emitters = multiemitter.MultiEmitter() | 71 emitters = multiemitter.MultiEmitter() |
| 72 renamer = HtmlRenamer(webkit_database) | |
| 73 type_registry = TypeRegistry(webkit_database, renamer) | |
| 74 metadata = DartMetadata( | 72 metadata = DartMetadata( |
| 75 os.path.join(current_dir, '..', 'dom.json'), | 73 os.path.join(current_dir, '..', 'dom.json'), |
| 76 os.path.join(current_dir, '..', 'docs', 'docs.json')) | 74 os.path.join(current_dir, '..', 'docs', 'docs.json')) |
| 75 renamer = HtmlRenamer(webkit_database, metadata) |
| 76 type_registry = TypeRegistry(webkit_database, renamer) |
| 77 | 77 |
| 78 def RunGenerator(dart_libraries, dart_output_dir, | 78 def RunGenerator(dart_libraries, dart_output_dir, |
| 79 template_loader, backend_factory): | 79 template_loader, backend_factory): |
| 80 options = GeneratorOptions( | 80 options = GeneratorOptions( |
| 81 template_loader, webkit_database, type_registry, renamer, | 81 template_loader, webkit_database, type_registry, renamer, |
| 82 metadata) | 82 metadata) |
| 83 dart_library_emitter = DartLibraryEmitter( | 83 dart_library_emitter = DartLibraryEmitter( |
| 84 emitters, dart_output_dir, dart_libraries) | 84 emitters, dart_output_dir, dart_libraries) |
| 85 event_generator = HtmlEventGenerator(webkit_database, renamer, metadata, | 85 event_generator = HtmlEventGenerator(webkit_database, renamer, metadata, |
| 86 template_loader) | 86 template_loader) |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) | 215 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) |
| 216 if 'htmldartium' in systems: | 216 if 'htmldartium' in systems: |
| 217 _logger.info('Generating dartium single files.') | 217 _logger.info('Generating dartium single files.') |
| 218 for library_name in HTML_LIBRARY_NAMES: | 218 for library_name in HTML_LIBRARY_NAMES: |
| 219 GenerateSingleFile( | 219 GenerateSingleFile( |
| 220 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), | 220 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), |
| 221 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) | 221 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) |
| 222 | 222 |
| 223 if __name__ == '__main__': | 223 if __name__ == '__main__': |
| 224 sys.exit(main()) | 224 sys.exit(main()) |
| OLD | NEW |