| 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 13 matching lines...) Expand all Loading... |
| 24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 | 30 |
| 31 """Compute global interface information for individual IDL files. | 31 """Compute global interface information for individual IDL files. |
| 32 | 32 |
| 33 Auxiliary module for compute_interfaces_info_overall, which consolidates | 33 Auxiliary module for compute_interfaces_info_overall, which consolidates |
| 34 this individual information. | 34 this individual information, computing info that spans multiple files |
| 35 (dependencies and ancestry). |
| 36 |
| 37 This distinction is so that individual interface info can be computed |
| 38 separately for each component (avoiding duplicated reading of individual |
| 39 files), then consolidated using *only* the info visible to a given component. |
| 35 | 40 |
| 36 Design doc: http://www.chromium.org/developers/design-documents/idl-build | 41 Design doc: http://www.chromium.org/developers/design-documents/idl-build |
| 37 """ | 42 """ |
| 38 | 43 |
| 39 from collections import defaultdict | 44 from collections import defaultdict |
| 40 import optparse | 45 import optparse |
| 41 import os | 46 import os |
| 42 import posixpath | 47 import posixpath |
| 43 import sys | 48 import sys |
| 44 | 49 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 for idl_filename in idl_files: | 183 for idl_filename in idl_files: |
| 179 compute_info_individual(idl_filename, options.component_dir) | 184 compute_info_individual(idl_filename, options.component_dir) |
| 180 | 185 |
| 181 write_pickle_file(options.interfaces_info_file, | 186 write_pickle_file(options.interfaces_info_file, |
| 182 info_individual(), | 187 info_individual(), |
| 183 options.write_file_only_if_changed) | 188 options.write_file_only_if_changed) |
| 184 | 189 |
| 185 | 190 |
| 186 if __name__ == '__main__': | 191 if __name__ == '__main__': |
| 187 sys.exit(main()) | 192 sys.exit(main()) |
| OLD | NEW |