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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 if method.is_constructor: | 283 if method.is_constructor: |
284 call_with_values = interface.extended_attributes.get('ConstructorCallWit
h') | 284 call_with_values = interface.extended_attributes.get('ConstructorCallWit
h') |
285 else: | 285 else: |
286 call_with_values = method.extended_attributes.get('CallWith') | 286 call_with_values = method.extended_attributes.get('CallWith') |
287 cpp_arguments.extend(v8_utilities.call_with_arguments(call_with_values)) | 287 cpp_arguments.extend(v8_utilities.call_with_arguments(call_with_values)) |
288 | 288 |
289 # Members of IDL partial interface definitions are implemented in C++ as | 289 # Members of IDL partial interface definitions are implemented in C++ as |
290 # static member functions, which for instance members (non-static members) | 290 # static member functions, which for instance members (non-static members) |
291 # take *impl as their first argument | 291 # take *impl as their first argument |
292 if ('PartialInterfaceImplementedAs' in method.extended_attributes and | 292 if ('PartialInterfaceImplementedAs' in method.extended_attributes and |
| 293 not 'ImplementedInPrivateScript' in method.extended_attributes and |
293 not method.is_static): | 294 not method.is_static): |
294 cpp_arguments.append('*impl') | 295 cpp_arguments.append('*impl') |
295 cpp_arguments.extend(cpp_argument(argument) for argument in arguments) | 296 cpp_arguments.extend(cpp_argument(argument) for argument in arguments) |
296 | 297 |
297 this_union_arguments = method.idl_type and method.idl_type.union_arguments | 298 this_union_arguments = method.idl_type and method.idl_type.union_arguments |
298 if this_union_arguments: | 299 if this_union_arguments: |
299 cpp_arguments.extend(this_union_arguments) | 300 cpp_arguments.extend(this_union_arguments) |
300 | 301 |
301 if 'ImplementedInPrivateScript' in method.extended_attributes: | 302 if 'ImplementedInPrivateScript' in method.extended_attributes: |
302 if method.idl_type.name != 'void': | 303 if method.idl_type.name != 'void': |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 394 |
394 | 395 |
395 def argument_default_cpp_value(argument): | 396 def argument_default_cpp_value(argument): |
396 if not argument.default_value: | 397 if not argument.default_value: |
397 return None | 398 return None |
398 return argument.idl_type.literal_cpp_value(argument.default_value) | 399 return argument.idl_type.literal_cpp_value(argument.default_value) |
399 | 400 |
400 IdlType.union_arguments = property(lambda self: None) | 401 IdlType.union_arguments = property(lambda self: None) |
401 IdlUnionType.union_arguments = property(union_arguments) | 402 IdlUnionType.union_arguments = property(union_arguments) |
402 IdlArgument.default_cpp_value = property(argument_default_cpp_value) | 403 IdlArgument.default_cpp_value = property(argument_default_cpp_value) |
OLD | NEW |