| 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 b499a325f1e85151b100b41ddbc5bdaaec63bd18..dde3b499890119fbd0861d7cd15b549e31fd2d00 100644
|
| --- a/test/dart_codegen/expect/collection/splay_tree.dart
|
| +++ b/test/dart_codegen/expect/collection/splay_tree.dart
|
| @@ -147,7 +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 = (compare == null) ? Comparable.compare : compare, _validKey = (isValidKey != null) ? isValidKey : ((v) => v is K);
|
| + SplayTreeMap([int compare(K key1, K key2), bool isValidKey(potentialKey)]) : _comparator = ((__x48) => DDC$RT.cast(__x48, dynamic, DDC$RT.type((__t45<K> _) {
|
| +}
|
| +), "CastGeneral", """line 268, column 23 of dart:collection/splay_tree.dart: """, __x48 is __t45<K>, false))((compare == null) ? Comparable.compare : compare), _validKey = ((__x51) => DDC$RT.cast(__x51, dynamic, __t49, "CastGeneral", """line 269, column 21 of dart:collection/splay_tree.dart: """, __x51 is __t49, 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) {
|
| @@ -172,7 +174,7 @@ SplayTreeMap<K, V> map = new SplayTreeMap<K, V>(compare, isValidKey);
|
| SplayTreeMap._internal();
|
| V operator [](Object key) {
|
| if (key == null) throw new ArgumentError(key);
|
| - if (!_validKey(key)) return ((__x45) => DDC$RT.cast(__x45, Null, V, "CastLiteral", """line 329, column 33 of dart:collection/splay_tree.dart: """, __x45 is V, false))(null);
|
| + if (!_validKey(key)) return ((__x52) => DDC$RT.cast(__x52, Null, V, "CastLiteral", """line 329, column 33 of dart:collection/splay_tree.dart: """, __x52 is V, false))(null);
|
| if (_root != null) {
|
| int comp = _splay(DDC$RT.cast(key, Object, K, "CastGeneral", """line 331, column 25 of dart:collection/splay_tree.dart: """, key is K, false));
|
| if (comp == 0) {
|
| @@ -184,17 +186,17 @@ _SplayTreeMapNode mapRoot = DDC$RT.cast(_root, DDC$RT.type((_SplayTreeNode<K> _)
|
| return DDC$RT.cast(mapRoot.value, dynamic, V, "CastGeneral", """line 334, column 16 of dart:collection/splay_tree.dart: """, mapRoot.value is V, false);
|
| }
|
| }
|
| - return ((__x46) => DDC$RT.cast(__x46, Null, V, "CastLiteral", """line 337, column 12 of dart:collection/splay_tree.dart: """, __x46 is V, false))(null);
|
| + return ((__x53) => DDC$RT.cast(__x53, Null, V, "CastLiteral", """line 337, column 12 of dart:collection/splay_tree.dart: """, __x53 is V, false))(null);
|
| }
|
| V remove(Object key) {
|
| -if (!_validKey(key)) return ((__x47) => DDC$RT.cast(__x47, Null, V, "CastLiteral", """line 341, column 33 of dart:collection/splay_tree.dart: """, __x47 is V, false))(null);
|
| - _SplayTreeMapNode mapRoot = ((__x48) => DDC$RT.cast(__x48, DDC$RT.type((_SplayTreeNode<dynamic> _) {
|
| +if (!_validKey(key)) return ((__x54) => DDC$RT.cast(__x54, Null, V, "CastLiteral", """line 341, column 33 of dart:collection/splay_tree.dart: """, __x54 is V, false))(null);
|
| + _SplayTreeMapNode mapRoot = ((__x55) => DDC$RT.cast(__x55, DDC$RT.type((_SplayTreeNode<dynamic> _) {
|
| }
|
| ), DDC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| }
|
| -), "CastGeneral", """line 342, column 33 of dart:collection/splay_tree.dart: """, __x48 is _SplayTreeMapNode<dynamic, dynamic>, true))(_remove(DDC$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: """, __x55 is _SplayTreeMapNode<dynamic, dynamic>, true))(_remove(DDC$RT.cast(key, Object, K, "CastGeneral", """line 342, column 41 of dart:collection/splay_tree.dart: """, key is K, false)));
|
| if (mapRoot != null) return DDC$RT.cast(mapRoot.value, dynamic, V, "CastGeneral", """line 343, column 33 of dart:collection/splay_tree.dart: """, mapRoot.value is V, false);
|
| - return ((__x49) => DDC$RT.cast(__x49, Null, V, "CastLiteral", """line 344, column 12 of dart:collection/splay_tree.dart: """, __x49 is V, false))(null);
|
| + return ((__x56) => DDC$RT.cast(__x56, Null, V, "CastLiteral", """line 344, column 12 of dart:collection/splay_tree.dart: """, __x56 is V, false))(null);
|
| }
|
| void operator []=(K key, V value) {
|
| if (key == null) throw new ArgumentError(key);
|
| @@ -207,11 +209,11 @@ _SplayTreeMapNode mapRoot = DDC$RT.cast(_root, DDC$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(((__x50) => DDC$RT.cast(__x50, DDC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| + _addNewRoot(((__x57) => DDC$RT.cast(__x57, DDC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| }
|
| ), DDC$RT.type((_SplayTreeNode<K> _) {
|
| }
|
| -), "CastExact", """line 357, column 17 of dart:collection/splay_tree.dart: """, __x50 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
|
| +), "CastExact", """line 357, column 17 of dart:collection/splay_tree.dart: """, __x57 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
|
| }
|
| V putIfAbsent(K key, V ifAbsent()) {
|
| if (key == null) throw new ArgumentError(key);
|
| @@ -233,11 +235,11 @@ throw new ConcurrentModificationError(this);
|
| if (splayCount != _splayCount) {
|
| comp = _splay(key);
|
| assert (comp != 0);}
|
| - _addNewRoot(((__x51) => DDC$RT.cast(__x51, DDC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| + _addNewRoot(((__x58) => DDC$RT.cast(__x58, DDC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
|
| }
|
| ), DDC$RT.type((_SplayTreeNode<K> _) {
|
| }
|
| -), "CastExact", """line 379, column 17 of dart:collection/splay_tree.dart: """, __x51 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
|
| +), "CastExact", """line 379, column 17 of dart:collection/splay_tree.dart: """, __x58 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
|
| return value;
|
| }
|
| void addAll(Map<K, V> other) {
|
| @@ -304,20 +306,20 @@ throw new ConcurrentModificationError(this);
|
| return Maps.mapToString(this);
|
| }
|
| K firstKey() {
|
| -if (_root == null) return ((__x52) => DDC$RT.cast(__x52, Null, K, "CastLiteral", """line 443, column 31 of dart:collection/splay_tree.dart: """, __x52 is K, false))(null);
|
| +if (_root == null) return ((__x59) => DDC$RT.cast(__x59, Null, K, "CastLiteral", """line 443, column 31 of dart:collection/splay_tree.dart: """, __x59 is K, false))(null);
|
| return DDC$RT.cast(_first.key, dynamic, K, "CastGeneral", """line 444, column 12 of dart:collection/splay_tree.dart: """, _first.key is K, false);
|
| }
|
| K lastKey() {
|
| -if (_root == null) return ((__x53) => DDC$RT.cast(__x53, Null, K, "CastLiteral", """line 451, column 31 of dart:collection/splay_tree.dart: """, __x53 is K, false))(null);
|
| +if (_root == null) return ((__x60) => DDC$RT.cast(__x60, Null, K, "CastLiteral", """line 451, column 31 of dart:collection/splay_tree.dart: """, __x60 is K, false))(null);
|
| return DDC$RT.cast(_last.key, dynamic, K, "CastGeneral", """line 452, column 12 of dart:collection/splay_tree.dart: """, _last.key is K, false);
|
| }
|
| K lastKeyBefore(K key) {
|
| if (key == null) throw new ArgumentError(key);
|
| - if (_root == null) return ((__x54) => DDC$RT.cast(__x54, Null, K, "CastLiteral", """line 461, column 31 of dart:collection/splay_tree.dart: """, __x54 is K, false))(null);
|
| + if (_root == null) return ((__x61) => DDC$RT.cast(__x61, Null, K, "CastLiteral", """line 461, column 31 of dart:collection/splay_tree.dart: """, __x61 is K, false))(null);
|
| int comp = _splay(key);
|
| if (comp < 0) return _root.key;
|
| _SplayTreeNode<K> node = _root.left;
|
| - if (node == null) return ((__x55) => DDC$RT.cast(__x55, Null, K, "CastLiteral", """line 465, column 30 of dart:collection/splay_tree.dart: """, __x55 is K, false))(null);
|
| + if (node == null) return ((__x62) => DDC$RT.cast(__x62, Null, K, "CastLiteral", """line 465, column 30 of dart:collection/splay_tree.dart: """, __x62 is K, false))(null);
|
| while (node.right != null) {
|
| node = node.right;
|
| }
|
| @@ -325,11 +327,11 @@ node = node.right;
|
| }
|
| K firstKeyAfter(K key) {
|
| if (key == null) throw new ArgumentError(key);
|
| - if (_root == null) return ((__x56) => DDC$RT.cast(__x56, Null, K, "CastLiteral", """line 478, column 31 of dart:collection/splay_tree.dart: """, __x56 is K, false))(null);
|
| + if (_root == null) return ((__x63) => DDC$RT.cast(__x63, Null, K, "CastLiteral", """line 478, column 31 of dart:collection/splay_tree.dart: """, __x63 is K, false))(null);
|
| int comp = _splay(key);
|
| if (comp > 0) return _root.key;
|
| _SplayTreeNode<K> node = _root.right;
|
| - if (node == null) return ((__x57) => DDC$RT.cast(__x57, Null, K, "CastLiteral", """line 482, column 30 of dart:collection/splay_tree.dart: """, __x57 is K, false))(null);
|
| + if (node == null) return ((__x64) => DDC$RT.cast(__x64, Null, K, "CastLiteral", """line 482, column 30 of dart:collection/splay_tree.dart: """, __x64 is K, false))(null);
|
| while (node.left != null) {
|
| node = node.left;
|
| }
|
| @@ -355,7 +357,7 @@ _workList.add(tree._root);
|
| }
|
| }
|
| T get current {
|
| -if (_currentNode == null) return ((__x58) => DDC$RT.cast(__x58, Null, T, "CastLiteral", """line 547, column 38 of dart:collection/splay_tree.dart: """, __x58 is T, false))(null);
|
| +if (_currentNode == null) return ((__x65) => DDC$RT.cast(__x65, Null, T, "CastLiteral", """line 547, column 38 of dart:collection/splay_tree.dart: """, __x65 is T, false))(null);
|
| return _getValue(_currentNode);
|
| }
|
| void _findLeftMostDescendent(_SplayTreeNode node) {
|
| @@ -426,7 +428,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 = (compare == null) ? Comparable.compare : compare, _validKey = (isValidKey != null) ? isValidKey : ((v) => v is E);
|
| + SplayTreeSet([int compare(E key1, E key2), bool isValidKey(potentialKey)]) : _comparator = ((__x69) => DDC$RT.cast(__x69, dynamic, __t66, "CastGeneral", """line 693, column 23 of dart:collection/splay_tree.dart: """, __x69 is __t66, false))((compare == null) ? Comparable.compare : compare), _validKey = ((__x70) => DDC$RT.cast(__x70, dynamic, __t49, "CastGeneral", """line 694, column 21 of dart:collection/splay_tree.dart: """, __x70 is __t49, 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) {
|
| @@ -458,11 +460,11 @@ return _validKey(object) && _splay(DDC$RT.cast(object, Object, E, "CastGeneral",
|
| bool add(E element) {
|
| int compare = _splay(element);
|
| if (compare == 0) return false;
|
| - _addNewRoot(((__x59) => DDC$RT.cast(__x59, DDC$RT.type((_SplayTreeNode<dynamic> _) {
|
| + _addNewRoot(((__x71) => DDC$RT.cast(__x71, DDC$RT.type((_SplayTreeNode<dynamic> _) {
|
| }
|
| ), DDC$RT.type((_SplayTreeNode<E> _) {
|
| }
|
| -), "CastExact", """line 747, column 17 of dart:collection/splay_tree.dart: """, __x59 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
|
| +), "CastExact", """line 747, column 17 of dart:collection/splay_tree.dart: """, __x71 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
|
| return true;
|
| }
|
| bool remove(Object object) {
|
| @@ -473,11 +475,11 @@ if (!_validKey(object)) return false;
|
| for (E element in elements) {
|
| int compare = _splay(element);
|
| if (compare != 0) {
|
| -_addNewRoot(((__x60) => DDC$RT.cast(__x60, DDC$RT.type((_SplayTreeNode<dynamic> _) {
|
| +_addNewRoot(((__x72) => DDC$RT.cast(__x72, DDC$RT.type((_SplayTreeNode<dynamic> _) {
|
| }
|
| ), DDC$RT.type((_SplayTreeNode<E> _) {
|
| }
|
| -), "CastExact", """line 760, column 21 of dart:collection/splay_tree.dart: """, __x60 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
|
| +), "CastExact", """line 760, column 21 of dart:collection/splay_tree.dart: """, __x72 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
|
| }
|
| }
|
| }
|
| @@ -502,9 +504,9 @@ _root = retainSet._root;
|
| }
|
| }
|
| E lookup(Object object) {
|
| -if (!_validKey(object)) return ((__x61) => DDC$RT.cast(__x61, Null, E, "CastLiteral", """line 792, column 36 of dart:collection/splay_tree.dart: """, __x61 is E, false))(null);
|
| +if (!_validKey(object)) return ((__x73) => DDC$RT.cast(__x73, Null, E, "CastLiteral", """line 792, column 36 of dart:collection/splay_tree.dart: """, __x73 is E, false))(null);
|
| int comp = _splay(DDC$RT.cast(object, Object, E, "CastGeneral", """line 793, column 23 of dart:collection/splay_tree.dart: """, object is E, false));
|
| - if (comp != 0) return ((__x62) => DDC$RT.cast(__x62, Null, E, "CastLiteral", """line 794, column 27 of dart:collection/splay_tree.dart: """, __x62 is E, false))(null);
|
| + if (comp != 0) return ((__x74) => DDC$RT.cast(__x74, Null, E, "CastLiteral", """line 794, column 27 of dart:collection/splay_tree.dart: """, __x74 is E, false))(null);
|
| return _root.key;
|
| }
|
| Set<E> intersection(Set<E> other) {
|
| @@ -540,3 +542,6 @@ _clear();
|
| Set<E> toSet() => _clone();
|
| String toString() => IterableBase.iterableToFullString(this, '{', '}');
|
| }
|
| + typedef int __t45<K>(K __u46, K __u47);
|
| + typedef bool __t49(dynamic __u50);
|
| + typedef int __t66(dynamic __u67, dynamic __u68);
|
|
|