| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """This module provides shared functionality for the systems to generate | 6 """This module provides shared functionality for the systems to generate |
| 7 native binding from the IDL database.""" | 7 native binding from the IDL database.""" |
| 8 | 8 |
| 9 import emitter | 9 import emitter |
| 10 import os | 10 import os |
| 11 import systembase | 11 import systembase |
| 12 from generator import * | 12 from generator import * |
| 13 | 13 |
| 14 | 14 |
| 15 class NativeImplementationSystem(systembase.System): | 15 class NativeImplementationSystem(systembase.System): |
| 16 | 16 |
| 17 def __init__(self, options, auxiliary_dir): | 17 def __init__(self, options): |
| 18 super(NativeImplementationSystem, self).__init__(options) | 18 super(NativeImplementationSystem, self).__init__(options) |
| 19 self._auxiliary_dir = auxiliary_dir | |
| 20 self._cpp_header_files = [] | 19 self._cpp_header_files = [] |
| 21 self._cpp_impl_files = [] | 20 self._cpp_impl_files = [] |
| 22 | 21 |
| 23 def ImplementationGenerator(self, interface): | 22 def ImplementationGenerator(self, interface): |
| 24 return NativeImplementationGenerator(self, interface) | 23 return NativeImplementationGenerator(self, interface) |
| 25 | 24 |
| 26 def ProcessCallback(self, interface, info): | 25 def ProcessCallback(self, interface, info): |
| 27 self._interface = interface | 26 self._interface = interface |
| 28 | 27 |
| 29 if IsPureInterface(self._interface.id): | 28 if IsPureInterface(self._interface.id): |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 parent_interface = _FindInHierarchy(database, parent_interface, test) | 938 parent_interface = _FindInHierarchy(database, parent_interface, test) |
| 940 if parent_interface: | 939 if parent_interface: |
| 941 return parent_interface | 940 return parent_interface |
| 942 | 941 |
| 943 def _ToWebKitName(name): | 942 def _ToWebKitName(name): |
| 944 name = name[0].lower() + name[1:] | 943 name = name[0].lower() + name[1:] |
| 945 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(), | 944 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(), |
| 946 name) | 945 name) |
| 947 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize()
, | 946 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize()
, |
| 948 name) | 947 name) |
| OLD | NEW |