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

Unified Diff: lib/runtime/dart/collection.js

Issue 1050703002: Downwards closure inference (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Address comments 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 | « no previous file | lib/src/checker/rules.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/collection.js
diff --git a/lib/runtime/dart/collection.js b/lib/runtime/dart/collection.js
index e5fb42e92700a1ed619f2b53feb5814c1afbfe91..dae29c3d0210e28f22b0eb6b1fa9700079ac512f 100644
--- a/lib/runtime/dart/collection.js
+++ b/lib/runtime/dart/collection.js
@@ -1140,7 +1140,7 @@ var collection;
this[_insertAfter](this[_previous], entry);
}
addAll(entries) {
- entries.forEach(dart.closureWrap(((entry) => this[_insertAfter](this[_previous], dart.as(entry, E))).bind(this), "(E) → void"));
+ entries.forEach(dart.as(((entry) => this[_insertAfter](this[_previous], dart.as(entry, E))).bind(this), dart.throw_("Unimplemented type (E) → void")));
}
remove(entry) {
if (!dart.equals(entry[_list], this))
@@ -3374,7 +3374,7 @@ var collection;
return new (HashMapKeyIterable$(K))(this);
}
get values() {
- return new (_internal.MappedIterable$(K, V))(this.keys, dart.closureWrap(((each) => this.get(each)).bind(this), "(K) → V"));
+ return new (_internal.MappedIterable$(K, V))(this.keys, dart.as(((each) => this.get(each)).bind(this), dart.throw_("Unimplemented type (K) → V")));
}
containsKey(key) {
if (_HashMap[_isStringKey](key)) {
@@ -3775,7 +3775,7 @@ var collection;
return new (LinkedHashMapKeyIterable$(K))(this);
}
get values() {
- return new (_internal.MappedIterable$(K, V))(this.keys, dart.closureWrap(((each) => this.get(each)).bind(this), "(K) → V"));
+ return new (_internal.MappedIterable$(K, V))(this.keys, dart.as(((each) => this.get(each)).bind(this), dart.throw_("Unimplemented type (K) → V")));
}
containsKey(key) {
if (_LinkedHashMap[_isStringKey](key)) {
@@ -3802,7 +3802,7 @@ var collection;
return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
}
containsValue(value) {
- return this.keys.any(dart.closureWrap(((each) => dart.equals(this.get(each), value)).bind(this), "(K) → bool"));
+ return this.keys.any(dart.as(((each) => dart.equals(this.get(each), value)).bind(this), dart.throw_("Unimplemented type (K) → bool")));
}
addAll(other) {
other.forEach(((key, value) => {
« no previous file with comments | « no previous file | lib/src/checker/rules.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698