Chromium Code Reviews| Index: runtime/lib/byte_array.dart |
| diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart |
| index d6cd4e430ef3fbfb7a517bc09c3ca14a42d2a102..33c1a618dc8ce483d7b99e8adeb963bbeb0739c5 100644 |
| --- a/runtime/lib/byte_array.dart |
| +++ b/runtime/lib/byte_array.dart |
| @@ -132,8 +132,8 @@ abstract class _ByteArrayBase { |
| } |
| } |
| - Collection mappedBy(f(element)) { |
| - return Collections.mappedBy(this, new List(), f); |
| + Iterable mappedBy(f(element)) { |
| + return new MappedIterable<int, dynamic>(this, f); |
| } |
| Dynamic reduce(Dynamic initialValue, |
| @@ -1612,7 +1612,7 @@ class _ByteArrayView implements ByteArray { |
| } |
| -class _ByteArrayViewBase { |
| +class _ByteArrayViewBase extends Collection<int> { |
|
Ivan Posva
2012/11/26 18:29:09
Please see previous comment about extra costs of e
floitsch
2012/11/28 13:48:23
It is much easier if we only have to implement our
|
| abstract num operator[](int index); |
| // Methods implementing the Collection interface. |
| @@ -1624,27 +1624,6 @@ class _ByteArrayViewBase { |
| } |
| } |
| - Collection mappedBy(f(element)) { |
| - return Collections.mappedBy(this, new List(), f); |
| - } |
| - |
| - Dynamic reduce(Dynamic initialValue, |
| - Dynamic combine(Dynamic initialValue, element)) { |
| - return Collections.reduce(this, initialValue, combine); |
| - } |
| - |
| - Collection where(bool f(element)) { |
| - return Collections.where(this, new List(), f); |
| - } |
| - |
| - bool every(bool f(element)) { |
| - return Collections.every(this, f); |
| - } |
| - |
| - bool some(bool f(element)) { |
| - return Collections.some(this, f);; |
| - } |
| - |
| bool get isEmpty { |
| return this.length == 0; |
| } |