| 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 import database | 6 import database |
| 7 import databasebuilder | 7 import databasebuilder |
| 8 import idlparser | 8 import idlparser |
| 9 import logging.config | 9 import logging.config |
| 10 import os.path | 10 import os.path |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 # Import Dart idl: | 141 # Import Dart idl: |
| 142 dart_options = databasebuilder.DatabaseBuilderOptions( | 142 dart_options = databasebuilder.DatabaseBuilderOptions( |
| 143 idl_syntax=idlparser.FREMONTCUT_SYNTAX, | 143 idl_syntax=idlparser.FREMONTCUT_SYNTAX, |
| 144 source='Dart', | 144 source='Dart', |
| 145 rename_operation_arguments_on_merge=True) | 145 rename_operation_arguments_on_merge=True) |
| 146 | 146 |
| 147 builder.import_idl_file( | 147 builder.import_idl_file( |
| 148 os.path.join(current_dir, '..', 'idl', 'dart', 'dart.idl'), | 148 os.path.join(current_dir, '..', 'idl', 'dart', 'dart.idl'), |
| 149 dart_options) | 149 dart_options) |
| 150 | 150 |
| 151 builder.set_same_signatures({ | |
| 152 'EventListener': 'Function', | |
| 153 'int': 'long', | |
| 154 }) | |
| 155 | |
| 156 # Merging: | 151 # Merging: |
| 157 builder.merge_imported_interfaces(optional_argument_whitelist) | 152 builder.merge_imported_interfaces(optional_argument_whitelist) |
| 158 | 153 |
| 159 builder.fix_displacements('WebKit') | 154 builder.fix_displacements('WebKit') |
| 160 | 155 |
| 161 # Cleanup: | 156 # Cleanup: |
| 162 builder.normalize_annotations(['WebKit', 'Dart']) | 157 builder.normalize_annotations(['WebKit', 'Dart']) |
| 163 | 158 |
| 164 db.Save() | 159 db.Save() |
| 165 | 160 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 dir_path = os.path.join(webcore_dir, dir_name) | 206 dir_path = os.path.join(webcore_dir, dir_name) |
| 212 os.path.walk(dir_path, visitor, None) | 207 os.path.walk(dir_path, visitor, None) |
| 213 | 208 |
| 214 os.close(idl_list_file) | 209 os.close(idl_list_file) |
| 215 | 210 |
| 216 database_dir = os.path.join(current_dir, '..', 'database') | 211 database_dir = os.path.join(current_dir, '..', 'database') |
| 217 return build_database(idl_list_file_name, database_dir) | 212 return build_database(idl_list_file_name, database_dir) |
| 218 | 213 |
| 219 if __name__ == '__main__': | 214 if __name__ == '__main__': |
| 220 sys.exit(main()) | 215 sys.exit(main()) |
| OLD | NEW |