Index: Source/bindings/scripts/v8_interface.py |
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py |
index 80049e1be1461fe5fc32d11eb13d9fac2311c69a..36c4b0ada023ff6082593fbad0b7aaa2ba0cd514 100644 |
--- a/Source/bindings/scripts/v8_interface.py |
+++ b/Source/bindings/scripts/v8_interface.py |
@@ -354,6 +354,15 @@ def generate_overloads(overloads): |
for index, method in enumerate(overloads, 1): |
method['overload_index'] = index |
+ runtime_enabled_features = set(method.get('runtime_enabled_function') |
Nils Barth (inactive)
2014/05/27 06:33:20
You don't need dict.get() here, do you?
Jens Widell
2014/05/27 06:46:20
Needed for overloaded constructors currently; gene
Nils Barth (inactive)
2014/05/27 07:24:17
Oh, good point.
get() is a bit better, since havin
|
+ for method in overloads) |
+ if len(runtime_enabled_features) > 1: |
Nils Barth (inactive)
2014/05/27 06:33:20
Shouldn't you use the utility common_value() funct
Jens Widell
2014/05/27 06:46:20
It returns None both if there is no common value a
Nils Barth (inactive)
2014/05/27 07:24:17
Oh, good point.
I'd prefer consistency with the o
Jens Widell
2014/05/27 07:39:17
That works nicely in the overload_resolution_metho
Jens Widell
2014/05/27 07:42:15
But that of course doesn't work for non-overloaded
Nils Barth (inactive)
2014/05/27 07:50:42
That sounds great!
Nils Barth (inactive)
2014/05/27 07:50:42
...why not? (confused)
|
+ # More than one different value for [RuntimeEnabled] among the |
Nils Barth (inactive)
2014/05/27 06:33:20
Could you clarify that this also works for *missin
Jens Widell
2014/05/27 06:46:20
Yeah, I'm essentially treating None as any other v
Nils Barth (inactive)
2014/05/27 07:24:17
None is confusing enough that I'd appreciate a com
|
+ # overloads; need to handle as part of overload resoultion. |
+ for method in overloads: |
+ method['overload_runtime_enabled_function'] = method['runtime_enabled_function'] |
+ method['runtime_enabled_function'] = None |
+ |
effective_overloads_by_length = effective_overload_set_by_length(overloads) |
lengths = [length for length, _ in effective_overloads_by_length] |
@@ -697,7 +706,10 @@ def resolution_tests_methods(effective_overloads): |
method = next(method for idl_type, method in idl_types_methods |
if idl_type.name == 'String' or idl_type.is_enum) |
yield 'true', method |
- return |
+ # Stop here unless this overload (and not all overloads) is runtime |
Jens Widell
2014/05/23 14:55:16
A simpler fix here would of course be to just remo
Nils Barth (inactive)
2014/05/27 06:33:20
That's fine to do: CG simplicity is a higher prior
|
+ # enabled. |
+ if not method.get('overload_runtime_enabled_function'): |
+ return |
except StopIteration: |
pass |