Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Unified Diff: runtime/lib/collection_patch.dart

Issue 2467113003: Make EfficientLength extend Iterable. (Closed)
Patch Set: Reverted, prepare to reland. Make new test not break web-testing framework. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/array_patch.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/collection_patch.dart
diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart
index 0dea1458f3e2d7ec0de0596f3cf5ad6010210077..f7cd33d1da5a630eb92428c25db8702185bca654 100644
--- a/runtime/lib/collection_patch.dart
+++ b/runtime/lib/collection_patch.dart
@@ -435,8 +435,7 @@ class _HashMapEntry {
_HashMapEntry(this.key, this.value, this.hashCode, this.next);
}
-abstract class _HashMapIterable<E> extends IterableBase<E>
- implements EfficientLength {
+abstract class _HashMapIterable<E> extends EfficientLengthIterable<E> {
final HashMap _map;
_HashMapIterable(this._map);
int get length => _map.length;
@@ -838,8 +837,7 @@ class _LinkedHashMapEntry extends _HashMapEntry {
}
}
-class _LinkedHashMapKeyIterable<K> extends IterableBase<K>
- implements EfficientLength {
+class _LinkedHashMapKeyIterable<K> extends EfficientLengthIterable<K> {
LinkedHashMap<K, dynamic> _map;
_LinkedHashMapKeyIterable(this._map);
Iterator<K> get iterator => new _LinkedHashMapKeyIterator<K>(_map);
@@ -850,8 +848,7 @@ class _LinkedHashMapKeyIterable<K> extends IterableBase<K>
Set<K> toSet() => _map._newKeySet()..addAll(this);
}
-class _LinkedHashMapValueIterable<V> extends IterableBase<V>
- implements EfficientLength {
+class _LinkedHashMapValueIterable<V> extends EfficientLengthIterable<V> {
LinkedHashMap<dynamic, V> _map;
_LinkedHashMapValueIterable(this._map);
Iterator<V> get iterator => new _LinkedHashMapValueIterator<V>(_map);
« no previous file with comments | « runtime/lib/array_patch.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698