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

Unified Diff: test/dart_codegen/expect/collection/splay_tree.dart

Issue 1038213003: Downward inference (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Implement named arguments, some fixes Created 5 years, 9 months 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 | « test/dart_codegen/expect/collection/queue.dart ('k') | test/dart_codegen/expect/convert/json.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 59641bdff34d247129d5e552ef2c63b1b59ea448..e46d041318f2146924a8265e0fcd1c7b75e96727 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 = ((__x23) => DEVC$RT.cast(__x23, dynamic, DEVC$RT.type((__t20<K> _) {
+ SplayTreeMap([int compare(K key1, K key2), bool isValidKey(potentialKey)]) : _comparator = ((__x22) => DEVC$RT.cast(__x22, dynamic, DEVC$RT.type((__t19<K> _) {
}
-), "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, false))((isValidKey != null) ? isValidKey : ((v) => v is K));
+), "CompositeCast", """line 268, column 23 of dart:collection/splay_tree.dart: """, __x22 is __t19<K>, false))((compare == null) ? Comparable.compare : compare), _validKey = ((__x25) => DEVC$RT.cast(__x25, dynamic, __t23, "CompositeCast", """line 269, column 21 of dart:collection/splay_tree.dart: """, __x25 is __t23, 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 = ((__x27) => DEVC$RT.cast(__x27, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
+ _SplayTreeMapNode mapRoot = ((__x26) => DEVC$RT.cast(__x26, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
}
), DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
}
-), "AssignmentCast", """line 342, column 33 of dart:collection/splay_tree.dart: """, __x27 is _SplayTreeMapNode<dynamic, dynamic>, true))(_remove(DEVC$RT.cast(key, Object, K, "CompositeCast", """line 342, column 41 of dart:collection/splay_tree.dart: """, key is K, false)));
+), "AssignmentCast", """line 342, column 33 of dart:collection/splay_tree.dart: """, __x26 is _SplayTreeMapNode<dynamic, dynamic>, true))(_remove(DEVC$RT.cast(key, Object, K, "CompositeCast", """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, "CompositeCast", """line 343, column 33 of dart:collection/splay_tree.dart: """, mapRoot.value is V, false);
return null;
}
@@ -209,11 +209,7 @@ _SplayTreeMapNode mapRoot = DEVC$RT.cast(_root, DEVC$RT.type((_SplayTreeNode<K>
), "AssignmentCast", """line 353, column 35 of dart:collection/splay_tree.dart: """, _root is _SplayTreeMapNode<dynamic, dynamic>, true);
mapRoot.value = value;
return;}
- _addNewRoot(((__x28) => DEVC$RT.cast(__x28, DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
-}
-), DEVC$RT.type((_SplayTreeNode<K> _) {
-}
-), "InferableAllocation", """line 357, column 17 of dart:collection/splay_tree.dart: """, __x28 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
+ _addNewRoot(new _SplayTreeMapNode<K, dynamic>(key, value), comp);
}
V putIfAbsent(K key, V ifAbsent()) {
if (key == null) throw new ArgumentError(key);
@@ -235,11 +231,7 @@ throw new ConcurrentModificationError(this);
if (splayCount != _splayCount) {
comp = _splay(key);
assert (comp != 0);}
- _addNewRoot(((__x29) => DEVC$RT.cast(__x29, DEVC$RT.type((_SplayTreeMapNode<dynamic, dynamic> _) {
-}
-), DEVC$RT.type((_SplayTreeNode<K> _) {
-}
-), "InferableAllocation", """line 379, column 17 of dart:collection/splay_tree.dart: """, __x29 is _SplayTreeNode<K>, false))(new _SplayTreeMapNode(key, value)), comp);
+ _addNewRoot(new _SplayTreeMapNode<K, dynamic>(key, value), comp);
return value;
}
void addAll(Map<K, V> other) {
@@ -400,9 +392,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((__t30<K> _) {
+ SplayTreeSet<K> set = new SplayTreeSet<K>(DEVC$RT.cast(setOrMap._comparator, dynamic, DEVC$RT.type((__t27<K> _) {
}
-), "CompositeCast", """line 613, column 29 of dart:collection/splay_tree.dart: """, setOrMap._comparator is __t30<K>, false), DEVC$RT.cast(setOrMap._validKey, dynamic, __t24, "CompositeCast", """line 613, column 51 of dart:collection/splay_tree.dart: """, setOrMap._validKey is __t24, false));
+), "CompositeCast", """line 613, column 29 of dart:collection/splay_tree.dart: """, setOrMap._comparator is __t27<K>, false), DEVC$RT.cast(setOrMap._validKey, dynamic, __t23, "CompositeCast", """line 613, column 51 of dart:collection/splay_tree.dart: """, setOrMap._validKey is __t23, false));
set._count = _tree._count;
set._root = set._copyNode(_tree._root);
return set;
@@ -430,7 +422,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 = ((__x36) => DEVC$RT.cast(__x36, dynamic, __t33, "CompositeCast", """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, "CompositeCast", """line 694, column 21 of dart:collection/splay_tree.dart: """, __x37 is __t24, false))((isValidKey != null) ? isValidKey : ((v) => v is E));
+ SplayTreeSet([int compare(E key1, E key2), bool isValidKey(potentialKey)]) : _comparator = ((__x33) => DEVC$RT.cast(__x33, dynamic, __t30, "CompositeCast", """line 693, column 23 of dart:collection/splay_tree.dart: """, __x33 is __t30, false))((compare == null) ? Comparable.compare : compare), _validKey = ((__x34) => DEVC$RT.cast(__x34, dynamic, __t23, "CompositeCast", """line 694, column 21 of dart:collection/splay_tree.dart: """, __x34 is __t23, 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 +454,7 @@ return _validKey(object) && _splay(DEVC$RT.cast(object, Object, E, "CompositeCas
bool add(E element) {
int compare = _splay(element);
if (compare == 0) return false;
- _addNewRoot(((__x38) => DEVC$RT.cast(__x38, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
-}
-), DEVC$RT.type((_SplayTreeNode<E> _) {
-}
-), "InferableAllocation", """line 747, column 17 of dart:collection/splay_tree.dart: """, __x38 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
+ _addNewRoot(new _SplayTreeNode<E>(element), compare);
return true;
}
bool remove(Object object) {
@@ -477,11 +465,7 @@ if (!_validKey(object)) return false;
for (E element in elements) {
int compare = _splay(element);
if (compare != 0) {
-_addNewRoot(((__x39) => DEVC$RT.cast(__x39, DEVC$RT.type((_SplayTreeNode<dynamic> _) {
-}
-), DEVC$RT.type((_SplayTreeNode<E> _) {
-}
-), "InferableAllocation", """line 760, column 21 of dart:collection/splay_tree.dart: """, __x39 is _SplayTreeNode<E>, false))(new _SplayTreeNode(element)), compare);
+_addNewRoot(new _SplayTreeNode<E>(element), compare);
}
}
}
@@ -491,13 +475,13 @@ if (_validKey(element)) _remove(DEVC$RT.cast(element, Object, E, "CompositeCast"
}
}
void retainAll(Iterable<Object> elements) {
-SplayTreeSet<E> retainSet = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u40, dynamic __u41)) {
+SplayTreeSet<E> retainSet = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u35, dynamic __u36)) {
int c(dynamic x0, dynamic x1) => f(x0, x1);
return f == null ? null : c;
}
-, _comparator, __t33, DEVC$RT.type((__t42<E> _) {
+, _comparator, __t30, DEVC$RT.type((__t37<E> _) {
}
-), "Wrap", """line 773, column 53 of dart:collection/splay_tree.dart: """, _comparator is __t42<E>), _validKey);
+), "Wrap", """line 773, column 53 of dart:collection/splay_tree.dart: """, _comparator is __t37<E>), _validKey);
int modificationCount = _modificationCount;
for (Object object in elements) {
if (modificationCount != _modificationCount) {
@@ -518,26 +502,26 @@ if (!_validKey(object)) return null;
return _root.key;
}
Set<E> intersection(Set<E> other) {
-Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u45, dynamic __u46)) {
+Set<E> result = 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> _) {
+, _comparator, __t30, DEVC$RT.type((__t37<E> _) {
}
-), "Wrap", """line 799, column 41 of dart:collection/splay_tree.dart: """, _comparator is __t42<E>), _validKey);
+), "Wrap", """line 799, column 41 of dart:collection/splay_tree.dart: """, _comparator is __t37<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>(DEVC$RT.wrap((int f(dynamic __u47, dynamic __u48)) {
+Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u42, dynamic __u43)) {
int c(dynamic x0, dynamic x1) => f(x0, x1);
return f == null ? null : c;
}
-, _comparator, __t33, DEVC$RT.type((__t42<E> _) {
+, _comparator, __t30, DEVC$RT.type((__t37<E> _) {
}
-), "Wrap", """line 807, column 41 of dart:collection/splay_tree.dart: """, _comparator is __t42<E>), _validKey);
+), "Wrap", """line 807, column 41 of dart:collection/splay_tree.dart: """, _comparator is __t37<E>), _validKey);
for (E element in this) {
if (!other.contains(element)) result.add(element);
}
@@ -547,13 +531,13 @@ if (!other.contains(element)) result.add(element);
return _clone()..addAll(other);
}
SplayTreeSet<E> _clone() {
-var set = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u49, dynamic __u50)) {
+var set = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u44, dynamic __u45)) {
int c(dynamic x0, dynamic x1) => f(x0, x1);
return f == null ? null : c;
}
-, _comparator, __t33, DEVC$RT.type((__t42<E> _) {
+, _comparator, __t30, DEVC$RT.type((__t37<E> _) {
}
-), "Wrap", """line 819, column 35 of dart:collection/splay_tree.dart: """, _comparator is __t42<E>), _validKey);
+), "Wrap", """line 819, column 35 of dart:collection/splay_tree.dart: """, _comparator is __t37<E>), _validKey);
set._count = _count;
set._root = _copyNode(_root);
return set;
@@ -568,8 +552,8 @@ _clear();
Set<E> toSet() => _clone();
String toString() => IterableBase.iterableToFullString(this, '{', '}');
}
- 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);
+ typedef int __t19<K>(K __u20, K __u21);
+ typedef bool __t23(dynamic __u24);
+ typedef int __t27<K>(K __u28, K __u29);
+ typedef int __t30(dynamic __u31, dynamic __u32);
+ typedef int __t37<E>(E __u38, E __u39);
« no previous file with comments | « test/dart_codegen/expect/collection/queue.dart ('k') | test/dart_codegen/expect/convert/json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698