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

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

Issue 1142293002: Use dart.tearoff helper at tearoff sites (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Clean up conditional Created 5 years, 7 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
Index: lib/runtime/dart/collection.js
diff --git a/lib/runtime/dart/collection.js b/lib/runtime/dart/collection.js
index 8b82c8ef0055ce0268ebf2b569eefbbfb6eabdb3..98efd009a84457e3c8c084a56af0776712bbf571 100644
--- a/lib/runtime/dart/collection.js
+++ b/lib/runtime/dart/collection.js
@@ -1793,7 +1793,7 @@ var math = dart.lazyImport(math);
if (compare === void 0)
compare = null;
dart.as(compare, dart.functionType(core.int, [E, E]));
- _internal.Sort.sort(this, compare == null ? dart.bind(core.Comparable, 'compare') : compare);
+ _internal.Sort.sort(this, compare == null ? core.Comparable.compare : compare);
}
[core.$shuffle](random) {
if (random === void 0)
@@ -3279,7 +3279,7 @@ var math = dart.lazyImport(math);
compare = null;
if (isValidKey === void 0)
isValidKey = null;
- this[_comparator] = dart.as(compare == null ? dart.bind(core.Comparable, 'compare') : compare, core.Comparator$(K));
+ this[_comparator] = dart.as(compare == null ? core.Comparable.compare : compare, core.Comparator$(K));
this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is(v, K), core.bool, [dart.dynamic]);
super._SplayTree();
}
@@ -3702,7 +3702,7 @@ var math = dart.lazyImport(math);
compare = null;
if (isValidKey === void 0)
isValidKey = null;
- this[_comparator] = dart.as(compare == null ? dart.bind(core.Comparable, 'compare') : compare, core.Comparator$(E));
+ this[_comparator] = dart.as(compare == null ? core.Comparable.compare : compare, core.Comparator$(E));
this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is(v, E), core.bool, [dart.dynamic]);
super._SplayTree();
}

Powered by Google App Engine
This is Rietveld 408576698