Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Side by Side Diff: Source/bindings/scripts/compute_interfaces_info_individual.py

Issue 699713003: IDL: ArrayBuffer and ArrayBufferView support for union types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_union.py » ('j') | Source/bindings/templates/union.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return (thing.idl_type for thing in things 136 return (thing.idl_type for thing in things
137 if thing.idl_type.is_union_type) 137 if thing.idl_type.is_union_type)
138 138
139 this_union_types = set() 139 this_union_types = set()
140 for interface in definitions.interfaces.itervalues(): 140 for interface in definitions.interfaces.itervalues():
141 this_union_types.update(union_types_from(interface.attributes)) 141 this_union_types.update(union_types_from(interface.attributes))
142 for operation in interface.operations: 142 for operation in interface.operations:
143 this_union_types.update(union_types_from(operation.arguments)) 143 this_union_types.update(union_types_from(operation.arguments))
144 if operation.idl_type.is_union_type: 144 if operation.idl_type.is_union_type:
145 this_union_types.add(operation.idl_type) 145 this_union_types.add(operation.idl_type)
146 for constructor in interface.constructors:
147 this_union_types.update(union_types_from(constructor.arguments))
148 for constructor in interface.custom_constructors:
149 this_union_types.update(union_types_from(constructor.arguments))
146 for callback_function in definitions.callback_functions.itervalues(): 150 for callback_function in definitions.callback_functions.itervalues():
147 this_union_types.update(union_types_from(callback_function.arguments)) 151 this_union_types.update(union_types_from(callback_function.arguments))
148 if callback_function.idl_type.is_union_type: 152 if callback_function.idl_type.is_union_type:
149 this_union_types.add(callback_function.idl_type) 153 this_union_types.add(callback_function.idl_type)
150 for dictionary in definitions.dictionaries.itervalues(): 154 for dictionary in definitions.dictionaries.itervalues():
151 this_union_types.update(union_types_from(dictionary.members)) 155 this_union_types.update(union_types_from(dictionary.members))
152 return this_union_types 156 return this_union_types
153 157
154 158
155 class InterfaceInfoCollector(object): 159 class InterfaceInfoCollector(object):
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 276
273 write_pickle_file(options.interfaces_info_file, 277 write_pickle_file(options.interfaces_info_file,
274 info_collector.get_info_as_dict(), 278 info_collector.get_info_as_dict(),
275 options.write_file_only_if_changed) 279 options.write_file_only_if_changed)
276 write_pickle_file(options.component_info_file, 280 write_pickle_file(options.component_info_file,
277 info_collector.get_component_info_as_dict(), 281 info_collector.get_component_info_as_dict(),
278 options.write_file_only_if_changed) 282 options.write_file_only_if_changed)
279 283
280 if __name__ == '__main__': 284 if __name__ == '__main__':
281 sys.exit(main()) 285 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_union.py » ('j') | Source/bindings/templates/union.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698