| 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 css_code_generator | 8 import css_code_generator |
| 9 import os | 9 import os |
| 10 import sys | 10 import sys |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 {'DARTIUM': True, | 170 {'DARTIUM': True, |
| 171 'DART2JS': False, | 171 'DART2JS': False, |
| 172 'JSINTEROP': dart_js_interop}) | 172 'JSINTEROP': dart_js_interop}) |
| 173 backend_options = GeneratorOptions( | 173 backend_options = GeneratorOptions( |
| 174 template_loader, webkit_database, type_registry, renamer, | 174 template_loader, webkit_database, type_registry, renamer, |
| 175 metadata, dart_js_interop) | 175 metadata, dart_js_interop) |
| 176 cpp_output_dir = os.path.join(dartium_output_dir, 'cpp') | 176 cpp_output_dir = os.path.join(dartium_output_dir, 'cpp') |
| 177 cpp_library_emitter = CPPLibraryEmitter(emitters, cpp_output_dir) | 177 cpp_library_emitter = CPPLibraryEmitter(emitters, cpp_output_dir) |
| 178 dart_output_dir = os.path.join(dartium_output_dir, 'dart') | 178 dart_output_dir = os.path.join(dartium_output_dir, 'dart') |
| 179 backend_factory = lambda interface:\ | 179 backend_factory = lambda interface:\ |
| 180 DartiumBackend(interface, cpp_library_emitter, backend_options) | 180 DartiumBackend(interface, cpp_library_emitter, backend_options, _logger) |
| 181 dart_libraries = DartLibraries( | 181 dart_libraries = DartLibraries( |
| 182 HTML_LIBRARY_NAMES, template_loader, 'dartium', dartium_output_dir, dart
_js_interop) | 182 HTML_LIBRARY_NAMES, template_loader, 'dartium', dartium_output_dir, dart
_js_interop) |
| 183 | 183 |
| 184 print '\nGenerating dartium:\n' | 184 print '\nGenerating dartium:\n' |
| 185 start_time = time.time() | 185 start_time = time.time() |
| 186 | 186 |
| 187 RunGenerator(dart_libraries, dart_output_dir, template_loader, | 187 RunGenerator(dart_libraries, dart_output_dir, template_loader, |
| 188 backend_factory, dart_js_interop) | 188 backend_factory, dart_js_interop) |
| 189 print 'Generated dartium in %s seconds' % round(time.time() - start_time, 2) | 189 print 'Generated dartium in %s seconds' % round(time.time() - start_time, 2) |
| 190 | 190 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 os.path.join('..', '..', '..', 'sdk', 'lib', '_blink', 'dartium')) | 328 os.path.join('..', '..', '..', 'sdk', 'lib', '_blink', 'dartium')) |
| 329 | 329 |
| 330 print '\nGenerating single file %s seconds' % round(time.time() - file_generat
ion_start_time, 2) | 330 print '\nGenerating single file %s seconds' % round(time.time() - file_generat
ion_start_time, 2) |
| 331 | 331 |
| 332 end_time = time.time() | 332 end_time = time.time() |
| 333 | 333 |
| 334 print '\nDone (dartdomgenerator) %s seconds' % round(end_time - start_time, 2) | 334 print '\nDone (dartdomgenerator) %s seconds' % round(end_time - start_time, 2) |
| 335 | 335 |
| 336 if __name__ == '__main__': | 336 if __name__ == '__main__': |
| 337 sys.exit(main()) | 337 sys.exit(main()) |
| OLD | NEW |