| Index: test/dart_codegen/expect/collection/splay_tree.dart
|
| diff --git a/test/dart_codegen/expect/collection/splay_tree.dart b/test/dart_codegen/expect/collection/splay_tree.dart
|
| index 1877af73d2926b37473d226d0004be8db5a1e9ff..0eb40346baa0d9413f4431b65a8b10e21c5e0ffc 100644
|
| --- a/test/dart_codegen/expect/collection/splay_tree.dart
|
| +++ b/test/dart_codegen/expect/collection/splay_tree.dart
|
| @@ -147,9 +147,9 @@ _root = null;
|
| }
|
| class SplayTreeMap<K, V> extends _SplayTree<K> implements Map<K, V> {Comparator<K> _comparator;
|
| _Predicate _validKey;
|
| - SplayTreeMap([int compare(K key1, K key2), bool isValidKey(potentialKey)]) : _comparator = ((__x36) => DEVC$RT.cast(__x36, dynamic, DEVC$RT.type((__t33<K> _) {
|
| + SplayTreeMap([int compare(K key1, K key2), bool isValidKey(potentialKey)]) : _comparator = ((__x23) => DEVC$RT.cast(__x23, dynamic, DEVC$RT.type((__t20<K> _) {
|
| }
|
| -), "CastGeneral", """line 268, column 23 of dart:collection/splay_tree.dart: """, __x36 is __t33<K>, false))((compare == null) ? Comparable.compare : compare), _validKey = ((__x39) => DEVC$RT.cast(__x39, dynamic, __t37, "CastGeneral", """line 269, column 21 of dart:collection/splay_tree.dart: """, __x39 is __t37, false))((isValidKey != null) ? isValidKey : ((v) => v is K));
|
| +), "CastGeneral", """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, "CastGeneral", """line 269, column 21 of dart:collection/splay_tree.dart: """, __x26 is __t24, false))((isValidKey != null) ? isValidKey : ((v) => v is K));
|
| factory SplayTreeMap.from(Map other, [int compare(K key1, K key2), bool isValidKey(potentialKey)]) {
|
| SplayTreeMap<K, V> result = new SplayTreeMap<K, V>();
|
| other.forEach((k, v) {
|
| @@ -190,11 +190,11 @@ _SplayTreeMapNode mapRoot = DEVC$RT.cast(_root, DEVC$RT.type((_SplayTreeNode<K>
|
| }
|
| V remove(Object key) {
|
| if (!_validKey(key)) return null;
|
| - _SplayTreeMapNode mapRoot = ((__x40) => DEVC$RT.cast(__x40, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
|
| + _SplayTreeMapNode mapRoot = ((__x27) => DEVC$RT.cast(__x27, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
|
| }
|
| ), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| }
|
| -), "CastGeneral", """line 342, column 33 of dart:collection/splay_tree.dart: """, __x40 is _SplayTreeMapNode<dynamic, dynamic>, true))(_remove(DEVC$RT.cast(key, Object, K, "CastGeneral", """line 342, column 41 of dart:collection/splay_tree.dart: """, key is K, false)));
|
| +), "CastGeneral", """line 342, column 33 of dart:collection/splay_tree.dart: """, __x27 is _SplayTreeMapNode<dynamic, dynamic>, true))(_remove(DEVC$RT.cast(key, Object, K, "CastGeneral", """line 342, column 41 of dart:collection/splay_tree.dart: """, key is K, false)));
|
| if (mapRoot != null) return DEVC$RT.cast(mapRoot.value, dynamic, V, "CastGeneral", """line 343, column 33 of dart:collection/splay_tree.dart: """, mapRoot.value is V, false);
|
| return null;
|
| }
|
| @@ -209,11 +209,11 @@ _SplayTreeMapNode mapRoot = DEVC$RT.cast(_root, DEVC$RT.type((_SplayTreeNode<K>
|
| ), "CastGeneral", """line 353, column 35 of dart:collection/splay_tree.dart: """, _root is _SplayTreeMapNode<dynamic, dynamic>, true);
|
| mapRoot.value = value;
|
| return;}
|
| - _addNewRoot(((__x41) => DEVC$RT.cast(__x41, DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| + _addNewRoot(((__x28) => DEVC$RT.cast(__x28, DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| }
|
| ), DEVC$RT.type((_SplayTreeNode<K> _) {
|
| }
|
| -), "CastExact", """line 357, column 17 of dart:collection/splay_tree.dart: """, __x41 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
|
| +), "CastExact", """line 357, column 17 of dart:collection/splay_tree.dart: """, __x28 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
|
| }
|
| V putIfAbsent(K key, V ifAbsent()) {
|
| if (key == null) throw new ArgumentError(key);
|
| @@ -235,11 +235,11 @@ throw new ConcurrentModificationError(this);
|
| if (splayCount != _splayCount) {
|
| comp = _splay(key);
|
| assert (comp != 0);}
|
| - _addNewRoot(((__x42) => DEVC$RT.cast(__x42, DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| + _addNewRoot(((__x29) => DEVC$RT.cast(__x29, DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| }
|
| ), DEVC$RT.type((_SplayTreeNode<K> _) {
|
| }
|
| -), "CastExact", """line 379, column 17 of dart:collection/splay_tree.dart: """, __x42 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
|
| +), "CastExact", """line 379, column 17 of dart:collection/splay_tree.dart: """, __x29 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
|
| return value;
|
| }
|
| void addAll(Map<K, V> other) {
|
| @@ -400,9 +400,9 @@ _rebuildWorkList(_currentNode);
|
| Iterator<K> get iterator => new _SplayTreeKeyIterator<K>(_tree);
|
| Set<K> toSet() {
|
| var setOrMap = _tree;
|
| - SplayTreeSet<K> set = new SplayTreeSet<K>(DEVC$RT.cast(setOrMap._comparator, dynamic, DEVC$RT.type((__t43<K> _) {
|
| + SplayTreeSet<K> set = new SplayTreeSet<K>(DEVC$RT.cast(setOrMap._comparator, dynamic, DEVC$RT.type((__t30<K> _) {
|
| }
|
| -), "CastGeneral", """line 613, column 29 of dart:collection/splay_tree.dart: """, setOrMap._comparator is __t43<K>, false), DEVC$RT.cast(setOrMap._validKey, dynamic, __t37, "CastGeneral", """line 613, column 51 of dart:collection/splay_tree.dart: """, setOrMap._validKey is __t37, false));
|
| +), "CastGeneral", """line 613, column 29 of dart:collection/splay_tree.dart: """, setOrMap._comparator is __t30<K>, false), DEVC$RT.cast(setOrMap._validKey, dynamic, __t24, "CastGeneral", """line 613, column 51 of dart:collection/splay_tree.dart: """, setOrMap._validKey is __t24, false));
|
| set._count = _tree._count;
|
| set._root = set._copyNode(_tree._root);
|
| return set;
|
| @@ -430,7 +430,7 @@ var setOrMap = _tree;
|
| }
|
| class SplayTreeSet<E> extends _SplayTree<E> with IterableMixin<E>, SetMixin<E> {Comparator _comparator;
|
| _Predicate _validKey;
|
| - SplayTreeSet([int compare(E key1, E key2), bool isValidKey(potentialKey)]) : _comparator = ((__x49) => DEVC$RT.cast(__x49, dynamic, __t46, "CastGeneral", """line 693, column 23 of dart:collection/splay_tree.dart: """, __x49 is __t46, false))((compare == null) ? Comparable.compare : compare), _validKey = ((__x50) => DEVC$RT.cast(__x50, dynamic, __t37, "CastGeneral", """line 694, column 21 of dart:collection/splay_tree.dart: """, __x50 is __t37, false))((isValidKey != null) ? isValidKey : ((v) => v is E));
|
| + SplayTreeSet([int compare(E key1, E key2), bool isValidKey(potentialKey)]) : _comparator = ((__x36) => DEVC$RT.cast(__x36, dynamic, __t33, "CastGeneral", """line 693, column 23 of dart:collection/splay_tree.dart: """, __x36 is __t33, false))((compare == null) ? Comparable.compare : compare), _validKey = ((__x37) => DEVC$RT.cast(__x37, dynamic, __t24, "CastGeneral", """line 694, column 21 of dart:collection/splay_tree.dart: """, __x37 is __t24, false))((isValidKey != null) ? isValidKey : ((v) => v is E));
|
| factory SplayTreeSet.from(Iterable elements, [int compare(E key1, E key2), bool isValidKey(potentialKey)]) {
|
| SplayTreeSet<E> result = new SplayTreeSet<E>(compare, isValidKey);
|
| for (final E element in elements) {
|
| @@ -462,11 +462,11 @@ return _validKey(object) && _splay(DEVC$RT.cast(object, Object, E, "CastGeneral"
|
| bool add(E element) {
|
| int compare = _splay(element);
|
| if (compare == 0) return false;
|
| - _addNewRoot(((__x51) => DEVC$RT.cast(__x51, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
|
| + _addNewRoot(((__x38) => DEVC$RT.cast(__x38, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
|
| }
|
| ), DEVC$RT.type((_SplayTreeNode<E> _) {
|
| }
|
| -), "CastExact", """line 747, column 17 of dart:collection/splay_tree.dart: """, __x51 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
|
| +), "CastExact", """line 747, column 17 of dart:collection/splay_tree.dart: """, __x38 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
|
| return true;
|
| }
|
| bool remove(Object object) {
|
| @@ -477,11 +477,11 @@ if (!_validKey(object)) return false;
|
| for (E element in elements) {
|
| int compare = _splay(element);
|
| if (compare != 0) {
|
| -_addNewRoot(((__x52) => DEVC$RT.cast(__x52, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
|
| +_addNewRoot(((__x39) => DEVC$RT.cast(__x39, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
|
| }
|
| ), DEVC$RT.type((_SplayTreeNode<E> _) {
|
| }
|
| -), "CastExact", """line 760, column 21 of dart:collection/splay_tree.dart: """, __x52 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
|
| +), "CastExact", """line 760, column 21 of dart:collection/splay_tree.dart: """, __x39 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
|
| }
|
| }
|
| }
|
| @@ -491,7 +491,13 @@ if (_validKey(element)) _remove(DEVC$RT.cast(element, Object, E, "CastGeneral",
|
| }
|
| }
|
| void retainAll(Iterable<Object> elements) {
|
| -SplayTreeSet<E> retainSet = new SplayTreeSet<E>(_comparator, _validKey);
|
| +SplayTreeSet<E> retainSet = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u40, dynamic __u41)) {
|
| +int c(dynamic x0, dynamic x1) => f(x0, x1);
|
| + return f == null ? null : c;
|
| +}
|
| +, _comparator, __t33, DEVC$RT.type((__t42<E> _) {
|
| +}
|
| +), "Wrap", """line 773, column 53 of dart:collection/splay_tree.dart: """, _comparator is __t42<E>), _validKey);
|
| int modificationCount = _modificationCount;
|
| for (Object object in elements) {
|
| if (modificationCount != _modificationCount) {
|
| @@ -512,14 +518,26 @@ if (!_validKey(object)) return null;
|
| return _root.key;
|
| }
|
| Set<E> intersection(Set<E> other) {
|
| -Set<E> result = new SplayTreeSet<E>(_comparator, _validKey);
|
| +Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u45, dynamic __u46)) {
|
| +int c(dynamic x0, dynamic x1) => f(x0, x1);
|
| + return f == null ? null : c;
|
| +}
|
| +, _comparator, __t33, DEVC$RT.type((__t42<E> _) {
|
| +}
|
| +), "Wrap", """line 799, column 41 of dart:collection/splay_tree.dart: """, _comparator is __t42<E>), _validKey);
|
| for (E element in this) {
|
| if (other.contains(element)) result.add(element);
|
| }
|
| return result;
|
| }
|
| Set<E> difference(Set<E> other) {
|
| -Set<E> result = new SplayTreeSet<E>(_comparator, _validKey);
|
| +Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u47, dynamic __u48)) {
|
| +int c(dynamic x0, dynamic x1) => f(x0, x1);
|
| + return f == null ? null : c;
|
| +}
|
| +, _comparator, __t33, DEVC$RT.type((__t42<E> _) {
|
| +}
|
| +), "Wrap", """line 807, column 41 of dart:collection/splay_tree.dart: """, _comparator is __t42<E>), _validKey);
|
| for (E element in this) {
|
| if (!other.contains(element)) result.add(element);
|
| }
|
| @@ -529,7 +547,13 @@ if (!other.contains(element)) result.add(element);
|
| return _clone()..addAll(other);
|
| }
|
| SplayTreeSet<E> _clone() {
|
| -var set = new SplayTreeSet<E>(_comparator, _validKey);
|
| +var set = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u49, dynamic __u50)) {
|
| +int c(dynamic x0, dynamic x1) => f(x0, x1);
|
| + return f == null ? null : c;
|
| +}
|
| +, _comparator, __t33, DEVC$RT.type((__t42<E> _) {
|
| +}
|
| +), "Wrap", """line 819, column 35 of dart:collection/splay_tree.dart: """, _comparator is __t42<E>), _validKey);
|
| set._count = _count;
|
| set._root = _copyNode(_root);
|
| return set;
|
| @@ -544,7 +568,8 @@ _clear();
|
| Set<E> toSet() => _clone();
|
| String toString() => IterableBase.iterableToFullString(this, '{', '}');
|
| }
|
| - typedef int __t33<K>(K __u34, K __u35);
|
| - typedef bool __t37(dynamic __u38);
|
| - typedef int __t43<K>(K __u44, K __u45);
|
| - typedef int __t46(dynamic __u47, dynamic __u48);
|
| + typedef int __t20<K>(K __u21, K __u22);
|
| + typedef bool __t24(dynamic __u25);
|
| + typedef int __t30<K>(K __u31, K __u32);
|
| + typedef int __t33(dynamic __u34, dynamic __u35);
|
| + typedef int __t42<E>(E __u43, E __u44);
|
|
|