| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 import os.path | 39 import os.path |
| 40 from utilities import idl_filename_to_component, is_valid_component_dependency | 40 from utilities import idl_filename_to_component, is_valid_component_dependency |
| 41 | 41 |
| 42 # The following extended attributes can be applied to a dependency interface, | 42 # The following extended attributes can be applied to a dependency interface, |
| 43 # and are then applied to the individual members when merging. | 43 # and are then applied to the individual members when merging. |
| 44 # Note that this moves the extended attribute from the interface to the member, | 44 # Note that this moves the extended attribute from the interface to the member, |
| 45 # which changes the semantics and yields different code than the same extended | 45 # which changes the semantics and yields different code than the same extended |
| 46 # attribute on the main interface. | 46 # attribute on the main interface. |
| 47 DEPENDENCY_EXTENDED_ATTRIBUTES = frozenset([ | 47 DEPENDENCY_EXTENDED_ATTRIBUTES = frozenset([ |
| 48 'Conditional', | 48 'Conditional', |
| 49 'PerContextEnabled', | |
| 50 'RuntimeEnabled', | 49 'RuntimeEnabled', |
| 51 'TypeChecking', | 50 'TypeChecking', |
| 52 ]) | 51 ]) |
| 53 | 52 |
| 54 | 53 |
| 55 class InterfaceDependencyResolver(object): | 54 class InterfaceDependencyResolver(object): |
| 56 def __init__(self, interfaces_info, reader): | 55 def __init__(self, interfaces_info, reader): |
| 57 """Initialize dependency resolver. | 56 """Initialize dependency resolver. |
| 58 | 57 |
| 59 Args: | 58 Args: |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 for key, value in extras.items(): | 298 for key, value in extras.items(): |
| 300 if key not in attributes: | 299 if key not in attributes: |
| 301 attributes[key] = value | 300 attributes[key] = value |
| 302 | 301 |
| 303 for attribute in dependency_interface.attributes: | 302 for attribute in dependency_interface.attributes: |
| 304 update_attributes(attribute.extended_attributes, merged_extended_attribu
tes) | 303 update_attributes(attribute.extended_attributes, merged_extended_attribu
tes) |
| 305 for constant in dependency_interface.constants: | 304 for constant in dependency_interface.constants: |
| 306 update_attributes(constant.extended_attributes, merged_extended_attribut
es) | 305 update_attributes(constant.extended_attributes, merged_extended_attribut
es) |
| 307 for operation in dependency_interface.operations: | 306 for operation in dependency_interface.operations: |
| 308 update_attributes(operation.extended_attributes, merged_extended_attribu
tes) | 307 update_attributes(operation.extended_attributes, merged_extended_attribu
tes) |
| OLD | NEW |