| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # coding=utf-8 | 2 # coding=utf-8 |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 # Skip anonymous special operations (methods name empty). | 162 # Skip anonymous special operations (methods name empty). |
| 163 if (method.name and | 163 if (method.name and |
| 164 # detect unnamed getters from v8_interface. | 164 # detect unnamed getters from v8_interface. |
| 165 method.name != 'anonymousNamedGetter')] | 165 method.name != 'anonymousNamedGetter')] |
| 166 compute_method_overloads_context(methods) | 166 compute_method_overloads_context(methods) |
| 167 for method in methods: | 167 for method in methods: |
| 168 method['do_generate_method_configuration'] = ( | 168 method['do_generate_method_configuration'] = ( |
| 169 # For overloaded methods, only generate one accessor | 169 # For overloaded methods, only generate one accessor |
| 170 ('overload_index' not in method or method['overload_index'] == 1)) | 170 ('overload_index' not in method or method['overload_index'] == 1)) |
| 171 | 171 |
| 172 for method in methods: |
| 173 assert 'overloads' not in method, 'Dart does not support overloads, %s i
n %s' % (method['name'], interface.name) |
| 174 |
| 172 generate_method_native_entries(interface, methods, 'Method') | 175 generate_method_native_entries(interface, methods, 'Method') |
| 173 | 176 |
| 174 context.update({ | 177 context.update({ |
| 175 'has_method_configuration': any(method['do_generate_method_configuration
'] for method in methods), | 178 'has_method_configuration': any(method['do_generate_method_configuration
'] for method in methods), |
| 176 'methods': methods, | 179 'methods': methods, |
| 177 }) | 180 }) |
| 178 | 181 |
| 179 context.update({ | 182 context.update({ |
| 180 'indexed_property_getter': indexed_property_getter(interface), | 183 'indexed_property_getter': indexed_property_getter(interface), |
| 181 'indexed_property_setter': indexed_property_setter(interface), | 184 'indexed_property_setter': indexed_property_setter(interface), |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 ] | 735 ] |
| 733 props = [(p1 + "_" + p2, name, arity) | 736 props = [(p1 + "_" + p2, name, arity) |
| 734 for (p1, (p2, name, arity)) in itertools.product(pre, post)] | 737 for (p1, (p2, name, arity)) in itertools.product(pre, post)] |
| 735 for t in props: | 738 for t in props: |
| 736 add(*t) | 739 add(*t) |
| 737 | 740 |
| 738 for (p, name, arity) in props: | 741 for (p, name, arity) in props: |
| 739 if context[p]: | 742 if context[p]: |
| 740 if context[p].get('is_custom_property_query'): | 743 if context[p].get('is_custom_property_query'): |
| 741 add(p, '__propertyQuery__', 1) | 744 add(p, '__propertyQuery__', 1) |
| OLD | NEW |