| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (C) 2013 Google Inc. All rights reserved. | 3 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 else: | 289 else: |
| 290 dependencies_other_component_full_paths.append(full_path) | 290 dependencies_other_component_full_paths.append(full_path) |
| 291 | 291 |
| 292 for include_path in partial_interfaces_include_paths: | 292 for include_path in partial_interfaces_include_paths: |
| 293 partial_interface_component = idl_filename_to_component(include_path
) | 293 partial_interface_component = idl_filename_to_component(include_path
) |
| 294 if component == partial_interface_component: | 294 if component == partial_interface_component: |
| 295 dependencies_include_paths.append(include_path) | 295 dependencies_include_paths.append(include_path) |
| 296 else: | 296 else: |
| 297 dependencies_other_component_include_paths.append(include_path) | 297 dependencies_other_component_include_paths.append(include_path) |
| 298 | 298 |
| 299 if interface_info['has_union_types']: |
| 300 dependencies_include_paths.append( |
| 301 'bindings/%s/v8/UnionTypes%s.h' % (component, component.capitali
ze())) |
| 302 |
| 299 interface_info.update({ | 303 interface_info.update({ |
| 300 'dependencies_full_paths': dependencies_full_paths, | 304 'dependencies_full_paths': dependencies_full_paths, |
| 301 'dependencies_include_paths': dependencies_include_paths, | 305 'dependencies_include_paths': dependencies_include_paths, |
| 302 'dependencies_other_component_full_paths': | 306 'dependencies_other_component_full_paths': |
| 303 dependencies_other_component_full_paths, | 307 dependencies_other_component_full_paths, |
| 304 'dependencies_other_component_include_paths': | 308 'dependencies_other_component_include_paths': |
| 305 dependencies_other_component_include_paths, | 309 dependencies_other_component_include_paths, |
| 306 }) | 310 }) |
| 307 | 311 |
| 308 # Clean up temporary private information | 312 # Clean up temporary private information |
| 309 for interface_info in interfaces_info.itervalues(): | 313 for interface_info in interfaces_info.itervalues(): |
| 310 del interface_info['extended_attributes'] | 314 del interface_info['extended_attributes'] |
| 315 del interface_info['has_union_types'] |
| 311 del interface_info['is_legacy_treat_as_partial_interface'] | 316 del interface_info['is_legacy_treat_as_partial_interface'] |
| 312 del interface_info['parent'] | 317 del interface_info['parent'] |
| 313 | 318 |
| 314 # Compute global_type_info to interfaces_info so that idl_compiler does | 319 # Compute global_type_info to interfaces_info so that idl_compiler does |
| 315 # not need to always calculate the info in __init__. | 320 # not need to always calculate the info in __init__. |
| 316 compute_global_type_info() | 321 compute_global_type_info() |
| 317 | 322 |
| 318 | 323 |
| 319 ################################################################################ | 324 ################################################################################ |
| 320 | 325 |
| 321 def main(): | 326 def main(): |
| 322 options, args = parse_options() | 327 options, args = parse_options() |
| 323 # args = Input1, Input2, ..., Output | 328 # args = Input1, Input2, ..., Output |
| 324 interfaces_info_filename = args.pop() | 329 interfaces_info_filename = args.pop() |
| 325 info_individuals = read_pickle_files(args) | 330 info_individuals = read_pickle_files(args) |
| 326 | 331 |
| 327 compute_interfaces_info_overall(info_individuals) | 332 compute_interfaces_info_overall(info_individuals) |
| 328 write_pickle_file(interfaces_info_filename, | 333 write_pickle_file(interfaces_info_filename, |
| 329 interfaces_info, | 334 interfaces_info, |
| 330 options.write_file_only_if_changed) | 335 options.write_file_only_if_changed) |
| 331 | 336 |
| 332 | 337 |
| 333 if __name__ == '__main__': | 338 if __name__ == '__main__': |
| 334 sys.exit(main()) | 339 sys.exit(main()) |
| OLD | NEW |