| 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 |
| 11 import logging.config | 11 import logging |
| 12 import monitored | 12 import monitored |
| 13 import multiemitter | 13 import multiemitter |
| 14 import optparse | 14 import optparse |
| 15 import os | 15 import os |
| 16 import shutil | 16 import shutil |
| 17 import subprocess | 17 import subprocess |
| 18 import sys | 18 import sys |
| 19 from dartmetadata import DartMetadata | 19 from dartmetadata import DartMetadata |
| 20 from generator import TypeRegistry | 20 from generator import TypeRegistry |
| 21 from htmleventgenerator import HtmlEventGenerator | 21 from htmleventgenerator import HtmlEventGenerator |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 RunGenerator(dart_libraries, dart_output_dir, | 133 RunGenerator(dart_libraries, dart_output_dir, |
| 134 template_loader, backend_factory) | 134 template_loader, backend_factory) |
| 135 cpp_library_emitter.EmitDerivedSources( | 135 cpp_library_emitter.EmitDerivedSources( |
| 136 template_loader.Load('cpp_derived_sources.template'), | 136 template_loader.Load('cpp_derived_sources.template'), |
| 137 dartium_output_dir) | 137 dartium_output_dir) |
| 138 cpp_library_emitter.EmitResolver( | 138 cpp_library_emitter.EmitResolver( |
| 139 template_loader.Load('cpp_resolver.template'), dartium_output_dir) | 139 template_loader.Load('cpp_resolver.template'), dartium_output_dir) |
| 140 cpp_library_emitter.EmitClassIdTable( | 140 cpp_library_emitter.EmitClassIdTable( |
| 141 webkit_database, dartium_output_dir, type_registry, renamer) | 141 webkit_database, dartium_output_dir, type_registry, renamer) |
| 142 emitters.Flush() |
| 142 | 143 |
| 143 if update_dom_metadata: | 144 if update_dom_metadata: |
| 144 metadata.Flush() | 145 metadata.Flush() |
| 145 | 146 |
| 146 monitored.FinishMonitoring(dart2js_output_dir) | 147 monitored.FinishMonitoring(dart2js_output_dir) |
| 147 | 148 |
| 148 def GenerateSingleFile(library_path, output_dir, generated_output_dir=None): | 149 def GenerateSingleFile(library_path, output_dir, generated_output_dir=None): |
| 149 library_dir = os.path.dirname(library_path) | 150 library_dir = os.path.dirname(library_path) |
| 150 library_filename = os.path.basename(library_path) | 151 library_filename = os.path.basename(library_path) |
| 151 copy_dart_script = os.path.relpath('../../copy_dart.py', | 152 copy_dart_script = os.path.relpath('../../copy_dart.py', |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) | 216 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) |
| 216 if 'htmldartium' in systems: | 217 if 'htmldartium' in systems: |
| 217 _logger.info('Generating dartium single files.') | 218 _logger.info('Generating dartium single files.') |
| 218 for library_name in HTML_LIBRARY_NAMES: | 219 for library_name in HTML_LIBRARY_NAMES: |
| 219 GenerateSingleFile( | 220 GenerateSingleFile( |
| 220 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), | 221 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), |
| 221 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) | 222 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) |
| 222 | 223 |
| 223 if __name__ == '__main__': | 224 if __name__ == '__main__': |
| 224 sys.exit(main()) | 225 sys.exit(main()) |
| OLD | NEW |