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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 # - A partial interface defined in core cannot update | 178 # - A partial interface defined in core cannot update |
179 # the original interface defined in modules. | 179 # the original interface defined in modules. |
180 if not is_valid_component_dependency(dependency_component, component ): | 180 if not is_valid_component_dependency(dependency_component, component ): |
181 raise Exception('The partial interface:%s in %s cannot update ' | 181 raise Exception('The partial interface:%s in %s cannot update ' |
182 'the original interface:%s in %s' % (dependency_ interface.name, | 182 'the original interface:%s in %s' % (dependency_ interface.name, |
183 dependency_ component, | 183 dependency_ component, |
184 target_inte rface.name, | 184 target_inte rface.name, |
185 component)) | 185 component)) |
186 | 186 |
187 if dependency_component in resolved_definitions: | 187 if dependency_component in resolved_definitions: |
188 dependency_interface.extended_attributes.pop('ImplementedAs', No ne) | |
bashi
2015/04/02 23:15:27
Without having comment, it's difficult to understa
tasak
2015/04/03 05:22:53
Done.
| |
188 resolved_definitions[dependency_component].update(dependency_def initions) | 189 resolved_definitions[dependency_component].update(dependency_def initions) |
189 continue | 190 continue |
190 | 191 |
191 dependency_interface.extended_attributes.update(target_interface.ext ended_attributes) | 192 dependency_interface.extended_attributes.update(target_interface.ext ended_attributes) |
192 assert target_interface == definitions.interfaces[dependency_interfa ce.name] | 193 assert target_interface == definitions.interfaces[dependency_interfa ce.name] |
194 if 'ImplementedAs' not in target_interface.extended_attributes: | |
195 dependency_interface.extended_attributes.pop('ImplementedAs', No ne) | |
193 dependency_interface.original_interface = target_interface | 196 dependency_interface.original_interface = target_interface |
194 target_interface.partial_interfaces.append(dependency_interface) | 197 target_interface.partial_interfaces.append(dependency_interface) |
195 resolved_definitions[dependency_component] = dependency_definitions | 198 resolved_definitions[dependency_component] = dependency_definitions |
196 else: | 199 else: |
197 # Case: target_interface implements dependency_interface. | 200 # Case: target_interface implements dependency_interface. |
198 # So, | 201 # So, |
199 # - An interface defined in modules can implement some interface | 202 # - An interface defined in modules can implement some interface |
200 # defined in core. | 203 # defined in core. |
201 # In this case, we need "NoInterfaceObject" extended attribute. | 204 # In this case, we need "NoInterfaceObject" extended attribute. |
202 # However, | 205 # However, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 for key, value in extras.items(): | 282 for key, value in extras.items(): |
280 if key not in attributes: | 283 if key not in attributes: |
281 attributes[key] = value | 284 attributes[key] = value |
282 | 285 |
283 for attribute in dependency_interface.attributes: | 286 for attribute in dependency_interface.attributes: |
284 update_attributes(attribute.extended_attributes, merged_extended_attribu tes) | 287 update_attributes(attribute.extended_attributes, merged_extended_attribu tes) |
285 for constant in dependency_interface.constants: | 288 for constant in dependency_interface.constants: |
286 update_attributes(constant.extended_attributes, merged_extended_attribut es) | 289 update_attributes(constant.extended_attributes, merged_extended_attribut es) |
287 for operation in dependency_interface.operations: | 290 for operation in dependency_interface.operations: |
288 update_attributes(operation.extended_attributes, merged_extended_attribu tes) | 291 update_attributes(operation.extended_attributes, merged_extended_attribu tes) |
OLD | NEW |