| OLD | NEW |
| 1 dart_library.library('collection/priority_queue', null, /* Imports */[ | 1 dart_library.library('collection/priority_queue', null, /* Imports */[ |
| 2 "dart/_runtime", | 2 "dart/_runtime", |
| 3 'dart/core', | 3 'dart/core', |
| 4 'dart/collection' | 4 'dart/collection' |
| 5 ], /* Lazy imports */[ | 5 ], /* Lazy imports */[ |
| 6 ], function(exports, dart, core, collection) { | 6 ], function(exports, dart, core, collection) { |
| 7 'use strict'; | 7 'use strict'; |
| 8 let dartx = dart.dartx; | 8 let dartx = dart.dartx; |
| 9 const PriorityQueue$ = dart.generic(function(E) { | 9 const PriorityQueue$ = dart.generic(function(E) { |
| 10 class PriorityQueue extends core.Object {} | 10 class PriorityQueue extends core.Object {} |
| 11 return PriorityQueue; | 11 return PriorityQueue; |
| 12 }); | 12 }); |
| 13 let PriorityQueue = PriorityQueue$(); | 13 let PriorityQueue = PriorityQueue$(); |
| 14 const _queue = Symbol('_queue'); | 14 const _queue = Symbol('_queue'); |
| 15 const _length = Symbol('_length'); | 15 const _length = Symbol('_length'); |
| 16 const _add = Symbol('_add'); | 16 const _add = Symbol('_add'); |
| 17 const _locate = Symbol('_locate'); | 17 const _locate = Symbol('_locate'); |
| 18 const _removeLast = Symbol('_removeLast'); | 18 const _removeLast = Symbol('_removeLast'); |
| 19 const _bubbleUp = Symbol('_bubbleUp'); | 19 const _bubbleUp = Symbol('_bubbleUp'); |
| 20 const _bubbleDown = Symbol('_bubbleDown'); | 20 const _bubbleDown = Symbol('_bubbleDown'); |
| 21 const _grow = Symbol('_grow'); | 21 const _grow = Symbol('_grow'); |
| 22 const HeapPriorityQueue$ = dart.generic(function(E) { | 22 const HeapPriorityQueue$ = dart.generic(function(E) { |
| 23 class HeapPriorityQueue extends core.Object { | 23 class HeapPriorityQueue extends core.Object { |
| 24 HeapPriorityQueue(comparison) { | 24 HeapPriorityQueue(comparison) { |
| 25 if (comparison === void 0) comparison = null; | 25 if (comparison === void 0) comparison = null; |
| 26 this[_queue] = core.List$(E).new(HeapPriorityQueue$()._INITIAL_CAPACITY)
; | 26 this[_queue] = core.List$(E).new(HeapPriorityQueue$()._INITIAL_CAPACITY)
; |
| 27 this.comparison = comparison != null ? comparison : core.Comparable.comp
are; | 27 this.comparison = dart.as(comparison != null ? comparison : core.Compara
ble.compare, core.Comparator); |
| 28 this[_length] = 0; | 28 this[_length] = 0; |
| 29 } | 29 } |
| 30 add(element) { | 30 add(element) { |
| 31 dart.as(element, E); | 31 dart.as(element, E); |
| 32 this[_add](element); | 32 this[_add](element); |
| 33 } | 33 } |
| 34 addAll(elements) { | 34 addAll(elements) { |
| 35 dart.as(elements, core.Iterable$(E)); | 35 dart.as(elements, core.Iterable$(E)); |
| 36 for (let element of elements) { | 36 for (let element of elements) { |
| 37 this[_add](element); | 37 this[_add](element); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core
.int, [E, E])); | 232 const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core
.int, [E, E])); |
| 233 return __CastType0; | 233 return __CastType0; |
| 234 }); | 234 }); |
| 235 let __CastType0 = __CastType0$(); | 235 let __CastType0 = __CastType0$(); |
| 236 // Exports: | 236 // Exports: |
| 237 exports.PriorityQueue$ = PriorityQueue$; | 237 exports.PriorityQueue$ = PriorityQueue$; |
| 238 exports.PriorityQueue = PriorityQueue; | 238 exports.PriorityQueue = PriorityQueue; |
| 239 exports.HeapPriorityQueue$ = HeapPriorityQueue$; | 239 exports.HeapPriorityQueue$ = HeapPriorityQueue$; |
| 240 exports.HeapPriorityQueue = HeapPriorityQueue; | 240 exports.HeapPriorityQueue = HeapPriorityQueue; |
| 241 }); | 241 }); |
| OLD | NEW |