| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 # generation. We need to recheck this periodically for now. | 110 # generation. We need to recheck this periodically for now. |
| 111 webkit_defines = [ 'LANGUAGE_DART', 'LANGUAGE_JAVASCRIPT' ] | 111 webkit_defines = [ 'LANGUAGE_DART', 'LANGUAGE_JAVASCRIPT' ] |
| 112 if feature_defines is None: | 112 if feature_defines is None: |
| 113 feature_defines = DEFAULT_FEATURE_DEFINES | 113 feature_defines = DEFAULT_FEATURE_DEFINES |
| 114 | 114 |
| 115 webkit_options = databasebuilder.DatabaseBuilderOptions( | 115 webkit_options = databasebuilder.DatabaseBuilderOptions( |
| 116 idl_syntax=idlparser.WEBKIT_SYNTAX, | 116 idl_syntax=idlparser.WEBKIT_SYNTAX, |
| 117 # TODO(vsm): What else should we define as on when processing IDL? | 117 # TODO(vsm): What else should we define as on when processing IDL? |
| 118 idl_defines=webkit_defines + feature_defines, | 118 idl_defines=webkit_defines + feature_defines, |
| 119 source='WebKit', | 119 source='WebKit', |
| 120 source_attributes={'revision': webkit_revision}, | 120 source_attributes={'revision': webkit_revision}) |
| 121 type_rename_map={ | |
| 122 'BarInfo': 'BarProp', | |
| 123 'DedicatedWorkerContext': 'DedicatedWorkerGlobalScope', | |
| 124 'DOMApplicationCache': 'ApplicationCache', | |
| 125 'DOMCoreException': 'DOMException', | |
| 126 'DOMFormData': 'FormData', | |
| 127 'DOMSelection': 'Selection', | |
| 128 'DOMWindow': 'Window', | |
| 129 'SharedWorkerContext': 'SharedWorkerGlobalScope', | |
| 130 'WorkerContext': 'WorkerGlobalScope', | |
| 131 }) | |
| 132 | 121 |
| 133 # Import WebKit IDLs. | 122 # Import WebKit IDLs. |
| 134 builder.import_idl_files(idl_files, webkit_options) | 123 builder.import_idl_files(idl_files, webkit_options) |
| 135 | 124 |
| 136 # Import Dart idl: | 125 # Import Dart idl: |
| 137 dart_options = databasebuilder.DatabaseBuilderOptions( | 126 dart_options = databasebuilder.DatabaseBuilderOptions( |
| 138 idl_syntax=idlparser.FREMONTCUT_SYNTAX, | 127 idl_syntax=idlparser.FREMONTCUT_SYNTAX, |
| 139 source='Dart', | 128 source='Dart', |
| 140 rename_operation_arguments_on_merge=True) | 129 rename_operation_arguments_on_merge=True) |
| 141 | 130 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 197 |
| 209 for dir_name in webkit_dirs: | 198 for dir_name in webkit_dirs: |
| 210 dir_path = os.path.join(webcore_dir, dir_name) | 199 dir_path = os.path.join(webcore_dir, dir_name) |
| 211 os.path.walk(dir_path, visitor, None) | 200 os.path.walk(dir_path, visitor, None) |
| 212 | 201 |
| 213 database_dir = os.path.join(current_dir, '..', 'database') | 202 database_dir = os.path.join(current_dir, '..', 'database') |
| 214 return build_database(idl_files, database_dir) | 203 return build_database(idl_files, database_dir) |
| 215 | 204 |
| 216 if __name__ == '__main__': | 205 if __name__ == '__main__': |
| 217 sys.exit(main()) | 206 sys.exit(main()) |
| OLD | NEW |