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

Side by Side Diff: lib/runtime/dart/_internal.js

Issue 1142293002: Use dart.tearoff helper at tearoff sites (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Use dart.bind instead of dart.tearoff 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
« no previous file with comments | « no previous file | lib/runtime/dart/_isolate_helper.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var _internal = dart.defineLibrary(_internal, {}); 1 var _internal = dart.defineLibrary(_internal, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var collection = dart.import(collection); 3 var collection = dart.import(collection);
4 var math = dart.lazyImport(math); 4 var math = dart.lazyImport(math);
5 var _interceptors = dart.lazyImport(_interceptors); 5 var _interceptors = dart.lazyImport(_interceptors);
6 var _js_primitives = dart.lazyImport(_js_primitives); 6 var _js_primitives = dart.lazyImport(_js_primitives);
7 (function(exports, core, collection, math, _interceptors, _js_primitives) { 7 (function(exports, core, collection, math, _interceptors, _js_primitives) {
8 'use strict'; 8 'use strict';
9 class EfficientLength extends core.Object {} 9 class EfficientLength extends core.Object {}
10 dart.setSignature(EfficientLength, {}); 10 dart.setSignature(EfficientLength, {});
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 skipWhile(iterable, test) { 1230 skipWhile(iterable, test) {
1231 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); 1231 dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
1232 return new (SkipWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, dart.functionType(core.bool, [T]))); 1232 return new (SkipWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, dart.functionType(core.bool, [T])));
1233 } 1233 }
1234 reversedList(list) { 1234 reversedList(list) {
1235 return new (ReversedListIterable$(T))(dart.as(list, core.Iterable$(T))); 1235 return new (ReversedListIterable$(T))(dart.as(list, core.Iterable$(T)));
1236 } 1236 }
1237 static sortList(list, compare) { 1237 static sortList(list, compare) {
1238 dart.as(compare, dart.functionType(core.int, [dart.dynamic, dart.dynamic ])); 1238 dart.as(compare, dart.functionType(core.int, [dart.dynamic, dart.dynamic ]));
1239 if (compare == null) 1239 if (compare == null)
1240 compare = dart.bind(core.Comparable, 'compare'); 1240 compare = core.Comparable.compare;
1241 Sort.sort(list, compare); 1241 Sort.sort(list, compare);
1242 } 1242 }
1243 static shuffleList(list, random) { 1243 static shuffleList(list, random) {
1244 if (random == null) 1244 if (random == null)
1245 random = new math.Random(); 1245 random = new math.Random();
1246 let length = list[core.$length]; 1246 let length = list[core.$length];
1247 while (dart.notNull(length) > 1) { 1247 while (dart.notNull(length) > 1) {
1248 let pos = random.nextInt(length); 1248 let pos = random.nextInt(length);
1249 length = dart.notNull(length) - 1; 1249 length = dart.notNull(length) - 1;
1250 let tmp = list[core.$get](length); 1250 let tmp = list[core.$get](length);
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
2307 exports.ReversedListIterable = ReversedListIterable; 2307 exports.ReversedListIterable = ReversedListIterable;
2308 exports.UnmodifiableListError = UnmodifiableListError; 2308 exports.UnmodifiableListError = UnmodifiableListError;
2309 exports.NonGrowableListError = NonGrowableListError; 2309 exports.NonGrowableListError = NonGrowableListError;
2310 exports.makeListFixedLength = makeListFixedLength; 2310 exports.makeListFixedLength = makeListFixedLength;
2311 exports.Lists = Lists; 2311 exports.Lists = Lists;
2312 exports.printToConsole = printToConsole; 2312 exports.printToConsole = printToConsole;
2313 exports.Sort = Sort; 2313 exports.Sort = Sort;
2314 exports.Symbol = Symbol; 2314 exports.Symbol = Symbol;
2315 exports.POWERS_OF_TEN = POWERS_OF_TEN; 2315 exports.POWERS_OF_TEN = POWERS_OF_TEN;
2316 })(_internal, core, collection, math, _interceptors, _js_primitives); 2316 })(_internal, core, collection, math, _interceptors, _js_primitives);
OLDNEW
« no previous file with comments | « no previous file | lib/runtime/dart/_isolate_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698