Index: Source/bindings/scripts/v8_interface.py |
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py |
index db90d4c09eb55a64bbd26bdd3f54021a24b4685f..fd92287221c17be846655dc25c39a51f75b3ac92 100644 |
--- a/Source/bindings/scripts/v8_interface.py |
+++ b/Source/bindings/scripts/v8_interface.py |
@@ -251,11 +251,17 @@ def generate_interface(interface): |
if method.name] # Skip anonymous special operations (methods) |
generate_method_overloads(methods) |
for method in methods: |
- method['do_generate_method_configuration'] = ( |
- method['do_not_check_signature'] and |
- not method['per_context_enabled_function'] and |
- # For overloaded methods, only generate one accessor |
- ('overload_index' not in method or method['overload_index'] == 1)) |
+ if 'overloads' in method: |
Nils Barth (inactive)
2014/06/11 06:28:28
Comment:
# For overloaded methods, only generate o
|
+ overloads = method['overloads'] |
+ method['do_generate_method_configuration'] = ( |
+ overloads['do_not_check_signature_any'] and |
Jens Widell
2014/06/10 09:42:47
I'm not 100 % sure about using "any" instead of "a
Nils Barth (inactive)
2014/06/11 06:28:28
haraken:
Thoughts on do_not_check_signature on ove
haraken
2014/06/11 06:38:08
Good question.
I think it doesn't make sense at a
|
+ not overloads['per_context_enabled_function_all']) |
Nils Barth (inactive)
2014/06/11 06:28:28
I'd slightly prefer |continue| to |else|
(slightly
|
+ else: |
+ method['do_generate_method_configuration'] = ( |
+ method['do_not_check_signature'] and |
+ not method['per_context_enabled_function'] and |
+ # Ignore any overload not handled by the case above |
Nils Barth (inactive)
2014/06/11 06:28:28
Comment tweak:
# Overloaded methods are handled ab
|
+ 'overload_index' not in method) |
# The value of the Function object’s “length” property is a Number |
# determined as follows: |
@@ -385,12 +391,15 @@ def generate_overloads(overloads): |
return { |
'deprecate_all_as': common_value(overloads, 'deprecate_as'), # [DeprecateAs] |
+ 'do_not_check_signature_any': any(method.get('do_not_check_signature') |
Nils Barth (inactive)
2014/06/11 06:28:28
Maybe a comment on this being potentially wrong if
|
+ for method in overloads), |
'length_tests_methods': length_tests_methods(effective_overloads_by_length), |
'minarg': lengths[0], |
# 1. Let maxarg be the length of the longest type list of the |
# entries in S. |
'maxarg': lengths[-1], |
'measure_all_as': common_value(overloads, 'measure_as'), # [MeasureAs] |
+ 'per_context_enabled_function_all': common_value(overloads, 'per_context_enabled_function'), # [PerContextEnabled] |
'valid_arities': lengths |
# Only need to report valid arities if there is a gap in the |
# sequence of possible lengths, otherwise invalid length means |