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

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

Issue 1643523008: fix #43, remove => workaround (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 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 | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/convert.js » ('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 282b2c9f639cf3aab2bd40ed40a8c642c5c6a91d..cf1b9cb23c6da5d4c11a6583b49243edd484af87 100644
--- a/lib/runtime/dart/collection.js
+++ b/lib/runtime/dart/collection.js
@@ -191,7 +191,7 @@ dart_library.library('dart/collection', null, /* Imports */[
let _ = core.List$(E).new();
_[dartx.length] = this.length;
return _;
- }).bind(this)() : core.List$(E).new(this.length);
+ })() : core.List$(E).new(this.length);
let i = 0;
for (let element of this)
result[dartx.set](i++, element);
@@ -456,7 +456,7 @@ dart_library.library('dart/collection', null, /* Imports */[
let _ = this[_newSet]();
_.addAll(this);
return _;
- }).bind(this)();
+ })();
}
}
dart.setSignature(_HashSetBase, {
@@ -1363,7 +1363,7 @@ dart_library.library('dart/collection', null, /* Imports */[
}
addAll(entries) {
dart.as(entries, core.Iterable$(E));
- entries[dartx.forEach](dart.fn((entry => this[_insertAfter](this[_previous], entry)).bind(this), dart.void, [E]));
+ entries[dartx.forEach](dart.fn(entry => this[_insertAfter](this[_previous], entry), dart.void, [E]));
}
remove(entry) {
dart.as(entry, E);
@@ -1763,7 +1763,7 @@ dart_library.library('dart/collection', null, /* Imports */[
let x = this.length;
this.length = dart.notNull(x) + 1;
return x;
- }).bind(this)(), element);
+ })(), element);
}
addAll(iterable) {
dart.as(iterable, core.Iterable$(E));
@@ -1772,7 +1772,7 @@ dart_library.library('dart/collection', null, /* Imports */[
let x = this.length;
this.length = dart.notNull(x) + 1;
return x;
- }).bind(this)(), element);
+ })(), element);
}
}
remove(element) {
@@ -3442,7 +3442,7 @@ dart_library.library('dart/collection', null, /* Imports */[
return null;
}
set(key, value) {
- ((() => {
+ (() => {
dart.as(key, K);
dart.as(value, V);
if (key == null) dart.throw(new core.ArgumentError(key));
@@ -3453,7 +3453,7 @@ dart_library.library('dart/collection', null, /* Imports */[
return;
}
this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value), comp);
- }).bind(this))();
+ })();
return value;
}
putIfAbsent(key, ifAbsent) {
@@ -3480,11 +3480,11 @@ dart_library.library('dart/collection', null, /* Imports */[
}
addAll(other) {
dart.as(other, core.Map$(K, V));
- other.forEach(dart.fn(((key, value) => {
+ other.forEach(dart.fn((key, value) => {
dart.as(key, K);
dart.as(value, V);
this.set(key, value);
- }).bind(this), dart.void, [K, V]));
+ }, dart.void, [K, V]));
}
get isEmpty() {
return this[_root] == null;
@@ -4006,7 +4006,7 @@ dart_library.library('dart/collection', null, /* Imports */[
return new (HashMapKeyIterable$(K))(this);
}
get values() {
- return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => this.get(each)).bind(this), V, [K]));
+ return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => this.get(each), V, [K]));
}
containsKey(key) {
if (dart.notNull(_HashMap$()._isStringKey(key))) {
@@ -4026,15 +4026,15 @@ dart_library.library('dart/collection', null, /* Imports */[
return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
}
containsValue(value) {
- return this[_computeKeys]()[dartx.any](dart.fn((each => dart.equals(this.get(each), value)).bind(this), core.bool, [dart.dynamic]));
+ return this[_computeKeys]()[dartx.any](dart.fn(each => dart.equals(this.get(each), value), core.bool, [dart.dynamic]));
}
addAll(other) {
dart.as(other, core.Map$(K, V));
- other.forEach(dart.fn(((key, value) => {
+ other.forEach(dart.fn((key, value) => {
dart.as(key, K);
dart.as(value, V);
this.set(key, value);
- }).bind(this), dart.void, [K, V]));
+ }, dart.void, [K, V]));
}
get(key) {
if (dart.notNull(_HashMap$()._isStringKey(key))) {
@@ -4466,7 +4466,7 @@ dart_library.library('dart/collection', null, /* Imports */[
return new (LinkedHashMapKeyIterable$(K))(this);
}
get values() {
- return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => this.get(each)).bind(this), V, [K]));
+ return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => this.get(each), V, [K]));
}
containsKey(key) {
if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) {
@@ -4490,15 +4490,15 @@ dart_library.library('dart/collection', null, /* Imports */[
return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
}
containsValue(value) {
- return this.keys[dartx.any](dart.fn((each => dart.equals(this.get(each), value)).bind(this), core.bool, [K]));
+ return this.keys[dartx.any](dart.fn(each => dart.equals(this.get(each), value), core.bool, [K]));
}
addAll(other) {
dart.as(other, core.Map$(K, V));
- other.forEach(dart.fn(((key, value) => {
+ other.forEach(dart.fn((key, value) => {
dart.as(key, K);
dart.as(value, V);
this.set(key, value);
- }).bind(this), dart.void, [K, V]));
+ }, dart.void, [K, V]));
}
get(key) {
if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) {
« no previous file with comments | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/convert.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698