| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, 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 generates Dart APIs from the IDL database.""" | 6 """This module generates Dart APIs from the IDL database.""" |
| 7 | 7 |
| 8 import emitter | 8 import emitter |
| 9 import idlnode | 9 import idlnode |
| 10 import logging | 10 import logging |
| (...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 '\n' | 1273 '\n' |
| 1274 ' void sort(int compare($TYPE a, $TYPE b)) {\n' | 1274 ' void sort(int compare($TYPE a, $TYPE b)) {\n' |
| 1275 ' throw new UnsupportedOperationException("Cannot sort immutable List
.");\n' | 1275 ' throw new UnsupportedOperationException("Cannot sort immutable List
.");\n' |
| 1276 ' }\n' | 1276 ' }\n' |
| 1277 '\n' | 1277 '\n' |
| 1278 ' void copyFrom(List<Object> src, int srcStart, ' | 1278 ' void copyFrom(List<Object> src, int srcStart, ' |
| 1279 'int dstStart, int count) {\n' | 1279 'int dstStart, int count) {\n' |
| 1280 ' throw new UnsupportedOperationException("This object is immutable."
);\n' | 1280 ' throw new UnsupportedOperationException("This object is immutable."
);\n' |
| 1281 ' }\n' | 1281 ' }\n' |
| 1282 '\n' | 1282 '\n' |
| 1283 ' int indexOf($TYPE element, int startIndex) {\n' | 1283 ' int indexOf($TYPE element, [int start = 0]) {\n' |
| 1284 ' return _Lists.indexOf(this, element, startIndex, this.length);\n' | 1284 ' return _Lists.indexOf(this, element, start, this.length);\n' |
| 1285 ' }\n' | 1285 ' }\n' |
| 1286 '\n' | 1286 '\n' |
| 1287 ' int lastIndexOf($TYPE element, int startIndex) {\n' | 1287 ' int lastIndexOf($TYPE element, [int start = null]) {\n' |
| 1288 ' return _Lists.lastIndexOf(this, element, startIndex);\n' | 1288 ' if (start === null) start = length - 1;\n' |
| 1289 ' return _Lists.lastIndexOf(this, element, start);\n' |
| 1289 ' }\n' | 1290 ' }\n' |
| 1290 '\n' | 1291 '\n' |
| 1291 ' int clear() {\n' | 1292 ' int clear() {\n' |
| 1292 ' throw new UnsupportedOperationException("Cannot clear immutable Lis
t.");\n' | 1293 ' throw new UnsupportedOperationException("Cannot clear immutable Lis
t.");\n' |
| 1293 ' }\n' | 1294 ' }\n' |
| 1294 '\n' | 1295 '\n' |
| 1295 ' $TYPE removeLast() {\n' | 1296 ' $TYPE removeLast() {\n' |
| 1296 ' throw new UnsupportedOperationException("Cannot removeLast on immut
able List.");\n' | 1297 ' throw new UnsupportedOperationException("Cannot removeLast on immut
able List.");\n' |
| 1297 ' }\n' | 1298 ' }\n' |
| 1298 '\n' | 1299 '\n' |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1738 self._batched_operation_names.append(info.name) | 1739 self._batched_operation_names.append(info.name) |
| 1739 | 1740 |
| 1740 def AddSecondaryGetter(self, interface, attr): | 1741 def AddSecondaryGetter(self, interface, attr): |
| 1741 self.AddGetter(attr) | 1742 self.AddGetter(attr) |
| 1742 | 1743 |
| 1743 def AddSecondarySetter(self, interface, attr): | 1744 def AddSecondarySetter(self, interface, attr): |
| 1744 self.AddSetter(attr) | 1745 self.AddSetter(attr) |
| 1745 | 1746 |
| 1746 def AddSecondaryOperation(self, interface, info): | 1747 def AddSecondaryOperation(self, interface, info): |
| 1747 self.AddOperation(info) | 1748 self.AddOperation(info) |
| OLD | NEW |