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

Side by Side 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 unified diff | Download patch
OLDNEW
1 var collection = dart.defineLibrary(collection, {}); 1 var collection = dart.defineLibrary(collection, {});
2 var _internal = dart.lazyImport(_internal); 2 var _internal = dart.lazyImport(_internal);
3 var core = dart.import(core); 3 var core = dart.import(core);
4 var _js_helper = dart.lazyImport(_js_helper); 4 var _js_helper = dart.lazyImport(_js_helper);
5 var math = dart.lazyImport(math); 5 var math = dart.lazyImport(math);
6 (function(exports, _internal, core, _js_helper, math) { 6 (function(exports, _internal, core, _js_helper, math) {
7 'use strict'; 7 'use strict';
8 let _source = Symbol('_source'); 8 let _source = Symbol('_source');
9 let UnmodifiableListView$ = dart.generic(function(E) { 9 let UnmodifiableListView$ = dart.generic(function(E) {
10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { 10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) {
(...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 throw _internal.IterableElementError.noElement(); 1786 throw _internal.IterableElementError.noElement();
1787 } 1787 }
1788 let result = this[core.$get](dart.notNull(this[core.$length]) - 1); 1788 let result = this[core.$get](dart.notNull(this[core.$length]) - 1);
1789 this[core.$length] = dart.notNull(this[core.$length]) - 1; 1789 this[core.$length] = dart.notNull(this[core.$length]) - 1;
1790 return result; 1790 return result;
1791 } 1791 }
1792 [core.$sort](compare) { 1792 [core.$sort](compare) {
1793 if (compare === void 0) 1793 if (compare === void 0)
1794 compare = null; 1794 compare = null;
1795 dart.as(compare, dart.functionType(core.int, [E, E])); 1795 dart.as(compare, dart.functionType(core.int, [E, E]));
1796 _internal.Sort.sort(this, compare == null ? dart.bind(core.Comparable, ' compare') : compare); 1796 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co mpare);
1797 } 1797 }
1798 [core.$shuffle](random) { 1798 [core.$shuffle](random) {
1799 if (random === void 0) 1799 if (random === void 0)
1800 random = null; 1800 random = null;
1801 if (random == null) 1801 if (random == null)
1802 random = new math.Random(); 1802 random = new math.Random();
1803 let length = this[core.$length]; 1803 let length = this[core.$length];
1804 while (dart.notNull(length) > 1) { 1804 while (dart.notNull(length) > 1) {
1805 let pos = random.nextInt(length); 1805 let pos = random.nextInt(length);
1806 length = dart.notNull(length) - 1; 1806 length = dart.notNull(length) - 1;
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3272 let _SplayTree = _SplayTree$(); 3272 let _SplayTree = _SplayTree$();
3273 let _comparator = Symbol('_comparator'); 3273 let _comparator = Symbol('_comparator');
3274 let _validKey = Symbol('_validKey'); 3274 let _validKey = Symbol('_validKey');
3275 let SplayTreeMap$ = dart.generic(function(K, V) { 3275 let SplayTreeMap$ = dart.generic(function(K, V) {
3276 class SplayTreeMap extends _SplayTree$(K) { 3276 class SplayTreeMap extends _SplayTree$(K) {
3277 SplayTreeMap(compare, isValidKey) { 3277 SplayTreeMap(compare, isValidKey) {
3278 if (compare === void 0) 3278 if (compare === void 0)
3279 compare = null; 3279 compare = null;
3280 if (isValidKey === void 0) 3280 if (isValidKey === void 0)
3281 isValidKey = null; 3281 isValidKey = null;
3282 this[_comparator] = dart.as(compare == null ? dart.bind(core.Comparable, 'compare') : compare, core.Comparator$(K)); 3282 this[_comparator] = dart.as(compare == null ? core.Comparable.compare : compare, core.Comparator$(K));
3283 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, K), core.bool, [dart.dynamic]); 3283 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, K), core.bool, [dart.dynamic]);
3284 super._SplayTree(); 3284 super._SplayTree();
3285 } 3285 }
3286 from(other, compare, isValidKey) { 3286 from(other, compare, isValidKey) {
3287 if (compare === void 0) 3287 if (compare === void 0)
3288 compare = null; 3288 compare = null;
3289 if (isValidKey === void 0) 3289 if (isValidKey === void 0)
3290 isValidKey = null; 3290 isValidKey = null;
3291 let result = new (SplayTreeMap$(K, V))(); 3291 let result = new (SplayTreeMap$(K, V))();
3292 other.forEach(dart.fn((k, v) => { 3292 other.forEach(dart.fn((k, v) => {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
3695 }); 3695 });
3696 let _SplayTreeNodeIterator = _SplayTreeNodeIterator$(); 3696 let _SplayTreeNodeIterator = _SplayTreeNodeIterator$();
3697 let _clone = Symbol('_clone'); 3697 let _clone = Symbol('_clone');
3698 let SplayTreeSet$ = dart.generic(function(E) { 3698 let SplayTreeSet$ = dart.generic(function(E) {
3699 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set Mixin$(E)) { 3699 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set Mixin$(E)) {
3700 SplayTreeSet(compare, isValidKey) { 3700 SplayTreeSet(compare, isValidKey) {
3701 if (compare === void 0) 3701 if (compare === void 0)
3702 compare = null; 3702 compare = null;
3703 if (isValidKey === void 0) 3703 if (isValidKey === void 0)
3704 isValidKey = null; 3704 isValidKey = null;
3705 this[_comparator] = dart.as(compare == null ? dart.bind(core.Comparable, 'compare') : compare, core.Comparator$(E)); 3705 this[_comparator] = dart.as(compare == null ? core.Comparable.compare : compare, core.Comparator$(E));
3706 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, E), core.bool, [dart.dynamic]); 3706 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, E), core.bool, [dart.dynamic]);
3707 super._SplayTree(); 3707 super._SplayTree();
3708 } 3708 }
3709 from(elements, compare, isValidKey) { 3709 from(elements, compare, isValidKey) {
3710 if (compare === void 0) 3710 if (compare === void 0)
3711 compare = null; 3711 compare = null;
3712 if (isValidKey === void 0) 3712 if (isValidKey === void 0)
3713 isValidKey = null; 3713 isValidKey = null;
3714 let result = new (SplayTreeSet$(E))(compare, isValidKey); 3714 let result = new (SplayTreeSet$(E))(compare, isValidKey);
3715 for (let element of dart.as(elements, core.Iterable$(E))) { 3715 for (let element of dart.as(elements, core.Iterable$(E))) {
(...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after
5771 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 5771 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
5772 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 5772 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
5773 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 5773 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
5774 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 5774 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
5775 exports.HashSetIterator$ = HashSetIterator$; 5775 exports.HashSetIterator$ = HashSetIterator$;
5776 exports.HashSetIterator = HashSetIterator; 5776 exports.HashSetIterator = HashSetIterator;
5777 exports.LinkedHashSetCell = LinkedHashSetCell; 5777 exports.LinkedHashSetCell = LinkedHashSetCell;
5778 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 5778 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
5779 exports.LinkedHashSetIterator = LinkedHashSetIterator; 5779 exports.LinkedHashSetIterator = LinkedHashSetIterator;
5780 })(collection, _internal, core, _js_helper, math); 5780 })(collection, _internal, core, _js_helper, math);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698