| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of serialization; | 5 part of serialization; |
| 6 | 6 |
| 7 // TODO(alanknight): We should have an example and tests for subclassing | 7 // TODO(alanknight): We should have an example and tests for subclassing |
| 8 // serialization rule rather than using the hard-coded ClosureToMap rule. And | 8 // serialization rule rather than using the hard-coded ClosureToMap rule. And |
| 9 // possibly an abstract superclass that's designed to be subclassed that way. | 9 // possibly an abstract superclass that's designed to be subclassed that way. |
| 10 /** | 10 /** |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 get last => _reader.inflateReference(_raw.last); | 535 get last => _reader.inflateReference(_raw.last); |
| 536 | 536 |
| 537 // These operations, and other inherited methods that iterate over the whole | 537 // These operations, and other inherited methods that iterate over the whole |
| 538 // list will work, but may be expensive, and are probably | 538 // list will work, but may be expensive, and are probably |
| 539 // best avoided. | 539 // best avoided. |
| 540 List get _inflated => _raw.map(_reader.inflateReference); | 540 List get _inflated => _raw.map(_reader.inflateReference); |
| 541 Iterator get iterator => _inflated.iterator; | 541 Iterator get iterator => _inflated.iterator; |
| 542 indexOf(x, [pos = 0]) => _inflated.toList().indexOf(x); | 542 indexOf(x, [pos = 0]) => _inflated.toList().indexOf(x); |
| 543 lastIndexOf(x, [pos]) => _inflated.toList().lastIndexOf(x); | 543 lastIndexOf(x, [pos]) => _inflated.toList().lastIndexOf(x); |
| 544 | 544 |
| 545 Map<int, dynamic> asMap() => IterableMixinWorkaround.asMapList(this); |
| 546 |
| 545 // These operations are all invalid | 547 // These operations are all invalid |
| 546 _throw() { | 548 _throw() { |
| 547 throw new UnsupportedError("Not modifiable"); | 549 throw new UnsupportedError("Not modifiable"); |
| 548 } | 550 } |
| 549 operator []=(x, y) => _throw(); | 551 operator []=(x, y) => _throw(); |
| 550 add(x) => _throw(); | 552 add(x) => _throw(); |
| 551 addLast(x) => _throw(); | 553 addLast(x) => _throw(); |
| 552 addAll(x) => _throw(); | 554 addAll(x) => _throw(); |
| 553 sort([f]) => _throw(); | 555 sort([f]) => _throw(); |
| 554 clear() => _throw(); | 556 clear() => _throw(); |
| 555 removeAt(x) => _throw(); | 557 removeAt(x) => _throw(); |
| 556 remove(x) => _throw(); | 558 remove(x) => _throw(); |
| 557 removeLast() => _throw(); | 559 removeLast() => _throw(); |
| 558 removeAll(x) => _throw(); | 560 removeAll(x) => _throw(); |
| 559 retainAll(x) => _throw(); | 561 retainAll(x) => _throw(); |
| 560 removeMatching(x) => _throw(); | 562 removeMatching(x) => _throw(); |
| 561 retainMatching(x) => _throw(); | 563 retainMatching(x) => _throw(); |
| 562 getRange(x, y) => _throw(); | 564 getRange(x, y) => _throw(); |
| 563 setRange(x, y, z, [a]) => _throw(); | 565 setRange(x, y, z, [a]) => _throw(); |
| 564 removeRange(x, y) => _throw(); | 566 removeRange(x, y) => _throw(); |
| 565 insertRange(x, y, [z]) => _throw(); | 567 insertRange(x, y, [z]) => _throw(); |
| 566 get reversed => _throw(); | 568 get reversed => _throw(); |
| 567 void set length(x) => _throw(); | 569 void set length(x) => _throw(); |
| 568 } | 570 } |
| OLD | NEW |