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

Side by Side Diff: test/codegen/expect/collection/algorithms.js

Issue 1483813002: Use const for const/final top-levels, types, symbols. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebased after vsm's regen Created 5 years 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 | « test/codegen/expect/closure.js ('k') | test/codegen/expect/collection/iterable_zip.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 dart_library.library('collection/algorithms', null, /* Imports */[ 1 dart_library.library('collection/algorithms', null, /* Imports */[
2 "dart/_runtime", 2 "dart/_runtime",
3 'dart/core', 3 'dart/core',
4 'dart/math' 4 'dart/math'
5 ], /* Lazy imports */[ 5 ], /* Lazy imports */[
6 ], function(exports, dart, core, math) { 6 ], function(exports, dart, core, math) {
7 'use strict'; 7 'use strict';
8 let dartx = dart.dartx; 8 let dartx = dart.dartx;
9 function _comparableBinarySearch(list, key) { 9 function _comparableBinarySearch(list, key) {
10 let min = 0; 10 let min = 0;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 max = mid; 105 max = mid;
106 } else { 106 } else {
107 min = dart.notNull(mid) + 1; 107 min = dart.notNull(mid) + 1;
108 } 108 }
109 } 109 }
110 list[dartx.setRange](dart.notNull(min) + 1, dart.notNull(pos) + 1, list, m in); 110 list[dartx.setRange](dart.notNull(min) + 1, dart.notNull(pos) + 1, list, m in);
111 list[dartx.set](min, element); 111 list[dartx.set](min, element);
112 } 112 }
113 } 113 }
114 dart.fn(_insertionSort, dart.void, [core.List, dart.functionType(core.int, [da rt.dynamic, dart.dynamic]), core.int, core.int, core.int]); 114 dart.fn(_insertionSort, dart.void, [core.List, dart.functionType(core.int, [da rt.dynamic, dart.dynamic]), core.int, core.int, core.int]);
115 let _MERGE_SORT_LIMIT = 32; 115 const _MERGE_SORT_LIMIT = 32;
116 function mergeSort(list, opts) { 116 function mergeSort(list, opts) {
117 let start = opts && 'start' in opts ? opts.start : 0; 117 let start = opts && 'start' in opts ? opts.start : 0;
118 let end = opts && 'end' in opts ? opts.end : null; 118 let end = opts && 'end' in opts ? opts.end : null;
119 let compare = opts && 'compare' in opts ? opts.compare : null; 119 let compare = opts && 'compare' in opts ? opts.compare : null;
120 if (end == null) 120 if (end == null)
121 end = list[dartx.length]; 121 end = list[dartx.length];
122 if (compare == null) 122 if (compare == null)
123 compare = core.Comparable.compare; 123 compare = core.Comparable.compare;
124 let length = dart.notNull(end) - dart.notNull(start); 124 let length = dart.notNull(end) - dart.notNull(start);
125 if (dart.notNull(length) < 2) 125 if (dart.notNull(length) < 2)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 target[dartx.setRange](targetOffset, dart.notNull(targetOffset) + (dart.notN ull(secondEnd) - dart.notNull(cursor2)), secondList, cursor2); 235 target[dartx.setRange](targetOffset, dart.notNull(targetOffset) + (dart.notN ull(secondEnd) - dart.notNull(cursor2)), secondList, cursor2);
236 } 236 }
237 dart.fn(_merge, dart.void, [dart.functionType(core.int, [dart.dynamic, dart.dy namic]), core.List, core.int, core.int, core.List, core.int, core.int, core.List , core.int]); 237 dart.fn(_merge, dart.void, [dart.functionType(core.int, [dart.dynamic, dart.dy namic]), core.List, core.int, core.int, core.List, core.int, core.int, core.List , core.int]);
238 // Exports: 238 // Exports:
239 exports.binarySearch = binarySearch; 239 exports.binarySearch = binarySearch;
240 exports.shuffle = shuffle; 240 exports.shuffle = shuffle;
241 exports.reverse = reverse; 241 exports.reverse = reverse;
242 exports.insertionSort = insertionSort; 242 exports.insertionSort = insertionSort;
243 exports.mergeSort = mergeSort; 243 exports.mergeSort = mergeSort;
244 }); 244 });
OLDNEW
« no previous file with comments | « test/codegen/expect/closure.js ('k') | test/codegen/expect/collection/iterable_zip.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698