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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 generator.FilterMembersWithUnidentifiedTypes(common_database) | 99 generator.FilterMembersWithUnidentifiedTypes(common_database) |
100 webkit_database = common_database.Clone() | 100 webkit_database = common_database.Clone() |
101 | 101 |
102 # Generate Dart interfaces for the WebKit DOM. | 102 # Generate Dart interfaces for the WebKit DOM. |
103 generator.FilterInterfaces(database = webkit_database, | 103 generator.FilterInterfaces(database = webkit_database, |
104 or_annotations = ['WebKit', 'Dart'], | 104 or_annotations = ['WebKit', 'Dart'], |
105 exclude_displaced = ['WebKit'], | 105 exclude_displaced = ['WebKit'], |
106 exclude_suppressed = ['WebKit', 'Dart']) | 106 exclude_suppressed = ['WebKit', 'Dart']) |
107 generator.FixEventTargets(webkit_database) | 107 generator.FixEventTargets(webkit_database) |
108 generator.AddMissingArguments(webkit_database) | 108 generator.AddMissingArguments(webkit_database) |
109 generator.HackCleanupTimers(webkit_database) | 109 generator.CleanupOperationArguments(webkit_database) |
110 | 110 |
111 emitters = multiemitter.MultiEmitter(logging_level) | 111 emitters = multiemitter.MultiEmitter(logging_level) |
112 metadata = DartMetadata( | 112 metadata = DartMetadata( |
113 os.path.join(current_dir, '..', 'dom.json'), | 113 os.path.join(current_dir, '..', 'dom.json'), |
114 os.path.join(current_dir, '..', 'docs', 'docs.json'), | 114 os.path.join(current_dir, '..', 'docs', 'docs.json'), |
115 logging_level) | 115 logging_level) |
116 renamer = HtmlRenamer(webkit_database, metadata) | 116 renamer = HtmlRenamer(webkit_database, metadata) |
117 type_registry = TypeRegistry(webkit_database, renamer) | 117 type_registry = TypeRegistry(webkit_database, renamer) |
118 | 118 |
119 print 'GenerateFromDatabase %s seconds' % round((time.time() - start_time), 2) | 119 print 'GenerateFromDatabase %s seconds' % round((time.time() - start_time), 2) |
(...skipping 208 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 |