| OLD | NEW |
| 1 part of dart.collection; | 1 part of dart.collection; |
| 2 typedef bool _Predicate<T>(T value); | 2 typedef bool _Predicate<T>(T value); |
| 3 class _SplayTreeNode<K> {final K key; | 3 class _SplayTreeNode<K> {final K key; |
| 4 _SplayTreeNode<K> left; | 4 _SplayTreeNode<K> left; |
| 5 _SplayTreeNode<K> right; | 5 _SplayTreeNode<K> right; |
| 6 _SplayTreeNode(K this.key); | 6 _SplayTreeNode(K this.key); |
| 7 } | 7 } |
| 8 class _SplayTreeMapNode<K, V> extends _SplayTreeNode<K> {V value; | 8 class _SplayTreeMapNode<K, V> extends _SplayTreeNode<K> {V value; |
| 9 _SplayTreeMapNode(K key, V this.value) : super(key); | 9 _SplayTreeMapNode(K key, V this.value) : super(key); |
| 10 } | 10 } |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void _clear() { | 140 void _clear() { |
| 141 _root = null; | 141 _root = null; |
| 142 _count = 0; | 142 _count = 0; |
| 143 _modificationCount++; | 143 _modificationCount++; |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 class _TypeTest<T> {bool test(v) => v is T; | 146 class _TypeTest<T> {bool test(v) => v is T; |
| 147 } | 147 } |
| 148 class SplayTreeMap<K, V> extends _SplayTree<K> implements Map<K, V> {Comparator
<K> _comparator; | 148 class SplayTreeMap<K, V> extends _SplayTree<K> implements Map<K, V> {Comparator
<K> _comparator; |
| 149 _Predicate _validKey; | 149 _Predicate _validKey; |
| 150 SplayTreeMap([int compare(K key1, K key2), bool isValidKey(potentialKey)]) : _c
omparator = ((__x23) => DEVC$RT.cast(__x23, dynamic, DEVC$RT.type((__t20<K> _) { | 150 SplayTreeMap([int compare(K key1, K key2), bool isValidKey(potentialKey)]) : _c
omparator = ((__x21) => DEVC$RT.cast(__x21, dynamic, DEVC$RT.type((__t18<K> _) { |
| 151 } | 151 } |
| 152 ), "CompositeCast", """line 268, column 23 of dart:collection/splay_tree.dart: "
"", __x23 is __t20<K>, false))((compare == null) ? Comparable.compare : compare)
, _validKey = ((__x26) => DEVC$RT.cast(__x26, dynamic, __t24, "CompositeCast", "
""line 269, column 21 of dart:collection/splay_tree.dart: """, __x26 is __t24, f
alse))((isValidKey != null) ? isValidKey : ((v) => v is K)); | 152 ), "CompositeCast", """line 268, column 23 of dart:collection/splay_tree.dart: "
"", __x21 is __t18<K>, false))((compare == null) ? Comparable.compare : compare)
, _validKey = ((__x24) => DEVC$RT.cast(__x24, dynamic, __t22, "CompositeCast", "
""line 269, column 21 of dart:collection/splay_tree.dart: """, __x24 is __t22, f
alse))((isValidKey != null) ? isValidKey : ((v) => v is K)); |
| 153 factory SplayTreeMap.from(Map other, [int compare(K key1, K key2), bool isValid
Key(potentialKey)]) { | 153 factory SplayTreeMap.from(Map other, [int compare(K key1, K key2), bool isValid
Key(potentialKey)]) { |
| 154 SplayTreeMap<K, V> result = new SplayTreeMap<K, V>(); | 154 SplayTreeMap<K, V> result = new SplayTreeMap<K, V>(); |
| 155 other.forEach((k, v) { | 155 other.forEach((k, v) { |
| 156 result[k] = DEVC$RT.cast(v, dynamic, V, "CompositeCast", """line 278, column 40
of dart:collection/splay_tree.dart: """, v is V, false); | 156 result[k] = DEVC$RT.cast(v, dynamic, V, "CompositeCast", """line 278, column 40
of dart:collection/splay_tree.dart: """, v is V, false); |
| 157 } | 157 } |
| 158 ); | 158 ); |
| 159 return result; | 159 return result; |
| 160 } | 160 } |
| 161 factory SplayTreeMap.fromIterable(Iterable iterable, { | 161 factory SplayTreeMap.fromIterable(Iterable iterable, { |
| 162 K key(element), V value(element), int compare(K key1, K key2), bool isValidKey(p
otentialKey)} | 162 K key(element), V value(element), int compare(K key1, K key2), bool isValidKey(p
otentialKey)} |
| (...skipping 20 matching lines...) Expand all Loading... |
| 183 ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) { | 183 ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) { |
| 184 } | 184 } |
| 185 ), "AssignmentCast", """line 333, column 37 of dart:collection/splay_tree.dart:
""", _root is _SplayTreeMapNode<dynamic, dynamic>, true); | 185 ), "AssignmentCast", """line 333, column 37 of dart:collection/splay_tree.dart:
""", _root is _SplayTreeMapNode<dynamic, dynamic>, true); |
| 186 return DEVC$RT.cast(mapRoot.value, dynamic, V, "CompositeCast", """line 334, co
lumn 16 of dart:collection/splay_tree.dart: """, mapRoot.value is V, false); | 186 return DEVC$RT.cast(mapRoot.value, dynamic, V, "CompositeCast", """line 334, co
lumn 16 of dart:collection/splay_tree.dart: """, mapRoot.value is V, false); |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 return null; | 189 return null; |
| 190 } | 190 } |
| 191 V remove(Object key) { | 191 V remove(Object key) { |
| 192 if (!_validKey(key)) return null; | 192 if (!_validKey(key)) return null; |
| 193 _SplayTreeMapNode mapRoot = ((__x27) => DEVC$RT.cast(__x27, DEVC$RT.type((_Spla
yTreeNode<dynamic> _) { | 193 _SplayTreeMapNode mapRoot = ((__x25) => DEVC$RT.cast(__x25, DEVC$RT.type((_Spla
yTreeNode<dynamic> _) { |
| 194 } | 194 } |
| 195 ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) { | 195 ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) { |
| 196 } | 196 } |
| 197 ), "AssignmentCast", """line 342, column 33 of dart:collection/splay_tree.dart:
""", __x27 is _SplayTreeMapNode<dynamic, dynamic>, true))(_remove(DEVC$RT.cast(k
ey, Object, K, "CompositeCast", """line 342, column 41 of dart:collection/splay_
tree.dart: """, key is K, false))); | 197 ), "AssignmentCast", """line 342, column 33 of dart:collection/splay_tree.dart:
""", __x25 is _SplayTreeMapNode<dynamic, dynamic>, true))(_remove(DEVC$RT.cast(k
ey, Object, K, "CompositeCast", """line 342, column 41 of dart:collection/splay_
tree.dart: """, key is K, false))); |
| 198 if (mapRoot != null) return DEVC$RT.cast(mapRoot.value, dynamic, V, "CompositeC
ast", """line 343, column 33 of dart:collection/splay_tree.dart: """, mapRoot.va
lue is V, false); | 198 if (mapRoot != null) return DEVC$RT.cast(mapRoot.value, dynamic, V, "CompositeC
ast", """line 343, column 33 of dart:collection/splay_tree.dart: """, mapRoot.va
lue is V, false); |
| 199 return null; | 199 return null; |
| 200 } | 200 } |
| 201 void operator []=(K key, V value) { | 201 void operator []=(K key, V value) { |
| 202 if (key == null) throw new ArgumentError(key); | 202 if (key == null) throw new ArgumentError(key); |
| 203 int comp = _splay(key); | 203 int comp = _splay(key); |
| 204 if (comp == 0) { | 204 if (comp == 0) { |
| 205 _SplayTreeMapNode mapRoot = DEVC$RT.cast(_root, DEVC$RT.type((_SplayTreeNode<K>
_) { | 205 _SplayTreeMapNode mapRoot = DEVC$RT.cast(_root, DEVC$RT.type((_SplayTreeNode<K>
_) { |
| 206 } | 206 } |
| 207 ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) { | 207 ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) { |
| 208 } | 208 } |
| 209 ), "AssignmentCast", """line 353, column 35 of dart:collection/splay_tree.dart:
""", _root is _SplayTreeMapNode<dynamic, dynamic>, true); | 209 ), "AssignmentCast", """line 353, column 35 of dart:collection/splay_tree.dart:
""", _root is _SplayTreeMapNode<dynamic, dynamic>, true); |
| 210 mapRoot.value = value; | 210 mapRoot.value = value; |
| 211 return;} | 211 return;} |
| 212 _addNewRoot(((__x28) => DEVC$RT.cast(__x28, DEVC$RT.type((_SplayTreeMapNode<dyn
amic, dynamic> _) { | 212 _addNewRoot(new _SplayTreeMapNode<K, dynamic>(key, value), comp); |
| 213 } | |
| 214 ), DEVC$RT.type((_SplayTreeNode<K> _) { | |
| 215 } | |
| 216 ), "InferableAllocation", """line 357, column 17 of dart:collection/splay_tree.d
art: """, __x28 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value))
, comp); | |
| 217 } | 213 } |
| 218 V putIfAbsent(K key, V ifAbsent()) { | 214 V putIfAbsent(K key, V ifAbsent()) { |
| 219 if (key == null) throw new ArgumentError(key); | 215 if (key == null) throw new ArgumentError(key); |
| 220 int comp = _splay(key); | 216 int comp = _splay(key); |
| 221 if (comp == 0) { | 217 if (comp == 0) { |
| 222 _SplayTreeMapNode mapRoot = DEVC$RT.cast(_root, DEVC$RT.type((_SplayTreeNode<K>
_) { | 218 _SplayTreeMapNode mapRoot = DEVC$RT.cast(_root, DEVC$RT.type((_SplayTreeNode<K>
_) { |
| 223 } | 219 } |
| 224 ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) { | 220 ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) { |
| 225 } | 221 } |
| 226 ), "AssignmentCast", """line 365, column 35 of dart:collection/splay_tree.dart:
""", _root is _SplayTreeMapNode<dynamic, dynamic>, true); | 222 ), "AssignmentCast", """line 365, column 35 of dart:collection/splay_tree.dart:
""", _root is _SplayTreeMapNode<dynamic, dynamic>, true); |
| 227 return DEVC$RT.cast(mapRoot.value, dynamic, V, "CompositeCast", """line 366, co
lumn 14 of dart:collection/splay_tree.dart: """, mapRoot.value is V, false); | 223 return DEVC$RT.cast(mapRoot.value, dynamic, V, "CompositeCast", """line 366, co
lumn 14 of dart:collection/splay_tree.dart: """, mapRoot.value is V, false); |
| 228 } | 224 } |
| 229 int modificationCount = _modificationCount; | 225 int modificationCount = _modificationCount; |
| 230 int splayCount = _splayCount; | 226 int splayCount = _splayCount; |
| 231 V value = ifAbsent(); | 227 V value = ifAbsent(); |
| 232 if (modificationCount != _modificationCount) { | 228 if (modificationCount != _modificationCount) { |
| 233 throw new ConcurrentModificationError(this); | 229 throw new ConcurrentModificationError(this); |
| 234 } | 230 } |
| 235 if (splayCount != _splayCount) { | 231 if (splayCount != _splayCount) { |
| 236 comp = _splay(key); | 232 comp = _splay(key); |
| 237 assert (comp != 0);} | 233 assert (comp != 0);} |
| 238 _addNewRoot(((__x29) => DEVC$RT.cast(__x29, DEVC$RT.type((_SplayTreeMapNode<dyn
amic, dynamic> _) { | 234 _addNewRoot(new _SplayTreeMapNode<K, dynamic>(key, value), comp); |
| 239 } | |
| 240 ), DEVC$RT.type((_SplayTreeNode<K> _) { | |
| 241 } | |
| 242 ), "InferableAllocation", """line 379, column 17 of dart:collection/splay_tree.d
art: """, __x29 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value))
, comp); | |
| 243 return value; | 235 return value; |
| 244 } | 236 } |
| 245 void addAll(Map<K, V> other) { | 237 void addAll(Map<K, V> other) { |
| 246 other.forEach((K key, V value) { | 238 other.forEach((K key, V value) { |
| 247 this[key] = value; | 239 this[key] = value; |
| 248 } | 240 } |
| 249 ); | 241 ); |
| 250 } | 242 } |
| 251 bool get isEmpty { | 243 bool get isEmpty { |
| 252 return (_root == null); | 244 return (_root == null); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 385 } |
| 394 T _getValue(_SplayTreeNode node); | 386 T _getValue(_SplayTreeNode node); |
| 395 } | 387 } |
| 396 class _SplayTreeKeyIterable<K> extends IterableBase<K> implements EfficientLeng
th {_SplayTree<K> _tree; | 388 class _SplayTreeKeyIterable<K> extends IterableBase<K> implements EfficientLeng
th {_SplayTree<K> _tree; |
| 397 _SplayTreeKeyIterable(this._tree); | 389 _SplayTreeKeyIterable(this._tree); |
| 398 int get length => _tree._count; | 390 int get length => _tree._count; |
| 399 bool get isEmpty => _tree._count == 0; | 391 bool get isEmpty => _tree._count == 0; |
| 400 Iterator<K> get iterator => new _SplayTreeKeyIterator<K>(_tree); | 392 Iterator<K> get iterator => new _SplayTreeKeyIterator<K>(_tree); |
| 401 Set<K> toSet() { | 393 Set<K> toSet() { |
| 402 var setOrMap = _tree; | 394 var setOrMap = _tree; |
| 403 SplayTreeSet<K> set = new SplayTreeSet<K>(DEVC$RT.cast(setOrMap._comparator, dy
namic, DEVC$RT.type((__t30<K> _) { | 395 SplayTreeSet<K> set = new SplayTreeSet<K>(DEVC$RT.cast(setOrMap._comparator, dy
namic, DEVC$RT.type((__t26<K> _) { |
| 404 } | 396 } |
| 405 ), "CompositeCast", """line 613, column 29 of dart:collection/splay_tree.dart: "
"", setOrMap._comparator is __t30<K>, false), DEVC$RT.cast(setOrMap._validKey, d
ynamic, __t24, "CompositeCast", """line 613, column 51 of dart:collection/splay_
tree.dart: """, setOrMap._validKey is __t24, false)); | 397 ), "CompositeCast", """line 613, column 29 of dart:collection/splay_tree.dart: "
"", setOrMap._comparator is __t26<K>, false), DEVC$RT.cast(setOrMap._validKey, d
ynamic, __t22, "CompositeCast", """line 613, column 51 of dart:collection/splay_
tree.dart: """, setOrMap._validKey is __t22, false)); |
| 406 set._count = _tree._count; | 398 set._count = _tree._count; |
| 407 set._root = set._copyNode(_tree._root); | 399 set._root = set._copyNode(_tree._root); |
| 408 return set; | 400 return set; |
| 409 } | 401 } |
| 410 } | 402 } |
| 411 class _SplayTreeValueIterable<K, V> extends IterableBase<V> implements Efficien
tLength {SplayTreeMap<K, V> _map; | 403 class _SplayTreeValueIterable<K, V> extends IterableBase<V> implements Efficien
tLength {SplayTreeMap<K, V> _map; |
| 412 _SplayTreeValueIterable(this._map); | 404 _SplayTreeValueIterable(this._map); |
| 413 int get length => _map._count; | 405 int get length => _map._count; |
| 414 bool get isEmpty => _map._count == 0; | 406 bool get isEmpty => _map._count == 0; |
| 415 Iterator<V> get iterator => new _SplayTreeValueIterator<K, V>(_map); | 407 Iterator<V> get iterator => new _SplayTreeValueIterator<K, V>(_map); |
| 416 } | 408 } |
| 417 class _SplayTreeKeyIterator<K> extends _SplayTreeIterator<K> {_SplayTreeKeyIter
ator(_SplayTree<K> map) : super(map); | 409 class _SplayTreeKeyIterator<K> extends _SplayTreeIterator<K> {_SplayTreeKeyIter
ator(_SplayTree<K> map) : super(map); |
| 418 K _getValue(_SplayTreeNode node) => DEVC$RT.cast(node.key, dynamic, K, "Composi
teCast", """line 631, column 39 of dart:collection/splay_tree.dart: """, node.ke
y is K, false); | 410 K _getValue(_SplayTreeNode node) => DEVC$RT.cast(node.key, dynamic, K, "Composi
teCast", """line 631, column 39 of dart:collection/splay_tree.dart: """, node.ke
y is K, false); |
| 419 } | 411 } |
| 420 class _SplayTreeValueIterator<K, V> extends _SplayTreeIterator<V> {_SplayTreeVa
lueIterator(SplayTreeMap<K, V> map) : super(map); | 412 class _SplayTreeValueIterator<K, V> extends _SplayTreeIterator<V> {_SplayTreeVa
lueIterator(SplayTreeMap<K, V> map) : super(map); |
| 421 V _getValue(_SplayTreeMapNode node) => DEVC$RT.cast(node.value, dynamic, V, "Co
mpositeCast", """line 636, column 42 of dart:collection/splay_tree.dart: """, no
de.value is V, false); | 413 V _getValue(_SplayTreeMapNode node) => DEVC$RT.cast(node.value, dynamic, V, "Co
mpositeCast", """line 636, column 42 of dart:collection/splay_tree.dart: """, no
de.value is V, false); |
| 422 } | 414 } |
| 423 class _SplayTreeNodeIterator<K> extends _SplayTreeIterator<_SplayTreeNode<K>> {
_SplayTreeNodeIterator(_SplayTree<K> tree) : super(tree); | 415 class _SplayTreeNodeIterator<K> extends _SplayTreeIterator<_SplayTreeNode<K>> {
_SplayTreeNodeIterator(_SplayTree<K> tree) : super(tree); |
| 424 _SplayTreeNodeIterator.startAt(_SplayTree<K> tree, var startKey) : super.startA
t(tree, startKey); | 416 _SplayTreeNodeIterator.startAt(_SplayTree<K> tree, var startKey) : super.startA
t(tree, startKey); |
| 425 _SplayTreeNode<K> _getValue(_SplayTreeNode node) => DEVC$RT.cast(node, DEVC$RT.
type((_SplayTreeNode<dynamic> _) { | 417 _SplayTreeNode<K> _getValue(_SplayTreeNode node) => DEVC$RT.cast(node, DEVC$RT.
type((_SplayTreeNode<dynamic> _) { |
| 426 } | 418 } |
| 427 ), DEVC$RT.type((_SplayTreeNode<K> _) { | 419 ), DEVC$RT.type((_SplayTreeNode<K> _) { |
| 428 } | 420 } |
| 429 ), "CompositeCast", """line 644, column 55 of dart:collection/splay_tree.dart: "
"", node is _SplayTreeNode<K>, false); | 421 ), "CompositeCast", """line 644, column 55 of dart:collection/splay_tree.dart: "
"", node is _SplayTreeNode<K>, false); |
| 430 } | 422 } |
| 431 class SplayTreeSet<E> extends _SplayTree<E> with IterableMixin<E>, SetMixin<E>
{Comparator _comparator; | 423 class SplayTreeSet<E> extends _SplayTree<E> with IterableMixin<E>, SetMixin<E>
{Comparator _comparator; |
| 432 _Predicate _validKey; | 424 _Predicate _validKey; |
| 433 SplayTreeSet([int compare(E key1, E key2), bool isValidKey(potentialKey)]) : _c
omparator = ((__x36) => DEVC$RT.cast(__x36, dynamic, __t33, "CompositeCast", """
line 693, column 23 of dart:collection/splay_tree.dart: """, __x36 is __t33, fal
se))((compare == null) ? Comparable.compare : compare), _validKey = ((__x37) =>
DEVC$RT.cast(__x37, dynamic, __t24, "CompositeCast", """line 694, column 21 of d
art:collection/splay_tree.dart: """, __x37 is __t24, false))((isValidKey != null
) ? isValidKey : ((v) => v is E)); | 425 SplayTreeSet([int compare(E key1, E key2), bool isValidKey(potentialKey)]) : _c
omparator = ((__x32) => DEVC$RT.cast(__x32, dynamic, __t29, "CompositeCast", """
line 693, column 23 of dart:collection/splay_tree.dart: """, __x32 is __t29, fal
se))((compare == null) ? Comparable.compare : compare), _validKey = ((__x33) =>
DEVC$RT.cast(__x33, dynamic, __t22, "CompositeCast", """line 694, column 21 of d
art:collection/splay_tree.dart: """, __x33 is __t22, false))((isValidKey != null
) ? isValidKey : ((v) => v is E)); |
| 434 factory SplayTreeSet.from(Iterable elements, [int compare(E key1, E key2), bool
isValidKey(potentialKey)]) { | 426 factory SplayTreeSet.from(Iterable elements, [int compare(E key1, E key2), bool
isValidKey(potentialKey)]) { |
| 435 SplayTreeSet<E> result = new SplayTreeSet<E>(compare, isValidKey); | 427 SplayTreeSet<E> result = new SplayTreeSet<E>(compare, isValidKey); |
| 436 for (final E element in DEVC$RT.cast(elements, DEVC$RT.type((Iterable<dynamic>
_) { | 428 for (final E element in DEVC$RT.cast(elements, DEVC$RT.type((Iterable<dynamic>
_) { |
| 437 } | 429 } |
| 438 ), DEVC$RT.type((Iterable<E> _) { | 430 ), DEVC$RT.type((Iterable<E> _) { |
| 439 } | 431 } |
| 440 ), "CompositeCast", """line 707, column 29 of dart:collection/splay_tree.dart: "
"", elements is Iterable<E>, false)) { | 432 ), "CompositeCast", """line 707, column 29 of dart:collection/splay_tree.dart: "
"", elements is Iterable<E>, false)) { |
| 441 result.add(element); | 433 result.add(element); |
| 442 } | 434 } |
| 443 return result; | 435 return result; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 459 if (_count == 0) throw IterableElementError.noElement(); | 451 if (_count == 0) throw IterableElementError.noElement(); |
| 460 if (_count > 1) throw IterableElementError.tooMany(); | 452 if (_count > 1) throw IterableElementError.tooMany(); |
| 461 return _root.key; | 453 return _root.key; |
| 462 } | 454 } |
| 463 bool contains(Object object) { | 455 bool contains(Object object) { |
| 464 return _validKey(object) && _splay(DEVC$RT.cast(object, Object, E, "CompositeCas
t", """line 741, column 40 of dart:collection/splay_tree.dart: """, object is E,
false)) == 0; | 456 return _validKey(object) && _splay(DEVC$RT.cast(object, Object, E, "CompositeCas
t", """line 741, column 40 of dart:collection/splay_tree.dart: """, object is E,
false)) == 0; |
| 465 } | 457 } |
| 466 bool add(E element) { | 458 bool add(E element) { |
| 467 int compare = _splay(element); | 459 int compare = _splay(element); |
| 468 if (compare == 0) return false; | 460 if (compare == 0) return false; |
| 469 _addNewRoot(((__x38) => DEVC$RT.cast(__x38, DEVC$RT.type((_SplayTreeNode<dynami
c> _) { | 461 _addNewRoot(new _SplayTreeNode<E>(element), compare); |
| 470 } | |
| 471 ), DEVC$RT.type((_SplayTreeNode<E> _) { | |
| 472 } | |
| 473 ), "InferableAllocation", """line 747, column 17 of dart:collection/splay_tree.d
art: """, __x38 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), comp
are); | |
| 474 return true; | 462 return true; |
| 475 } | 463 } |
| 476 bool remove(Object object) { | 464 bool remove(Object object) { |
| 477 if (!_validKey(object)) return false; | 465 if (!_validKey(object)) return false; |
| 478 return _remove(DEVC$RT.cast(object, Object, E, "CompositeCast", """line 753, co
lumn 20 of dart:collection/splay_tree.dart: """, object is E, false)) != null; | 466 return _remove(DEVC$RT.cast(object, Object, E, "CompositeCast", """line 753, co
lumn 20 of dart:collection/splay_tree.dart: """, object is E, false)) != null; |
| 479 } | 467 } |
| 480 void addAll(Iterable<E> elements) { | 468 void addAll(Iterable<E> elements) { |
| 481 for (E element in elements) { | 469 for (E element in elements) { |
| 482 int compare = _splay(element); | 470 int compare = _splay(element); |
| 483 if (compare != 0) { | 471 if (compare != 0) { |
| 484 _addNewRoot(((__x39) => DEVC$RT.cast(__x39, DEVC$RT.type((_SplayTreeNode<dynamic
> _) { | 472 _addNewRoot(new _SplayTreeNode<E>(element), compare); |
| 485 } | |
| 486 ), DEVC$RT.type((_SplayTreeNode<E> _) { | |
| 487 } | |
| 488 ), "InferableAllocation", """line 760, column 21 of dart:collection/splay_tree.d
art: """, __x39 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), comp
are); | |
| 489 } | 473 } |
| 490 } | 474 } |
| 491 } | 475 } |
| 492 void removeAll(Iterable<Object> elements) { | 476 void removeAll(Iterable<Object> elements) { |
| 493 for (Object element in elements) { | 477 for (Object element in elements) { |
| 494 if (_validKey(element)) _remove(DEVC$RT.cast(element, Object, E, "CompositeCast"
, """line 767, column 39 of dart:collection/splay_tree.dart: """, element is E,
false)); | 478 if (_validKey(element)) _remove(DEVC$RT.cast(element, Object, E, "CompositeCast"
, """line 767, column 39 of dart:collection/splay_tree.dart: """, element is E,
false)); |
| 495 } | 479 } |
| 496 } | 480 } |
| 497 void retainAll(Iterable<Object> elements) { | 481 void retainAll(Iterable<Object> elements) { |
| 498 SplayTreeSet<E> retainSet = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u4
0, dynamic __u41)) { | 482 SplayTreeSet<E> retainSet = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u3
4, dynamic __u35)) { |
| 499 int c(dynamic x0, dynamic x1) => f(x0, x1); | 483 int c(dynamic x0, dynamic x1) => f(x0, x1); |
| 500 return f == null ? null : c; | 484 return f == null ? null : c; |
| 501 } | 485 } |
| 502 , _comparator, __t33, DEVC$RT.type((__t42<E> _) { | 486 , _comparator, __t29, DEVC$RT.type((__t36<E> _) { |
| 503 } | 487 } |
| 504 ), "Wrap", """line 773, column 53 of dart:collection/splay_tree.dart: """, _comp
arator is __t42<E>), _validKey); | 488 ), "Wrap", """line 773, column 53 of dart:collection/splay_tree.dart: """, _comp
arator is __t36<E>), _validKey); |
| 505 int modificationCount = _modificationCount; | 489 int modificationCount = _modificationCount; |
| 506 for (Object object in elements) { | 490 for (Object object in elements) { |
| 507 if (modificationCount != _modificationCount) { | 491 if (modificationCount != _modificationCount) { |
| 508 throw new ConcurrentModificationError(this); | 492 throw new ConcurrentModificationError(this); |
| 509 } | 493 } |
| 510 if (_validKey(object) && _splay(DEVC$RT.cast(object, Object, E, "CompositeCast"
, """line 781, column 39 of dart:collection/splay_tree.dart: """, object is E, f
alse)) == 0) retainSet.add(_root.key); | 494 if (_validKey(object) && _splay(DEVC$RT.cast(object, Object, E, "CompositeCast"
, """line 781, column 39 of dart:collection/splay_tree.dart: """, object is E, f
alse)) == 0) retainSet.add(_root.key); |
| 511 } | 495 } |
| 512 if (retainSet._count != _count) { | 496 if (retainSet._count != _count) { |
| 513 _root = retainSet._root; | 497 _root = retainSet._root; |
| 514 _count = retainSet._count; | 498 _count = retainSet._count; |
| 515 _modificationCount++; | 499 _modificationCount++; |
| 516 } | 500 } |
| 517 } | 501 } |
| 518 E lookup(Object object) { | 502 E lookup(Object object) { |
| 519 if (!_validKey(object)) return null; | 503 if (!_validKey(object)) return null; |
| 520 int comp = _splay(DEVC$RT.cast(object, Object, E, "CompositeCast", """line 793,
column 23 of dart:collection/splay_tree.dart: """, object is E, false)); | 504 int comp = _splay(DEVC$RT.cast(object, Object, E, "CompositeCast", """line 793,
column 23 of dart:collection/splay_tree.dart: """, object is E, false)); |
| 521 if (comp != 0) return null; | 505 if (comp != 0) return null; |
| 522 return _root.key; | 506 return _root.key; |
| 523 } | 507 } |
| 524 Set<E> intersection(Set<E> other) { | 508 Set<E> intersection(Set<E> other) { |
| 525 Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u45, dynamic _
_u46)) { | 509 Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u39, dynamic _
_u40)) { |
| 526 int c(dynamic x0, dynamic x1) => f(x0, x1); | 510 int c(dynamic x0, dynamic x1) => f(x0, x1); |
| 527 return f == null ? null : c; | 511 return f == null ? null : c; |
| 528 } | 512 } |
| 529 , _comparator, __t33, DEVC$RT.type((__t42<E> _) { | 513 , _comparator, __t29, DEVC$RT.type((__t36<E> _) { |
| 530 } | 514 } |
| 531 ), "Wrap", """line 799, column 41 of dart:collection/splay_tree.dart: """, _comp
arator is __t42<E>), _validKey); | 515 ), "Wrap", """line 799, column 41 of dart:collection/splay_tree.dart: """, _comp
arator is __t36<E>), _validKey); |
| 532 for (E element in this) { | 516 for (E element in this) { |
| 533 if (other.contains(element)) result.add(element); | 517 if (other.contains(element)) result.add(element); |
| 534 } | 518 } |
| 535 return result; | 519 return result; |
| 536 } | 520 } |
| 537 Set<E> difference(Set<E> other) { | 521 Set<E> difference(Set<E> other) { |
| 538 Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u47, dynamic _
_u48)) { | 522 Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u41, dynamic _
_u42)) { |
| 539 int c(dynamic x0, dynamic x1) => f(x0, x1); | 523 int c(dynamic x0, dynamic x1) => f(x0, x1); |
| 540 return f == null ? null : c; | 524 return f == null ? null : c; |
| 541 } | 525 } |
| 542 , _comparator, __t33, DEVC$RT.type((__t42<E> _) { | 526 , _comparator, __t29, DEVC$RT.type((__t36<E> _) { |
| 543 } | 527 } |
| 544 ), "Wrap", """line 807, column 41 of dart:collection/splay_tree.dart: """, _comp
arator is __t42<E>), _validKey); | 528 ), "Wrap", """line 807, column 41 of dart:collection/splay_tree.dart: """, _comp
arator is __t36<E>), _validKey); |
| 545 for (E element in this) { | 529 for (E element in this) { |
| 546 if (!other.contains(element)) result.add(element); | 530 if (!other.contains(element)) result.add(element); |
| 547 } | 531 } |
| 548 return result; | 532 return result; |
| 549 } | 533 } |
| 550 Set<E> union(Set<E> other) { | 534 Set<E> union(Set<E> other) { |
| 551 return _clone()..addAll(other); | 535 return _clone()..addAll(other); |
| 552 } | 536 } |
| 553 SplayTreeSet<E> _clone() { | 537 SplayTreeSet<E> _clone() { |
| 554 var set = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u49, dynamic __u50))
{ | 538 var set = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u43, dynamic __u44))
{ |
| 555 int c(dynamic x0, dynamic x1) => f(x0, x1); | 539 int c(dynamic x0, dynamic x1) => f(x0, x1); |
| 556 return f == null ? null : c; | 540 return f == null ? null : c; |
| 557 } | 541 } |
| 558 , _comparator, __t33, DEVC$RT.type((__t42<E> _) { | 542 , _comparator, __t29, DEVC$RT.type((__t36<E> _) { |
| 559 } | 543 } |
| 560 ), "Wrap", """line 819, column 35 of dart:collection/splay_tree.dart: """, _comp
arator is __t42<E>), _validKey); | 544 ), "Wrap", """line 819, column 35 of dart:collection/splay_tree.dart: """, _comp
arator is __t36<E>), _validKey); |
| 561 set._count = _count; | 545 set._count = _count; |
| 562 set._root = _copyNode(_root); | 546 set._root = _copyNode(_root); |
| 563 return set; | 547 return set; |
| 564 } | 548 } |
| 565 _SplayTreeNode<E> _copyNode(_SplayTreeNode<E> node) { | 549 _SplayTreeNode<E> _copyNode(_SplayTreeNode<E> node) { |
| 566 if (node == null) return null; | 550 if (node == null) return null; |
| 567 return new _SplayTreeNode<E>(node.key)..left = _copyNode(node.left)..right = _c
opyNode(node.right); | 551 return new _SplayTreeNode<E>(node.key)..left = _copyNode(node.left)..right = _c
opyNode(node.right); |
| 568 } | 552 } |
| 569 void clear() { | 553 void clear() { |
| 570 _clear(); | 554 _clear(); |
| 571 } | 555 } |
| 572 Set<E> toSet() => _clone(); | 556 Set<E> toSet() => _clone(); |
| 573 String toString() => IterableBase.iterableToFullString(this, '{', '}'); | 557 String toString() => IterableBase.iterableToFullString(this, '{', '}'); |
| 574 } | 558 } |
| 575 typedef int __t20<K>(K __u21, K __u22); | 559 typedef int __t18<K>(K __u19, K __u20); |
| 576 typedef bool __t24(dynamic __u25); | 560 typedef bool __t22(dynamic __u23); |
| 577 typedef int __t30<K>(K __u31, K __u32); | 561 typedef int __t26<K>(K __u27, K __u28); |
| 578 typedef int __t33(dynamic __u34, dynamic __u35); | 562 typedef int __t29(dynamic __u30, dynamic __u31); |
| 579 typedef int __t42<E>(E __u43, E __u44); | 563 typedef int __t36<E>(E __u37, E __u38); |
| OLD | NEW |