| Index: runtime/lib/growable_array.dart
|
| ===================================================================
|
| --- runtime/lib/growable_array.dart (revision 41737)
|
| +++ runtime/lib/growable_array.dart (working copy)
|
| @@ -2,7 +2,7 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -class _GrowableList<T> implements List<T> {
|
| +class _GrowableList<T> extends ListBase<T> {
|
|
|
| void insert(int index, T element) {
|
| if ((index < 0) || (index > length)) {
|
| @@ -67,23 +67,6 @@
|
| }
|
| }
|
|
|
| - void removeWhere(bool test(T element)) {
|
| - IterableMixinWorkaround.removeWhereList(this, test);
|
| - }
|
| -
|
| - void retainWhere(bool test(T element)) {
|
| - IterableMixinWorkaround.removeWhereList(this,
|
| - (T element) => !test(element));
|
| - }
|
| -
|
| - Iterable<T> getRange(int start, int end) {
|
| - return new IterableMixinWorkaround<T>().getRangeList(this, start, end);
|
| - }
|
| -
|
| - void setRange(int start, int end, Iterable<T> iterable, [int skipCount = 0]) {
|
| - IterableMixinWorkaround.setRangeList(this, start, end, iterable, skipCount);
|
| - }
|
| -
|
| void removeRange(int start, int end) {
|
| Lists.indicesCheck(this, start, end);
|
| Lists.copy(this, end, this, start, this.length - end);
|
| @@ -90,14 +73,6 @@
|
| this.length = this.length - (end - start);
|
| }
|
|
|
| - void replaceRange(int start, int end, Iterable<T> iterable) {
|
| - IterableMixinWorkaround.replaceRangeList(this, start, end, iterable);
|
| - }
|
| -
|
| - void fillRange(int start, int end, [T fillValue]) {
|
| - IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
|
| - }
|
| -
|
| List<T> sublist(int start, [int end]) {
|
| Lists.indicesCheck(this, start, end);
|
| if (end == null) end = this.length;
|
| @@ -226,14 +201,6 @@
|
| throw IterableElementError.tooMany();;
|
| }
|
|
|
| - int indexOf(Object element, [int start = 0]) {
|
| - return IterableMixinWorkaround.indexOfList(this, element, start);
|
| - }
|
| -
|
| - int lastIndexOf(Object element, [int start = null]) {
|
| - return IterableMixinWorkaround.lastIndexOfList(this, element, start);
|
| - }
|
| -
|
| void _grow(int new_length) {
|
| var new_data = new _List(new_length);
|
| for (int i = 0; i < length; i++) {
|
| @@ -244,10 +211,6 @@
|
|
|
| // Iterable interface.
|
|
|
| - bool contains(Object element) {
|
| - return IterableMixinWorkaround.contains(this, element);
|
| - }
|
| -
|
| void forEach(f(T element)) {
|
| int initialLength = length;
|
| for (int i = 0; i < length; i++) {
|
| @@ -324,62 +287,6 @@
|
| return buffer.toString();
|
| }
|
|
|
| - Iterable map(f(T element)) {
|
| - return IterableMixinWorkaround.mapList(this, f);
|
| - }
|
| -
|
| - T reduce(T combine(T value, T element)) {
|
| - return IterableMixinWorkaround.reduce(this, combine);
|
| - }
|
| -
|
| - fold(initialValue, combine(previousValue, T element)) {
|
| - return IterableMixinWorkaround.fold(this, initialValue, combine);
|
| - }
|
| -
|
| - Iterable<T> where(bool f(T element)) {
|
| - return new IterableMixinWorkaround<T>().where(this, f);
|
| - }
|
| -
|
| - Iterable expand(Iterable f(T element)) {
|
| - return IterableMixinWorkaround.expand(this, f);
|
| - }
|
| -
|
| - Iterable<T> take(int n) {
|
| - return new IterableMixinWorkaround<T>().takeList(this, n);
|
| - }
|
| -
|
| - Iterable<T> takeWhile(bool test(T value)) {
|
| - return new IterableMixinWorkaround<T>().takeWhile(this, test);
|
| - }
|
| -
|
| - Iterable<T> skip(int n) {
|
| - return new IterableMixinWorkaround<T>().skipList(this, n);
|
| - }
|
| -
|
| - Iterable<T> skipWhile(bool test(T value)) {
|
| - return new IterableMixinWorkaround<T>().skipWhile(this, test);
|
| - }
|
| -
|
| - bool every(bool f(T element)) {
|
| - return IterableMixinWorkaround.every(this, f);
|
| - }
|
| -
|
| - bool any(bool f(T element)) {
|
| - return IterableMixinWorkaround.any(this, f);
|
| - }
|
| -
|
| - T firstWhere(bool test(T value), {T orElse()}) {
|
| - return IterableMixinWorkaround.firstWhere(this, test, orElse);
|
| - }
|
| -
|
| - T lastWhere(bool test(T value), {T orElse()}) {
|
| - return IterableMixinWorkaround.lastWhereList(this, test, orElse);
|
| - }
|
| -
|
| - T singleWhere(bool test(T value)) {
|
| - return IterableMixinWorkaround.singleWhere(this, test);
|
| - }
|
| -
|
| T elementAt(int index) {
|
| return this[index];
|
| }
|
| @@ -394,17 +301,6 @@
|
| this.length = 0;
|
| }
|
|
|
| - Iterable<T> get reversed =>
|
| - new IterableMixinWorkaround<T>().reversedList(this);
|
| -
|
| - void sort([int compare(T a, T b)]) {
|
| - IterableMixinWorkaround.sortList(this, compare);
|
| - }
|
| -
|
| - void shuffle([Random random]) {
|
| - IterableMixinWorkaround.shuffleList(this, random);
|
| - }
|
| -
|
| String toString() => ListBase.listToString(this);
|
|
|
| Iterator<T> get iterator {
|
| @@ -429,8 +325,4 @@
|
| Set<T> toSet() {
|
| return new Set<T>.from(this);
|
| }
|
| -
|
| - Map<int, T> asMap() {
|
| - return new IterableMixinWorkaround<T>().asMapList(this);
|
| - }
|
| }
|
|
|