| Index: runtime/lib/collection_patch.dart
|
| diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart
|
| index 81aa289f17ebc60e01e8982f2ca2cd7949a5843d..e72c086fc55a12438ac26c12ba0d82afa44823c1 100644
|
| --- a/runtime/lib/collection_patch.dart
|
| +++ b/runtime/lib/collection_patch.dart
|
| @@ -540,7 +540,7 @@ patch class HashSet<E> {
|
| /* patch */ factory HashSet.identity() = _IdentityHashSet<E>;
|
| }
|
|
|
| -class _HashSet<E> extends _HashSetBase<E> implements HashSet<E> {
|
| +class _HashSet<E> extends SetBase<E> implements HashSet<E> {
|
| static const int _INITIAL_CAPACITY = 8;
|
|
|
| List<_HashSetEntry> _buckets = new List(_INITIAL_CAPACITY);
|
| @@ -634,10 +634,6 @@ class _HashSet<E> extends _HashSetBase<E> implements HashSet<E> {
|
| }
|
| }
|
|
|
| - void retainAll(Iterable<Object> objectsToRetain) {
|
| - super._retainAll(objectsToRetain, (o) => o is E);
|
| - }
|
| -
|
| void _filterWhere(bool test(E element), bool removeMatching) {
|
| int length = _buckets.length;
|
| for (int index = 0; index < length; index++) {
|
| @@ -711,13 +707,13 @@ class _HashSet<E> extends _HashSetBase<E> implements HashSet<E> {
|
| _buckets = newBuckets;
|
| }
|
|
|
| - HashSet<E> _newSet() => new _HashSet<E>();
|
| + HashSet<E> cloneEmpty() => new _HashSet<E>();
|
| }
|
|
|
| class _IdentityHashSet<E> extends _HashSet<E> {
|
| int _hashCode(e) => identityHashCode(e);
|
| bool _equals(e1, e2) => identical(e1, e2);
|
| - HashSet<E> _newSet() => new _IdentityHashSet<E>();
|
| + HashSet<E> cloneEmpty() => new _IdentityHashSet<E>();
|
| }
|
|
|
| class _CustomHashSet<E> extends _HashSet<E> {
|
| @@ -757,14 +753,11 @@ class _CustomHashSet<E> extends _HashSet<E> {
|
| }
|
| }
|
|
|
| - void retainAll(Iterable<Object> elements) {
|
| - super._retainAll(elements, _validKey);
|
| - }
|
| -
|
| bool _equals(e1, e2) => _equality(e1, e2);
|
| int _hashCode(e) => _hasher(e);
|
|
|
| - HashSet<E> _newSet() => new _CustomHashSet<E>(_equality, _hasher, _validKey);
|
| + HashSet<E> cloneEmpty() =>
|
| + new _CustomHashSet<E>(_equality, _hasher, _validKey);
|
| }
|
|
|
| class _HashSetEntry {
|
| @@ -1174,13 +1167,13 @@ class _LinkedHashSet<E> extends _HashSet<E>
|
| super.clear();
|
| }
|
|
|
| - HashSet<E> _newSet() => new _LinkedHashSet<E>();
|
| + HashSet<E> cloneEmpty() => new _LinkedHashSet<E>();
|
| }
|
|
|
| class _LinkedIdentityHashSet<E> extends _LinkedHashSet<E> {
|
| int _hashCode(e) => identityHashCode(e);
|
| bool _equals(e1, e2) => identical(e1, e2);
|
| - HashSet<E> _newSet() => new _LinkedIdentityHashSet<E>();
|
| + HashSet<E> cloneEmpty() => new _LinkedIdentityHashSet<E>();
|
| }
|
|
|
| class _LinkedCustomHashSet<E> extends _LinkedHashSet<E> {
|
| @@ -1225,11 +1218,7 @@ class _LinkedCustomHashSet<E> extends _LinkedHashSet<E> {
|
| }
|
| }
|
|
|
| - void retainAll(Iterable<Object> elements) {
|
| - super._retainAll(elements, _validKey);
|
| - }
|
| -
|
| - HashSet<E> _newSet() =>
|
| + HashSet<E> cloneEmpty() =>
|
| new _LinkedCustomHashSet<E>(_equality, _hasher, _validKey);
|
| }
|
|
|
|
|