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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 return lambda suffix: extended_attributes['MeasureAs'] | 367 return lambda suffix: extended_attributes['MeasureAs'] |
368 if 'Measure' in extended_attributes: | 368 if 'Measure' in extended_attributes: |
369 includes.add('core/frame/UseCounter.h') | 369 includes.add('core/frame/UseCounter.h') |
370 measure_as_name = capitalize(definition_or_member.name) | 370 measure_as_name = capitalize(definition_or_member.name) |
371 if interface is not None: | 371 if interface is not None: |
372 measure_as_name = '%s_%s' % (capitalize(interface.name), measure_as_
name) | 372 measure_as_name = '%s_%s' % (capitalize(interface.name), measure_as_
name) |
373 return lambda suffix: 'V8%s_%s' % (measure_as_name, suffix) | 373 return lambda suffix: 'V8%s_%s' % (measure_as_name, suffix) |
374 return None | 374 return None |
375 | 375 |
376 | 376 |
377 # [PerContextEnabled] | |
378 def per_context_enabled_function_name(definition_or_member): | |
379 extended_attributes = definition_or_member.extended_attributes | |
380 if 'PerContextEnabled' not in extended_attributes: | |
381 return None | |
382 feature_name = extended_attributes['PerContextEnabled'] | |
383 return 'ContextFeatures::%sEnabled' % uncapitalize(feature_name) | |
384 | |
385 | |
386 # [RuntimeEnabled] | 377 # [RuntimeEnabled] |
387 def runtime_enabled_function_name(definition_or_member): | 378 def runtime_enabled_function_name(definition_or_member): |
388 """Returns the name of the RuntimeEnabledFeatures function. | 379 """Returns the name of the RuntimeEnabledFeatures function. |
389 | 380 |
390 The returned function checks if a method/attribute is enabled. | 381 The returned function checks if a method/attribute is enabled. |
391 Given extended attribute RuntimeEnabled=FeatureName, return: | 382 Given extended attribute RuntimeEnabled=FeatureName, return: |
392 RuntimeEnabledFeatures::{featureName}Enabled | 383 RuntimeEnabledFeatures::{featureName}Enabled |
393 """ | 384 """ |
394 extended_attributes = definition_or_member.extended_attributes | 385 extended_attributes = definition_or_member.extended_attributes |
395 if 'RuntimeEnabled' not in extended_attributes: | 386 if 'RuntimeEnabled' not in extended_attributes: |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 except StopIteration: | 499 except StopIteration: |
509 return None | 500 return None |
510 | 501 |
511 | 502 |
512 IdlInterface.indexed_property_getter = property(indexed_property_getter) | 503 IdlInterface.indexed_property_getter = property(indexed_property_getter) |
513 IdlInterface.indexed_property_setter = property(indexed_property_setter) | 504 IdlInterface.indexed_property_setter = property(indexed_property_setter) |
514 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) | 505 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) |
515 IdlInterface.named_property_getter = property(named_property_getter) | 506 IdlInterface.named_property_getter = property(named_property_getter) |
516 IdlInterface.named_property_setter = property(named_property_setter) | 507 IdlInterface.named_property_setter = property(named_property_setter) |
517 IdlInterface.named_property_deleter = property(named_property_deleter) | 508 IdlInterface.named_property_deleter = property(named_property_deleter) |
OLD | NEW |