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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 'core/dom/Document.h', | 59 'core/dom/Document.h', |
60 'platform/TraceEvent.h', | 60 'platform/TraceEvent.h', |
61 'wtf/GetPtr.h', # FIXME: remove if can eliminate WTF::getPtr | 61 'wtf/GetPtr.h', # FIXME: remove if can eliminate WTF::getPtr |
62 'wtf/RefPtr.h', | 62 'wtf/RefPtr.h', |
63 ]) | 63 ]) |
64 | 64 |
65 | 65 |
66 def generate_interface(interface): | 66 def generate_interface(interface): |
67 includes.clear() | 67 includes.clear() |
68 includes.update(INTERFACE_CPP_INCLUDES) | 68 includes.update(INTERFACE_CPP_INCLUDES) |
69 header_includes = INTERFACE_H_INCLUDES | 69 header_includes = set(INTERFACE_H_INCLUDES) |
Nils Barth (inactive)
2014/02/24 08:38:56
Could you write this as .copy() instead, to make t
Nils Barth (inactive)
2014/02/25 07:29:59
Actually, I grabbed this in:
Use a class for CodeG
terry
2014/02/27 23:40:26
Thanks, frozenset is much nicer.
On 2014/02/25 07:
| |
70 | 70 |
71 parent_interface = interface.parent | 71 parent_interface = interface.parent |
72 if parent_interface: | 72 if parent_interface: |
73 header_includes.update(v8_types.includes_for_type(parent_interface)) | 73 header_includes.update(v8_types.includes_for_type(parent_interface)) |
74 extended_attributes = interface.extended_attributes | 74 extended_attributes = interface.extended_attributes |
75 | 75 |
76 is_audio_buffer = inherits_interface(interface.name, 'AudioBuffer') | 76 is_audio_buffer = inherits_interface(interface.name, 'AudioBuffer') |
77 if is_audio_buffer: | 77 if is_audio_buffer: |
78 includes.add('modules/webaudio/AudioBuffer.h') | 78 includes.add('modules/webaudio/AudioBuffer.h') |
79 | 79 |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
709 deleter = next( | 709 deleter = next( |
710 method | 710 method |
711 for method in interface.operations | 711 for method in interface.operations |
712 if ('deleter' in method.specials and | 712 if ('deleter' in method.specials and |
713 len(method.arguments) == 1 and | 713 len(method.arguments) == 1 and |
714 method.arguments[0].idl_type == 'DOMString')) | 714 method.arguments[0].idl_type == 'DOMString')) |
715 except StopIteration: | 715 except StopIteration: |
716 return None | 716 return None |
717 | 717 |
718 return property_deleter(deleter) | 718 return property_deleter(deleter) |
OLD | NEW |