| OLD | NEW |
| 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) { |
| 11 UnmodifiableListView(source) { | 11 UnmodifiableListView(source) { |
| 12 this[_source] = source; | 12 this[_source] = source; |
| 13 } | 13 } |
| 14 get [core.$length]() { | 14 get length() { |
| 15 return this[_source][core.$length]; | 15 return this[_source].length; |
| 16 } | 16 } |
| 17 [core.$get](index) { | 17 get(index) { |
| 18 return this[_source][core.$elementAt](index); | 18 return this[_source][dartx.elementAt](index); |
| 19 } | 19 } |
| 20 } | 20 } |
| 21 dart.setSignature(UnmodifiableListView, { | 21 dart.setSignature(UnmodifiableListView, { |
| 22 constructors: () => ({UnmodifiableListView: [exports.UnmodifiableListView$
(E), [core.Iterable$(E)]]}), | 22 constructors: () => ({UnmodifiableListView: [exports.UnmodifiableListView$
(E), [core.Iterable$(E)]]}), |
| 23 methods: () => ({[core.$get]: [E, [core.int]]}) | 23 methods: () => ({get: [E, [core.int]]}) |
| 24 }); | 24 }); |
| 25 return UnmodifiableListView; | 25 return UnmodifiableListView; |
| 26 }); | 26 }); |
| 27 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl
eListView$}); | 27 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl
eListView$}); |
| 28 function _defaultEquals(a, b) { | 28 function _defaultEquals(a, b) { |
| 29 return dart.equals(a, b); | 29 return dart.equals(a, b); |
| 30 } | 30 } |
| 31 dart.fn(_defaultEquals, core.bool, [core.Object, core.Object]); | 31 dart.fn(_defaultEquals, core.bool, [core.Object, core.Object]); |
| 32 function _defaultHashCode(a) { | 32 function _defaultHashCode(a) { |
| 33 return dart.hashCode(a); | 33 return dart.hashCode(a); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 fromIterable: [HashMap$(K, V), [core.Iterable], {key: dart.functionType(
K, [dart.bottom]), value: dart.functionType(V, [dart.bottom])}], | 105 fromIterable: [HashMap$(K, V), [core.Iterable], {key: dart.functionType(
K, [dart.bottom]), value: dart.functionType(V, [dart.bottom])}], |
| 106 fromIterables: [HashMap$(K, V), [core.Iterable$(K), core.Iterable$(V)]] | 106 fromIterables: [HashMap$(K, V), [core.Iterable$(K), core.Iterable$(V)]] |
| 107 }) | 107 }) |
| 108 }); | 108 }); |
| 109 return HashMap; | 109 return HashMap; |
| 110 }); | 110 }); |
| 111 let HashMap = HashMap$(); | 111 let HashMap = HashMap$(); |
| 112 let SetMixin$ = dart.generic(function(E) { | 112 let SetMixin$ = dart.generic(function(E) { |
| 113 class SetMixin extends core.Object { | 113 class SetMixin extends core.Object { |
| 114 [Symbol.iterator]() { | 114 [Symbol.iterator]() { |
| 115 return new dart.JsIterator(this[core.$iterator]); | 115 return new dart.JsIterator(this.iterator); |
| 116 } | 116 } |
| 117 get [core.$isEmpty]() { | 117 get isEmpty() { |
| 118 return this[core.$length] == 0; | 118 return this.length == 0; |
| 119 } | 119 } |
| 120 get [core.$isNotEmpty]() { | 120 get isNotEmpty() { |
| 121 return this[core.$length] != 0; | 121 return this.length != 0; |
| 122 } | 122 } |
| 123 clear() { | 123 clear() { |
| 124 this.removeAll(this[core.$toList]()); | 124 this.removeAll(this.toList()); |
| 125 } | 125 } |
| 126 addAll(elements) { | 126 addAll(elements) { |
| 127 dart.as(elements, core.Iterable$(E)); | 127 dart.as(elements, core.Iterable$(E)); |
| 128 for (let element of elements) | 128 for (let element of elements) |
| 129 this.add(element); | 129 this.add(element); |
| 130 } | 130 } |
| 131 removeAll(elements) { | 131 removeAll(elements) { |
| 132 for (let element of elements) | 132 for (let element of elements) |
| 133 this.remove(element); | 133 this.remove(element); |
| 134 } | 134 } |
| 135 retainAll(elements) { | 135 retainAll(elements) { |
| 136 let toRemove = this[core.$toSet](); | 136 let toRemove = this.toSet(); |
| 137 for (let o of elements) { | 137 for (let o of elements) { |
| 138 toRemove.remove(o); | 138 toRemove.remove(o); |
| 139 } | 139 } |
| 140 this.removeAll(toRemove); | 140 this.removeAll(toRemove); |
| 141 } | 141 } |
| 142 removeWhere(test) { | 142 removeWhere(test) { |
| 143 dart.as(test, dart.functionType(core.bool, [E])); | 143 dart.as(test, dart.functionType(core.bool, [E])); |
| 144 let toRemove = []; | 144 let toRemove = []; |
| 145 for (let element of this) { | 145 for (let element of this) { |
| 146 if (test(element)) | 146 if (test(element)) |
| 147 toRemove[core.$add](element); | 147 toRemove[dartx.add](element); |
| 148 } | 148 } |
| 149 this.removeAll(toRemove); | 149 this.removeAll(toRemove); |
| 150 } | 150 } |
| 151 retainWhere(test) { | 151 retainWhere(test) { |
| 152 dart.as(test, dart.functionType(core.bool, [E])); | 152 dart.as(test, dart.functionType(core.bool, [E])); |
| 153 let toRemove = []; | 153 let toRemove = []; |
| 154 for (let element of this) { | 154 for (let element of this) { |
| 155 if (!dart.notNull(test(element))) | 155 if (!dart.notNull(test(element))) |
| 156 toRemove[core.$add](element); | 156 toRemove[dartx.add](element); |
| 157 } | 157 } |
| 158 this.removeAll(toRemove); | 158 this.removeAll(toRemove); |
| 159 } | 159 } |
| 160 containsAll(other) { | 160 containsAll(other) { |
| 161 for (let o of other) { | 161 for (let o of other) { |
| 162 if (!dart.notNull(this[core.$contains](o))) | 162 if (!dart.notNull(this.contains(o))) |
| 163 return false; | 163 return false; |
| 164 } | 164 } |
| 165 return true; | 165 return true; |
| 166 } | 166 } |
| 167 union(other) { | 167 union(other) { |
| 168 dart.as(other, core.Set$(E)); | 168 dart.as(other, core.Set$(E)); |
| 169 let _ = this[core.$toSet](); | 169 let _ = this.toSet(); |
| 170 _.addAll(other); | 170 _.addAll(other); |
| 171 return _; | 171 return _; |
| 172 } | 172 } |
| 173 intersection(other) { | 173 intersection(other) { |
| 174 let result = this[core.$toSet](); | 174 let result = this.toSet(); |
| 175 for (let element of this) { | 175 for (let element of this) { |
| 176 if (!dart.notNull(other[core.$contains](element))) | 176 if (!dart.notNull(other.contains(element))) |
| 177 result.remove(element); | 177 result.remove(element); |
| 178 } | 178 } |
| 179 return result; | 179 return result; |
| 180 } | 180 } |
| 181 difference(other) { | 181 difference(other) { |
| 182 let result = this[core.$toSet](); | 182 let result = this.toSet(); |
| 183 for (let element of this) { | 183 for (let element of this) { |
| 184 if (other[core.$contains](element)) | 184 if (other.contains(element)) |
| 185 result.remove(element); | 185 result.remove(element); |
| 186 } | 186 } |
| 187 return result; | 187 return result; |
| 188 } | 188 } |
| 189 [core.$toList](opts) { | 189 toList(opts) { |
| 190 let growable = opts && 'growable' in opts ? opts.growable : true; | 190 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 191 let result = growable ? (() => { | 191 let result = growable ? (() => { |
| 192 let _ = core.List$(E).new(); | 192 let _ = core.List$(E).new(); |
| 193 _[core.$length] = this[core.$length]; | 193 _.length = this.length; |
| 194 return _; | 194 return _; |
| 195 })() : core.List$(E).new(this[core.$length]); | 195 })() : core.List$(E).new(this.length); |
| 196 let i = 0; | 196 let i = 0; |
| 197 for (let element of this) | 197 for (let element of this) |
| 198 result[core.$set]((() => { | 198 result[dartx.set]((() => { |
| 199 let x = i; | 199 let x = i; |
| 200 i = dart.notNull(x) + 1; | 200 i = dart.notNull(x) + 1; |
| 201 return x; | 201 return x; |
| 202 })(), element); | 202 })(), element); |
| 203 return result; | 203 return result; |
| 204 } | 204 } |
| 205 [core.$map](f) { | 205 map(f) { |
| 206 dart.as(f, dart.functionType(core.Object, [E])); | 206 dart.as(f, dart.functionType(core.Object, [E])); |
| 207 return new (_internal.EfficientLengthMappedIterable$(E, core.Object))(th
is, f); | 207 return new (_internal.EfficientLengthMappedIterable$(E, core.Object))(th
is, f); |
| 208 } | 208 } |
| 209 get [core.$single]() { | 209 get single() { |
| 210 if (dart.notNull(this[core.$length]) > 1) | 210 if (dart.notNull(this.length) > 1) |
| 211 throw _internal.IterableElementError.tooMany(); | 211 throw _internal.IterableElementError.tooMany(); |
| 212 let it = this[core.$iterator]; | 212 let it = this.iterator; |
| 213 if (!dart.notNull(it.moveNext())) | 213 if (!dart.notNull(it.moveNext())) |
| 214 throw _internal.IterableElementError.noElement(); | 214 throw _internal.IterableElementError.noElement(); |
| 215 let result = it.current; | 215 let result = it.current; |
| 216 return result; | 216 return result; |
| 217 } | 217 } |
| 218 toString() { | 218 toString() { |
| 219 return IterableBase.iterableToFullString(this, '{', '}'); | 219 return IterableBase.iterableToFullString(this, '{', '}'); |
| 220 } | 220 } |
| 221 [core.$where](f) { | 221 where(f) { |
| 222 dart.as(f, dart.functionType(core.bool, [E])); | 222 dart.as(f, dart.functionType(core.bool, [E])); |
| 223 return new (_internal.WhereIterable$(E))(this, f); | 223 return new (_internal.WhereIterable$(E))(this, f); |
| 224 } | 224 } |
| 225 [core.$expand](f) { | 225 expand(f) { |
| 226 dart.as(f, dart.functionType(core.Iterable, [E])); | 226 dart.as(f, dart.functionType(core.Iterable, [E])); |
| 227 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 227 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
| 228 } | 228 } |
| 229 [core.$forEach](f) { | 229 forEach(f) { |
| 230 dart.as(f, dart.functionType(dart.void, [E])); | 230 dart.as(f, dart.functionType(dart.void, [E])); |
| 231 for (let element of this) | 231 for (let element of this) |
| 232 f(element); | 232 f(element); |
| 233 } | 233 } |
| 234 [core.$reduce](combine) { | 234 reduce(combine) { |
| 235 dart.as(combine, dart.functionType(E, [E, E])); | 235 dart.as(combine, dart.functionType(E, [E, E])); |
| 236 let iterator = this[core.$iterator]; | 236 let iterator = this.iterator; |
| 237 if (!dart.notNull(iterator.moveNext())) { | 237 if (!dart.notNull(iterator.moveNext())) { |
| 238 throw _internal.IterableElementError.noElement(); | 238 throw _internal.IterableElementError.noElement(); |
| 239 } | 239 } |
| 240 let value = iterator.current; | 240 let value = iterator.current; |
| 241 while (iterator.moveNext()) { | 241 while (iterator.moveNext()) { |
| 242 value = combine(value, iterator.current); | 242 value = combine(value, iterator.current); |
| 243 } | 243 } |
| 244 return value; | 244 return value; |
| 245 } | 245 } |
| 246 [core.$fold](initialValue, combine) { | 246 fold(initialValue, combine) { |
| 247 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 247 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); |
| 248 let value = initialValue; | 248 let value = initialValue; |
| 249 for (let element of this) | 249 for (let element of this) |
| 250 value = dart.dcall(combine, value, element); | 250 value = dart.dcall(combine, value, element); |
| 251 return value; | 251 return value; |
| 252 } | 252 } |
| 253 [core.$every](f) { | 253 every(f) { |
| 254 dart.as(f, dart.functionType(core.bool, [E])); | 254 dart.as(f, dart.functionType(core.bool, [E])); |
| 255 for (let element of this) { | 255 for (let element of this) { |
| 256 if (!dart.notNull(f(element))) | 256 if (!dart.notNull(f(element))) |
| 257 return false; | 257 return false; |
| 258 } | 258 } |
| 259 return true; | 259 return true; |
| 260 } | 260 } |
| 261 [core.$join](separator) { | 261 join(separator) { |
| 262 if (separator === void 0) | 262 if (separator === void 0) |
| 263 separator = ""; | 263 separator = ""; |
| 264 let iterator = this[core.$iterator]; | 264 let iterator = this.iterator; |
| 265 if (!dart.notNull(iterator.moveNext())) | 265 if (!dart.notNull(iterator.moveNext())) |
| 266 return ""; | 266 return ""; |
| 267 let buffer = new core.StringBuffer(); | 267 let buffer = new core.StringBuffer(); |
| 268 if (separator == null || separator == "") { | 268 if (separator == null || separator == "") { |
| 269 do { | 269 do { |
| 270 buffer.write(`${iterator.current}`); | 270 buffer.write(`${iterator.current}`); |
| 271 } while (iterator.moveNext()); | 271 } while (iterator.moveNext()); |
| 272 } else { | 272 } else { |
| 273 buffer.write(`${iterator.current}`); | 273 buffer.write(`${iterator.current}`); |
| 274 while (iterator.moveNext()) { | 274 while (iterator.moveNext()) { |
| 275 buffer.write(separator); | 275 buffer.write(separator); |
| 276 buffer.write(`${iterator.current}`); | 276 buffer.write(`${iterator.current}`); |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 return dart.toString(buffer); | 279 return dart.toString(buffer); |
| 280 } | 280 } |
| 281 [core.$any](test) { | 281 any(test) { |
| 282 dart.as(test, dart.functionType(core.bool, [E])); | 282 dart.as(test, dart.functionType(core.bool, [E])); |
| 283 for (let element of this) { | 283 for (let element of this) { |
| 284 if (test(element)) | 284 if (test(element)) |
| 285 return true; | 285 return true; |
| 286 } | 286 } |
| 287 return false; | 287 return false; |
| 288 } | 288 } |
| 289 [core.$take](n) { | 289 take(n) { |
| 290 return _internal.TakeIterable$(E).new(this, n); | 290 return _internal.TakeIterable$(E).new(this, n); |
| 291 } | 291 } |
| 292 [core.$takeWhile](test) { | 292 takeWhile(test) { |
| 293 dart.as(test, dart.functionType(core.bool, [E])); | 293 dart.as(test, dart.functionType(core.bool, [E])); |
| 294 return new (_internal.TakeWhileIterable$(E))(this, test); | 294 return new (_internal.TakeWhileIterable$(E))(this, test); |
| 295 } | 295 } |
| 296 [core.$skip](n) { | 296 skip(n) { |
| 297 return _internal.SkipIterable$(E).new(this, n); | 297 return _internal.SkipIterable$(E).new(this, n); |
| 298 } | 298 } |
| 299 [core.$skipWhile](test) { | 299 skipWhile(test) { |
| 300 dart.as(test, dart.functionType(core.bool, [E])); | 300 dart.as(test, dart.functionType(core.bool, [E])); |
| 301 return new (_internal.SkipWhileIterable$(E))(this, test); | 301 return new (_internal.SkipWhileIterable$(E))(this, test); |
| 302 } | 302 } |
| 303 get [core.$first]() { | 303 get first() { |
| 304 let it = this[core.$iterator]; | 304 let it = this.iterator; |
| 305 if (!dart.notNull(it.moveNext())) { | 305 if (!dart.notNull(it.moveNext())) { |
| 306 throw _internal.IterableElementError.noElement(); | 306 throw _internal.IterableElementError.noElement(); |
| 307 } | 307 } |
| 308 return it.current; | 308 return it.current; |
| 309 } | 309 } |
| 310 get [core.$last]() { | 310 get last() { |
| 311 let it = this[core.$iterator]; | 311 let it = this.iterator; |
| 312 if (!dart.notNull(it.moveNext())) { | 312 if (!dart.notNull(it.moveNext())) { |
| 313 throw _internal.IterableElementError.noElement(); | 313 throw _internal.IterableElementError.noElement(); |
| 314 } | 314 } |
| 315 let result = null; | 315 let result = null; |
| 316 do { | 316 do { |
| 317 result = it.current; | 317 result = it.current; |
| 318 } while (it.moveNext()); | 318 } while (it.moveNext()); |
| 319 return result; | 319 return result; |
| 320 } | 320 } |
| 321 [core.$firstWhere](test, opts) { | 321 firstWhere(test, opts) { |
| 322 dart.as(test, dart.functionType(core.bool, [E])); | 322 dart.as(test, dart.functionType(core.bool, [E])); |
| 323 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 323 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
| 324 dart.as(orElse, dart.functionType(E, [])); | 324 dart.as(orElse, dart.functionType(E, [])); |
| 325 for (let element of this) { | 325 for (let element of this) { |
| 326 if (test(element)) | 326 if (test(element)) |
| 327 return element; | 327 return element; |
| 328 } | 328 } |
| 329 if (orElse != null) | 329 if (orElse != null) |
| 330 return orElse(); | 330 return orElse(); |
| 331 throw _internal.IterableElementError.noElement(); | 331 throw _internal.IterableElementError.noElement(); |
| 332 } | 332 } |
| 333 [core.$lastWhere](test, opts) { | 333 lastWhere(test, opts) { |
| 334 dart.as(test, dart.functionType(core.bool, [E])); | 334 dart.as(test, dart.functionType(core.bool, [E])); |
| 335 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 335 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
| 336 dart.as(orElse, dart.functionType(E, [])); | 336 dart.as(orElse, dart.functionType(E, [])); |
| 337 let result = null; | 337 let result = null; |
| 338 let foundMatching = false; | 338 let foundMatching = false; |
| 339 for (let element of this) { | 339 for (let element of this) { |
| 340 if (test(element)) { | 340 if (test(element)) { |
| 341 result = element; | 341 result = element; |
| 342 foundMatching = true; | 342 foundMatching = true; |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 if (foundMatching) | 345 if (foundMatching) |
| 346 return result; | 346 return result; |
| 347 if (orElse != null) | 347 if (orElse != null) |
| 348 return orElse(); | 348 return orElse(); |
| 349 throw _internal.IterableElementError.noElement(); | 349 throw _internal.IterableElementError.noElement(); |
| 350 } | 350 } |
| 351 [core.$singleWhere](test) { | 351 singleWhere(test) { |
| 352 dart.as(test, dart.functionType(core.bool, [E])); | 352 dart.as(test, dart.functionType(core.bool, [E])); |
| 353 let result = null; | 353 let result = null; |
| 354 let foundMatching = false; | 354 let foundMatching = false; |
| 355 for (let element of this) { | 355 for (let element of this) { |
| 356 if (test(element)) { | 356 if (test(element)) { |
| 357 if (foundMatching) { | 357 if (foundMatching) { |
| 358 throw _internal.IterableElementError.tooMany(); | 358 throw _internal.IterableElementError.tooMany(); |
| 359 } | 359 } |
| 360 result = element; | 360 result = element; |
| 361 foundMatching = true; | 361 foundMatching = true; |
| 362 } | 362 } |
| 363 } | 363 } |
| 364 if (foundMatching) | 364 if (foundMatching) |
| 365 return result; | 365 return result; |
| 366 throw _internal.IterableElementError.noElement(); | 366 throw _internal.IterableElementError.noElement(); |
| 367 } | 367 } |
| 368 [core.$elementAt](index) { | 368 elementAt(index) { |
| 369 if (!(typeof index == 'number')) | 369 if (!(typeof index == 'number')) |
| 370 throw new core.ArgumentError.notNull("index"); | 370 throw new core.ArgumentError.notNull("index"); |
| 371 core.RangeError.checkNotNegative(index, "index"); | 371 core.RangeError.checkNotNegative(index, "index"); |
| 372 let elementIndex = 0; | 372 let elementIndex = 0; |
| 373 for (let element of this) { | 373 for (let element of this) { |
| 374 if (index == elementIndex) | 374 if (index == elementIndex) |
| 375 return element; | 375 return element; |
| 376 elementIndex = dart.notNull(elementIndex) + 1; | 376 elementIndex = dart.notNull(elementIndex) + 1; |
| 377 } | 377 } |
| 378 throw core.RangeError.index(index, this, "index", null, elementIndex); | 378 throw core.RangeError.index(index, this, "index", null, elementIndex); |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 SetMixin[dart.implements] = () => [core.Set$(E)]; | 381 SetMixin[dart.implements] = () => [core.Set$(E)]; |
| 382 dart.defineExtensionMembers(SetMixin, [ |
| 383 'toList', |
| 384 'map', |
| 385 'where', |
| 386 'expand', |
| 387 'forEach', |
| 388 'reduce', |
| 389 'fold', |
| 390 'every', |
| 391 'join', |
| 392 'any', |
| 393 'take', |
| 394 'takeWhile', |
| 395 'skip', |
| 396 'skipWhile', |
| 397 'firstWhere', |
| 398 'lastWhere', |
| 399 'singleWhere', |
| 400 'elementAt', |
| 401 'isEmpty', |
| 402 'isNotEmpty', |
| 403 'single', |
| 404 'first', |
| 405 'last' |
| 406 ]); |
| 382 dart.setSignature(SetMixin, { | 407 dart.setSignature(SetMixin, { |
| 383 methods: () => ({ | 408 methods: () => ({ |
| 384 clear: [dart.void, []], | 409 clear: [dart.void, []], |
| 385 addAll: [dart.void, [core.Iterable$(E)]], | 410 addAll: [dart.void, [core.Iterable$(E)]], |
| 386 removeAll: [dart.void, [core.Iterable$(core.Object)]], | 411 removeAll: [dart.void, [core.Iterable$(core.Object)]], |
| 387 retainAll: [dart.void, [core.Iterable$(core.Object)]], | 412 retainAll: [dart.void, [core.Iterable$(core.Object)]], |
| 388 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 413 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| 389 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 414 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| 390 containsAll: [core.bool, [core.Iterable$(core.Object)]], | 415 containsAll: [core.bool, [core.Iterable$(core.Object)]], |
| 391 union: [core.Set$(E), [core.Set$(E)]], | 416 union: [core.Set$(E), [core.Set$(E)]], |
| 392 intersection: [core.Set$(E), [core.Set$(core.Object)]], | 417 intersection: [core.Set$(E), [core.Set$(core.Object)]], |
| 393 difference: [core.Set$(E), [core.Set$(core.Object)]], | 418 difference: [core.Set$(E), [core.Set$(core.Object)]], |
| 394 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 419 toList: [core.List$(E), [], {growable: core.bool}], |
| 395 [core.$map]: [core.Iterable, [dart.functionType(core.Object, [E])]], | 420 map: [core.Iterable, [dart.functionType(core.Object, [E])]], |
| 396 [core.$where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 421 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 397 [core.$expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, | 422 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], |
| 398 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 423 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 399 [core.$reduce]: [E, [dart.functionType(E, [E, E])]], | 424 reduce: [E, [dart.functionType(E, [E, E])]], |
| 400 [core.$fold]: [core.Object, [core.Object, dart.functionType(core.Object,
[dart.bottom, E])]], | 425 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], |
| 401 [core.$every]: [core.bool, [dart.functionType(core.bool, [E])]], | 426 every: [core.bool, [dart.functionType(core.bool, [E])]], |
| 402 [core.$join]: [core.String, [], [core.String]], | 427 join: [core.String, [], [core.String]], |
| 403 [core.$any]: [core.bool, [dart.functionType(core.bool, [E])]], | 428 any: [core.bool, [dart.functionType(core.bool, [E])]], |
| 404 [core.$take]: [core.Iterable$(E), [core.int]], | 429 take: [core.Iterable$(E), [core.int]], |
| 405 [core.$takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 430 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 406 [core.$skip]: [core.Iterable$(E), [core.int]], | 431 skip: [core.Iterable$(E), [core.int]], |
| 407 [core.$skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 432 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 408 [core.$firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], | 433 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
| 409 [core.$lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], | 434 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
| 410 [core.$singleWhere]: [E, [dart.functionType(core.bool, [E])]], | 435 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
| 411 [core.$elementAt]: [E, [core.int]] | 436 elementAt: [E, [core.int]] |
| 412 }) | 437 }) |
| 413 }); | 438 }); |
| 414 return SetMixin; | 439 return SetMixin; |
| 415 }); | 440 }); |
| 416 let SetMixin = SetMixin$(); | 441 let SetMixin = SetMixin$(); |
| 417 let SetBase$ = dart.generic(function(E) { | 442 let SetBase$ = dart.generic(function(E) { |
| 418 class SetBase extends SetMixin$(E) { | 443 class SetBase extends SetMixin$(E) { |
| 419 static setToString(set) { | 444 static setToString(set) { |
| 420 return IterableBase.iterableToFullString(set, '{', '}'); | 445 return IterableBase.iterableToFullString(set, '{', '}'); |
| 421 } | 446 } |
| 422 } | 447 } |
| 423 dart.setSignature(SetBase, { | 448 dart.setSignature(SetBase, { |
| 424 statics: () => ({setToString: [core.String, [core.Set]]}), | 449 statics: () => ({setToString: [core.String, [core.Set]]}), |
| 425 names: ['setToString'] | 450 names: ['setToString'] |
| 426 }); | 451 }); |
| 427 return SetBase; | 452 return SetBase; |
| 428 }); | 453 }); |
| 429 let SetBase = SetBase$(); | 454 let SetBase = SetBase$(); |
| 430 let _newSet = Symbol('_newSet'); | 455 let _newSet = Symbol('_newSet'); |
| 431 let _HashSetBase$ = dart.generic(function(E) { | 456 let _HashSetBase$ = dart.generic(function(E) { |
| 432 class _HashSetBase extends SetBase$(E) { | 457 class _HashSetBase extends SetBase$(E) { |
| 433 difference(other) { | 458 difference(other) { |
| 434 let result = this[_newSet](); | 459 let result = this[_newSet](); |
| 435 for (let element of this) { | 460 for (let element of this) { |
| 436 if (!dart.notNull(other[core.$contains](element))) | 461 if (!dart.notNull(other.contains(element))) |
| 437 result.add(element); | 462 result.add(element); |
| 438 } | 463 } |
| 439 return result; | 464 return result; |
| 440 } | 465 } |
| 441 intersection(other) { | 466 intersection(other) { |
| 442 let result = this[_newSet](); | 467 let result = this[_newSet](); |
| 443 for (let element of this) { | 468 for (let element of this) { |
| 444 if (other[core.$contains](element)) | 469 if (other.contains(element)) |
| 445 result.add(element); | 470 result.add(element); |
| 446 } | 471 } |
| 447 return result; | 472 return result; |
| 448 } | 473 } |
| 449 [core.$toSet]() { | 474 toSet() { |
| 450 return (() => { | 475 return (() => { |
| 451 let _ = this[_newSet](); | 476 let _ = this[_newSet](); |
| 452 _.addAll(this); | 477 _.addAll(this); |
| 453 return _; | 478 return _; |
| 454 })(); | 479 })(); |
| 455 } | 480 } |
| 456 } | 481 } |
| 457 dart.setSignature(_HashSetBase, { | 482 dart.setSignature(_HashSetBase, { |
| 458 methods: () => ({ | 483 methods: () => ({ |
| 459 difference: [core.Set$(E), [core.Set$(core.Object)]], | 484 difference: [core.Set$(E), [core.Set$(core.Object)]], |
| 460 intersection: [core.Set$(E), [core.Set$(core.Object)]], | 485 intersection: [core.Set$(E), [core.Set$(core.Object)]], |
| 461 [core.$toSet]: [core.Set$(E), []] | 486 toSet: [core.Set$(E), []] |
| 462 }) | 487 }) |
| 463 }); | 488 }); |
| 464 return _HashSetBase; | 489 return _HashSetBase; |
| 465 }); | 490 }); |
| 466 let _HashSetBase = _HashSetBase$(); | 491 let _HashSetBase = _HashSetBase$(); |
| 467 let HashSet$ = dart.generic(function(E) { | 492 let HashSet$ = dart.generic(function(E) { |
| 468 class HashSet extends core.Object { | 493 class HashSet extends core.Object { |
| 469 static new(opts) { | 494 static new(opts) { |
| 470 let equals = opts && 'equals' in opts ? opts.equals : null; | 495 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 471 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 496 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 497 static identity() { | 522 static identity() { |
| 498 return new (_IdentityHashSet$(E))(); | 523 return new (_IdentityHashSet$(E))(); |
| 499 } | 524 } |
| 500 static from(elements) { | 525 static from(elements) { |
| 501 let result = HashSet$(E).new(); | 526 let result = HashSet$(E).new(); |
| 502 for (let e of dart.as(elements, core.Iterable$(E))) | 527 for (let e of dart.as(elements, core.Iterable$(E))) |
| 503 result.add(e); | 528 result.add(e); |
| 504 return result; | 529 return result; |
| 505 } | 530 } |
| 506 [Symbol.iterator]() { | 531 [Symbol.iterator]() { |
| 507 return new dart.JsIterator(this[core.$iterator]); | 532 return new dart.JsIterator(this.iterator); |
| 508 } | 533 } |
| 509 } | 534 } |
| 510 HashSet[dart.implements] = () => [core.Set$(E)]; | 535 HashSet[dart.implements] = () => [core.Set$(E)]; |
| 511 dart.setSignature(HashSet, { | 536 dart.setSignature(HashSet, { |
| 512 constructors: () => ({ | 537 constructors: () => ({ |
| 513 new: [HashSet$(E), [], {equals: dart.functionType(core.bool, [E, E]), ha
shCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(core.boo
l, [core.Object])}], | 538 new: [HashSet$(E), [], {equals: dart.functionType(core.bool, [E, E]), ha
shCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(core.boo
l, [core.Object])}], |
| 514 identity: [HashSet$(E), []], | 539 identity: [HashSet$(E), []], |
| 515 from: [HashSet$(E), [core.Iterable]] | 540 from: [HashSet$(E), [core.Iterable]] |
| 516 }) | 541 }) |
| 517 }); | 542 }); |
| 518 return HashSet; | 543 return HashSet; |
| 519 }); | 544 }); |
| 520 let HashSet = HashSet$(); | 545 let HashSet = HashSet$(); |
| 521 let IterableMixin$ = dart.generic(function(E) { | 546 let IterableMixin$ = dart.generic(function(E) { |
| 522 class IterableMixin extends core.Object { | 547 class IterableMixin extends core.Object { |
| 523 [core.$map](f) { | 548 map(f) { |
| 524 dart.as(f, dart.functionType(core.Object, [E])); | 549 dart.as(f, dart.functionType(core.Object, [E])); |
| 525 return _internal.MappedIterable$(E, core.Object).new(this, f); | 550 return _internal.MappedIterable$(E, core.Object).new(this, f); |
| 526 } | 551 } |
| 527 [core.$where](f) { | 552 where(f) { |
| 528 dart.as(f, dart.functionType(core.bool, [E])); | 553 dart.as(f, dart.functionType(core.bool, [E])); |
| 529 return new (_internal.WhereIterable$(E))(this, f); | 554 return new (_internal.WhereIterable$(E))(this, f); |
| 530 } | 555 } |
| 531 [core.$expand](f) { | 556 expand(f) { |
| 532 dart.as(f, dart.functionType(core.Iterable, [E])); | 557 dart.as(f, dart.functionType(core.Iterable, [E])); |
| 533 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 558 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
| 534 } | 559 } |
| 535 [core.$contains](element) { | 560 contains(element) { |
| 536 for (let e of this) { | 561 for (let e of this) { |
| 537 if (dart.equals(e, element)) | 562 if (dart.equals(e, element)) |
| 538 return true; | 563 return true; |
| 539 } | 564 } |
| 540 return false; | 565 return false; |
| 541 } | 566 } |
| 542 [core.$forEach](f) { | 567 forEach(f) { |
| 543 dart.as(f, dart.functionType(dart.void, [E])); | 568 dart.as(f, dart.functionType(dart.void, [E])); |
| 544 for (let element of this) | 569 for (let element of this) |
| 545 f(element); | 570 f(element); |
| 546 } | 571 } |
| 547 [core.$reduce](combine) { | 572 reduce(combine) { |
| 548 dart.as(combine, dart.functionType(E, [E, E])); | 573 dart.as(combine, dart.functionType(E, [E, E])); |
| 549 let iterator = this[core.$iterator]; | 574 let iterator = this.iterator; |
| 550 if (!dart.notNull(iterator.moveNext())) { | 575 if (!dart.notNull(iterator.moveNext())) { |
| 551 throw _internal.IterableElementError.noElement(); | 576 throw _internal.IterableElementError.noElement(); |
| 552 } | 577 } |
| 553 let value = iterator.current; | 578 let value = iterator.current; |
| 554 while (iterator.moveNext()) { | 579 while (iterator.moveNext()) { |
| 555 value = combine(value, iterator.current); | 580 value = combine(value, iterator.current); |
| 556 } | 581 } |
| 557 return value; | 582 return value; |
| 558 } | 583 } |
| 559 [core.$fold](initialValue, combine) { | 584 fold(initialValue, combine) { |
| 560 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 585 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); |
| 561 let value = initialValue; | 586 let value = initialValue; |
| 562 for (let element of this) | 587 for (let element of this) |
| 563 value = dart.dcall(combine, value, element); | 588 value = dart.dcall(combine, value, element); |
| 564 return value; | 589 return value; |
| 565 } | 590 } |
| 566 [core.$every](f) { | 591 every(f) { |
| 567 dart.as(f, dart.functionType(core.bool, [E])); | 592 dart.as(f, dart.functionType(core.bool, [E])); |
| 568 for (let element of this) { | 593 for (let element of this) { |
| 569 if (!dart.notNull(f(element))) | 594 if (!dart.notNull(f(element))) |
| 570 return false; | 595 return false; |
| 571 } | 596 } |
| 572 return true; | 597 return true; |
| 573 } | 598 } |
| 574 [core.$join](separator) { | 599 join(separator) { |
| 575 if (separator === void 0) | 600 if (separator === void 0) |
| 576 separator = ""; | 601 separator = ""; |
| 577 let iterator = this[core.$iterator]; | 602 let iterator = this.iterator; |
| 578 if (!dart.notNull(iterator.moveNext())) | 603 if (!dart.notNull(iterator.moveNext())) |
| 579 return ""; | 604 return ""; |
| 580 let buffer = new core.StringBuffer(); | 605 let buffer = new core.StringBuffer(); |
| 581 if (separator == null || separator == "") { | 606 if (separator == null || separator == "") { |
| 582 do { | 607 do { |
| 583 buffer.write(`${iterator.current}`); | 608 buffer.write(`${iterator.current}`); |
| 584 } while (iterator.moveNext()); | 609 } while (iterator.moveNext()); |
| 585 } else { | 610 } else { |
| 586 buffer.write(`${iterator.current}`); | 611 buffer.write(`${iterator.current}`); |
| 587 while (iterator.moveNext()) { | 612 while (iterator.moveNext()) { |
| 588 buffer.write(separator); | 613 buffer.write(separator); |
| 589 buffer.write(`${iterator.current}`); | 614 buffer.write(`${iterator.current}`); |
| 590 } | 615 } |
| 591 } | 616 } |
| 592 return dart.toString(buffer); | 617 return dart.toString(buffer); |
| 593 } | 618 } |
| 594 [core.$any](f) { | 619 any(f) { |
| 595 dart.as(f, dart.functionType(core.bool, [E])); | 620 dart.as(f, dart.functionType(core.bool, [E])); |
| 596 for (let element of this) { | 621 for (let element of this) { |
| 597 if (f(element)) | 622 if (f(element)) |
| 598 return true; | 623 return true; |
| 599 } | 624 } |
| 600 return false; | 625 return false; |
| 601 } | 626 } |
| 602 [core.$toList](opts) { | 627 toList(opts) { |
| 603 let growable = opts && 'growable' in opts ? opts.growable : true; | 628 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 604 return core.List$(E).from(this, {growable: growable}); | 629 return core.List$(E).from(this, {growable: growable}); |
| 605 } | 630 } |
| 606 [core.$toSet]() { | 631 toSet() { |
| 607 return core.Set$(E).from(this); | 632 return core.Set$(E).from(this); |
| 608 } | 633 } |
| 609 get [core.$length]() { | 634 get length() { |
| 610 dart.assert(!dart.is(this, _internal.EfficientLength)); | 635 dart.assert(!dart.is(this, _internal.EfficientLength)); |
| 611 let count = 0; | 636 let count = 0; |
| 612 let it = this[core.$iterator]; | 637 let it = this[dartx.iterator]; |
| 613 while (it.moveNext()) { | 638 while (it.moveNext()) { |
| 614 count = dart.notNull(count) + 1; | 639 count = dart.notNull(count) + 1; |
| 615 } | 640 } |
| 616 return count; | 641 return count; |
| 617 } | 642 } |
| 618 get [core.$isEmpty]() { | 643 get isEmpty() { |
| 619 return !dart.notNull(this[core.$iterator].moveNext()); | 644 return !dart.notNull(this[dartx.iterator].moveNext()); |
| 620 } | 645 } |
| 621 get [core.$isNotEmpty]() { | 646 get isNotEmpty() { |
| 622 return !dart.notNull(this[core.$isEmpty]); | 647 return !dart.notNull(this.isEmpty); |
| 623 } | 648 } |
| 624 [core.$take](n) { | 649 take(n) { |
| 625 return _internal.TakeIterable$(E).new(this, n); | 650 return _internal.TakeIterable$(E).new(this, n); |
| 626 } | 651 } |
| 627 [core.$takeWhile](test) { | 652 takeWhile(test) { |
| 628 dart.as(test, dart.functionType(core.bool, [E])); | 653 dart.as(test, dart.functionType(core.bool, [E])); |
| 629 return new (_internal.TakeWhileIterable$(E))(this, test); | 654 return new (_internal.TakeWhileIterable$(E))(this, test); |
| 630 } | 655 } |
| 631 [core.$skip](n) { | 656 skip(n) { |
| 632 return _internal.SkipIterable$(E).new(this, n); | 657 return _internal.SkipIterable$(E).new(this, n); |
| 633 } | 658 } |
| 634 [core.$skipWhile](test) { | 659 skipWhile(test) { |
| 635 dart.as(test, dart.functionType(core.bool, [E])); | 660 dart.as(test, dart.functionType(core.bool, [E])); |
| 636 return new (_internal.SkipWhileIterable$(E))(this, test); | 661 return new (_internal.SkipWhileIterable$(E))(this, test); |
| 637 } | 662 } |
| 638 get [core.$first]() { | 663 get first() { |
| 639 let it = this[core.$iterator]; | 664 let it = this[dartx.iterator]; |
| 640 if (!dart.notNull(it.moveNext())) { | 665 if (!dart.notNull(it.moveNext())) { |
| 641 throw _internal.IterableElementError.noElement(); | 666 throw _internal.IterableElementError.noElement(); |
| 642 } | 667 } |
| 643 return it.current; | 668 return it.current; |
| 644 } | 669 } |
| 645 get [core.$last]() { | 670 get last() { |
| 646 let it = this[core.$iterator]; | 671 let it = this[dartx.iterator]; |
| 647 if (!dart.notNull(it.moveNext())) { | 672 if (!dart.notNull(it.moveNext())) { |
| 648 throw _internal.IterableElementError.noElement(); | 673 throw _internal.IterableElementError.noElement(); |
| 649 } | 674 } |
| 650 let result = null; | 675 let result = null; |
| 651 do { | 676 do { |
| 652 result = it.current; | 677 result = it.current; |
| 653 } while (it.moveNext()); | 678 } while (it.moveNext()); |
| 654 return result; | 679 return result; |
| 655 } | 680 } |
| 656 get [core.$single]() { | 681 get single() { |
| 657 let it = this[core.$iterator]; | 682 let it = this[dartx.iterator]; |
| 658 if (!dart.notNull(it.moveNext())) | 683 if (!dart.notNull(it.moveNext())) |
| 659 throw _internal.IterableElementError.noElement(); | 684 throw _internal.IterableElementError.noElement(); |
| 660 let result = it.current; | 685 let result = it.current; |
| 661 if (it.moveNext()) | 686 if (it.moveNext()) |
| 662 throw _internal.IterableElementError.tooMany(); | 687 throw _internal.IterableElementError.tooMany(); |
| 663 return result; | 688 return result; |
| 664 } | 689 } |
| 665 [core.$firstWhere](test, opts) { | 690 firstWhere(test, opts) { |
| 666 dart.as(test, dart.functionType(core.bool, [E])); | 691 dart.as(test, dart.functionType(core.bool, [E])); |
| 667 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 692 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
| 668 dart.as(orElse, dart.functionType(E, [])); | 693 dart.as(orElse, dart.functionType(E, [])); |
| 669 for (let element of this) { | 694 for (let element of this) { |
| 670 if (test(element)) | 695 if (test(element)) |
| 671 return element; | 696 return element; |
| 672 } | 697 } |
| 673 if (orElse != null) | 698 if (orElse != null) |
| 674 return orElse(); | 699 return orElse(); |
| 675 throw _internal.IterableElementError.noElement(); | 700 throw _internal.IterableElementError.noElement(); |
| 676 } | 701 } |
| 677 [core.$lastWhere](test, opts) { | 702 lastWhere(test, opts) { |
| 678 dart.as(test, dart.functionType(core.bool, [E])); | 703 dart.as(test, dart.functionType(core.bool, [E])); |
| 679 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 704 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
| 680 dart.as(orElse, dart.functionType(E, [])); | 705 dart.as(orElse, dart.functionType(E, [])); |
| 681 let result = null; | 706 let result = null; |
| 682 let foundMatching = false; | 707 let foundMatching = false; |
| 683 for (let element of this) { | 708 for (let element of this) { |
| 684 if (test(element)) { | 709 if (test(element)) { |
| 685 result = element; | 710 result = element; |
| 686 foundMatching = true; | 711 foundMatching = true; |
| 687 } | 712 } |
| 688 } | 713 } |
| 689 if (foundMatching) | 714 if (foundMatching) |
| 690 return result; | 715 return result; |
| 691 if (orElse != null) | 716 if (orElse != null) |
| 692 return orElse(); | 717 return orElse(); |
| 693 throw _internal.IterableElementError.noElement(); | 718 throw _internal.IterableElementError.noElement(); |
| 694 } | 719 } |
| 695 [core.$singleWhere](test) { | 720 singleWhere(test) { |
| 696 dart.as(test, dart.functionType(core.bool, [E])); | 721 dart.as(test, dart.functionType(core.bool, [E])); |
| 697 let result = null; | 722 let result = null; |
| 698 let foundMatching = false; | 723 let foundMatching = false; |
| 699 for (let element of this) { | 724 for (let element of this) { |
| 700 if (test(element)) { | 725 if (test(element)) { |
| 701 if (foundMatching) { | 726 if (foundMatching) { |
| 702 throw _internal.IterableElementError.tooMany(); | 727 throw _internal.IterableElementError.tooMany(); |
| 703 } | 728 } |
| 704 result = element; | 729 result = element; |
| 705 foundMatching = true; | 730 foundMatching = true; |
| 706 } | 731 } |
| 707 } | 732 } |
| 708 if (foundMatching) | 733 if (foundMatching) |
| 709 return result; | 734 return result; |
| 710 throw _internal.IterableElementError.noElement(); | 735 throw _internal.IterableElementError.noElement(); |
| 711 } | 736 } |
| 712 [core.$elementAt](index) { | 737 elementAt(index) { |
| 713 if (!(typeof index == 'number')) | 738 if (!(typeof index == 'number')) |
| 714 throw new core.ArgumentError.notNull("index"); | 739 throw new core.ArgumentError.notNull("index"); |
| 715 core.RangeError.checkNotNegative(index, "index"); | 740 core.RangeError.checkNotNegative(index, "index"); |
| 716 let elementIndex = 0; | 741 let elementIndex = 0; |
| 717 for (let element of this) { | 742 for (let element of this) { |
| 718 if (index == elementIndex) | 743 if (index == elementIndex) |
| 719 return element; | 744 return element; |
| 720 elementIndex = dart.notNull(elementIndex) + 1; | 745 elementIndex = dart.notNull(elementIndex) + 1; |
| 721 } | 746 } |
| 722 throw core.RangeError.index(index, this, "index", null, elementIndex); | 747 throw core.RangeError.index(index, this, "index", null, elementIndex); |
| 723 } | 748 } |
| 724 toString() { | 749 toString() { |
| 725 return IterableBase.iterableToShortString(this, '(', ')'); | 750 return IterableBase.iterableToShortString(this, '(', ')'); |
| 726 } | 751 } |
| 727 [Symbol.iterator]() { | 752 [Symbol.iterator]() { |
| 728 return new dart.JsIterator(this[core.$iterator]); | 753 return new dart.JsIterator(this.iterator); |
| 729 } | 754 } |
| 730 } | 755 } |
| 731 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; | 756 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; |
| 757 dart.defineExtensionMembers(IterableMixin, [ |
| 758 'map', |
| 759 'where', |
| 760 'expand', |
| 761 'contains', |
| 762 'forEach', |
| 763 'reduce', |
| 764 'fold', |
| 765 'every', |
| 766 'join', |
| 767 'any', |
| 768 'toList', |
| 769 'toSet', |
| 770 'take', |
| 771 'takeWhile', |
| 772 'skip', |
| 773 'skipWhile', |
| 774 'firstWhere', |
| 775 'lastWhere', |
| 776 'singleWhere', |
| 777 'elementAt', |
| 778 'length', |
| 779 'isEmpty', |
| 780 'isNotEmpty', |
| 781 'first', |
| 782 'last', |
| 783 'single' |
| 784 ]); |
| 732 dart.setSignature(IterableMixin, { | 785 dart.setSignature(IterableMixin, { |
| 733 methods: () => ({ | 786 methods: () => ({ |
| 734 [core.$map]: [core.Iterable, [dart.functionType(core.Object, [E])]], | 787 map: [core.Iterable, [dart.functionType(core.Object, [E])]], |
| 735 [core.$where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 788 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 736 [core.$expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, | 789 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], |
| 737 [core.$contains]: [core.bool, [core.Object]], | 790 contains: [core.bool, [core.Object]], |
| 738 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 791 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 739 [core.$reduce]: [E, [dart.functionType(E, [E, E])]], | 792 reduce: [E, [dart.functionType(E, [E, E])]], |
| 740 [core.$fold]: [core.Object, [core.Object, dart.functionType(core.Object,
[dart.bottom, E])]], | 793 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], |
| 741 [core.$every]: [core.bool, [dart.functionType(core.bool, [E])]], | 794 every: [core.bool, [dart.functionType(core.bool, [E])]], |
| 742 [core.$join]: [core.String, [], [core.String]], | 795 join: [core.String, [], [core.String]], |
| 743 [core.$any]: [core.bool, [dart.functionType(core.bool, [E])]], | 796 any: [core.bool, [dart.functionType(core.bool, [E])]], |
| 744 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 797 toList: [core.List$(E), [], {growable: core.bool}], |
| 745 [core.$toSet]: [core.Set$(E), []], | 798 toSet: [core.Set$(E), []], |
| 746 [core.$take]: [core.Iterable$(E), [core.int]], | 799 take: [core.Iterable$(E), [core.int]], |
| 747 [core.$takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 800 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 748 [core.$skip]: [core.Iterable$(E), [core.int]], | 801 skip: [core.Iterable$(E), [core.int]], |
| 749 [core.$skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 802 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 750 [core.$firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], | 803 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
| 751 [core.$lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], | 804 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
| 752 [core.$singleWhere]: [E, [dart.functionType(core.bool, [E])]], | 805 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
| 753 [core.$elementAt]: [E, [core.int]] | 806 elementAt: [E, [core.int]] |
| 754 }) | 807 }) |
| 755 }); | 808 }); |
| 756 return IterableMixin; | 809 return IterableMixin; |
| 757 }); | 810 }); |
| 758 let IterableMixin = IterableMixin$(); | 811 let IterableMixin = IterableMixin$(); |
| 759 let IterableBase$ = dart.generic(function(E) { | 812 let IterableBase$ = dart.generic(function(E) { |
| 760 class IterableBase extends core.Object { | 813 class IterableBase extends core.Object { |
| 761 IterableBase() { | 814 IterableBase() { |
| 762 } | 815 } |
| 763 [core.$map](f) { | 816 map(f) { |
| 764 dart.as(f, dart.functionType(core.Object, [E])); | 817 dart.as(f, dart.functionType(core.Object, [E])); |
| 765 return _internal.MappedIterable$(E, core.Object).new(this, f); | 818 return _internal.MappedIterable$(E, core.Object).new(this, f); |
| 766 } | 819 } |
| 767 [core.$where](f) { | 820 where(f) { |
| 768 dart.as(f, dart.functionType(core.bool, [E])); | 821 dart.as(f, dart.functionType(core.bool, [E])); |
| 769 return new (_internal.WhereIterable$(E))(this, f); | 822 return new (_internal.WhereIterable$(E))(this, f); |
| 770 } | 823 } |
| 771 [core.$expand](f) { | 824 expand(f) { |
| 772 dart.as(f, dart.functionType(core.Iterable, [E])); | 825 dart.as(f, dart.functionType(core.Iterable, [E])); |
| 773 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 826 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
| 774 } | 827 } |
| 775 [core.$contains](element) { | 828 contains(element) { |
| 776 for (let e of this) { | 829 for (let e of this) { |
| 777 if (dart.equals(e, element)) | 830 if (dart.equals(e, element)) |
| 778 return true; | 831 return true; |
| 779 } | 832 } |
| 780 return false; | 833 return false; |
| 781 } | 834 } |
| 782 [core.$forEach](f) { | 835 forEach(f) { |
| 783 dart.as(f, dart.functionType(dart.void, [E])); | 836 dart.as(f, dart.functionType(dart.void, [E])); |
| 784 for (let element of this) | 837 for (let element of this) |
| 785 f(element); | 838 f(element); |
| 786 } | 839 } |
| 787 [core.$reduce](combine) { | 840 reduce(combine) { |
| 788 dart.as(combine, dart.functionType(E, [E, E])); | 841 dart.as(combine, dart.functionType(E, [E, E])); |
| 789 let iterator = this[core.$iterator]; | 842 let iterator = this.iterator; |
| 790 if (!dart.notNull(iterator.moveNext())) { | 843 if (!dart.notNull(iterator.moveNext())) { |
| 791 throw _internal.IterableElementError.noElement(); | 844 throw _internal.IterableElementError.noElement(); |
| 792 } | 845 } |
| 793 let value = iterator.current; | 846 let value = iterator.current; |
| 794 while (iterator.moveNext()) { | 847 while (iterator.moveNext()) { |
| 795 value = combine(value, iterator.current); | 848 value = combine(value, iterator.current); |
| 796 } | 849 } |
| 797 return value; | 850 return value; |
| 798 } | 851 } |
| 799 [core.$fold](initialValue, combine) { | 852 fold(initialValue, combine) { |
| 800 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 853 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); |
| 801 let value = initialValue; | 854 let value = initialValue; |
| 802 for (let element of this) | 855 for (let element of this) |
| 803 value = dart.dcall(combine, value, element); | 856 value = dart.dcall(combine, value, element); |
| 804 return value; | 857 return value; |
| 805 } | 858 } |
| 806 [core.$every](f) { | 859 every(f) { |
| 807 dart.as(f, dart.functionType(core.bool, [E])); | 860 dart.as(f, dart.functionType(core.bool, [E])); |
| 808 for (let element of this) { | 861 for (let element of this) { |
| 809 if (!dart.notNull(f(element))) | 862 if (!dart.notNull(f(element))) |
| 810 return false; | 863 return false; |
| 811 } | 864 } |
| 812 return true; | 865 return true; |
| 813 } | 866 } |
| 814 [core.$join](separator) { | 867 join(separator) { |
| 815 if (separator === void 0) | 868 if (separator === void 0) |
| 816 separator = ""; | 869 separator = ""; |
| 817 let iterator = this[core.$iterator]; | 870 let iterator = this.iterator; |
| 818 if (!dart.notNull(iterator.moveNext())) | 871 if (!dart.notNull(iterator.moveNext())) |
| 819 return ""; | 872 return ""; |
| 820 let buffer = new core.StringBuffer(); | 873 let buffer = new core.StringBuffer(); |
| 821 if (separator == null || separator == "") { | 874 if (separator == null || separator == "") { |
| 822 do { | 875 do { |
| 823 buffer.write(`${iterator.current}`); | 876 buffer.write(`${iterator.current}`); |
| 824 } while (iterator.moveNext()); | 877 } while (iterator.moveNext()); |
| 825 } else { | 878 } else { |
| 826 buffer.write(`${iterator.current}`); | 879 buffer.write(`${iterator.current}`); |
| 827 while (iterator.moveNext()) { | 880 while (iterator.moveNext()) { |
| 828 buffer.write(separator); | 881 buffer.write(separator); |
| 829 buffer.write(`${iterator.current}`); | 882 buffer.write(`${iterator.current}`); |
| 830 } | 883 } |
| 831 } | 884 } |
| 832 return dart.toString(buffer); | 885 return dart.toString(buffer); |
| 833 } | 886 } |
| 834 [core.$any](f) { | 887 any(f) { |
| 835 dart.as(f, dart.functionType(core.bool, [E])); | 888 dart.as(f, dart.functionType(core.bool, [E])); |
| 836 for (let element of this) { | 889 for (let element of this) { |
| 837 if (f(element)) | 890 if (f(element)) |
| 838 return true; | 891 return true; |
| 839 } | 892 } |
| 840 return false; | 893 return false; |
| 841 } | 894 } |
| 842 [core.$toList](opts) { | 895 toList(opts) { |
| 843 let growable = opts && 'growable' in opts ? opts.growable : true; | 896 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 844 return core.List$(E).from(this, {growable: growable}); | 897 return core.List$(E).from(this, {growable: growable}); |
| 845 } | 898 } |
| 846 [core.$toSet]() { | 899 toSet() { |
| 847 return core.Set$(E).from(this); | 900 return core.Set$(E).from(this); |
| 848 } | 901 } |
| 849 get [core.$length]() { | 902 get length() { |
| 850 dart.assert(!dart.is(this, _internal.EfficientLength)); | 903 dart.assert(!dart.is(this, _internal.EfficientLength)); |
| 851 let count = 0; | 904 let count = 0; |
| 852 let it = this[core.$iterator]; | 905 let it = this[dartx.iterator]; |
| 853 while (it.moveNext()) { | 906 while (it.moveNext()) { |
| 854 count = dart.notNull(count) + 1; | 907 count = dart.notNull(count) + 1; |
| 855 } | 908 } |
| 856 return count; | 909 return count; |
| 857 } | 910 } |
| 858 get [core.$isEmpty]() { | 911 get isEmpty() { |
| 859 return !dart.notNull(this[core.$iterator].moveNext()); | 912 return !dart.notNull(this[dartx.iterator].moveNext()); |
| 860 } | 913 } |
| 861 get [core.$isNotEmpty]() { | 914 get isNotEmpty() { |
| 862 return !dart.notNull(this[core.$isEmpty]); | 915 return !dart.notNull(this.isEmpty); |
| 863 } | 916 } |
| 864 [core.$take](n) { | 917 take(n) { |
| 865 return _internal.TakeIterable$(E).new(this, n); | 918 return _internal.TakeIterable$(E).new(this, n); |
| 866 } | 919 } |
| 867 [core.$takeWhile](test) { | 920 takeWhile(test) { |
| 868 dart.as(test, dart.functionType(core.bool, [E])); | 921 dart.as(test, dart.functionType(core.bool, [E])); |
| 869 return new (_internal.TakeWhileIterable$(E))(this, test); | 922 return new (_internal.TakeWhileIterable$(E))(this, test); |
| 870 } | 923 } |
| 871 [core.$skip](n) { | 924 skip(n) { |
| 872 return _internal.SkipIterable$(E).new(this, n); | 925 return _internal.SkipIterable$(E).new(this, n); |
| 873 } | 926 } |
| 874 [core.$skipWhile](test) { | 927 skipWhile(test) { |
| 875 dart.as(test, dart.functionType(core.bool, [E])); | 928 dart.as(test, dart.functionType(core.bool, [E])); |
| 876 return new (_internal.SkipWhileIterable$(E))(this, test); | 929 return new (_internal.SkipWhileIterable$(E))(this, test); |
| 877 } | 930 } |
| 878 get [core.$first]() { | 931 get first() { |
| 879 let it = this[core.$iterator]; | 932 let it = this[dartx.iterator]; |
| 880 if (!dart.notNull(it.moveNext())) { | 933 if (!dart.notNull(it.moveNext())) { |
| 881 throw _internal.IterableElementError.noElement(); | 934 throw _internal.IterableElementError.noElement(); |
| 882 } | 935 } |
| 883 return it.current; | 936 return it.current; |
| 884 } | 937 } |
| 885 get [core.$last]() { | 938 get last() { |
| 886 let it = this[core.$iterator]; | 939 let it = this[dartx.iterator]; |
| 887 if (!dart.notNull(it.moveNext())) { | 940 if (!dart.notNull(it.moveNext())) { |
| 888 throw _internal.IterableElementError.noElement(); | 941 throw _internal.IterableElementError.noElement(); |
| 889 } | 942 } |
| 890 let result = null; | 943 let result = null; |
| 891 do { | 944 do { |
| 892 result = it.current; | 945 result = it.current; |
| 893 } while (it.moveNext()); | 946 } while (it.moveNext()); |
| 894 return result; | 947 return result; |
| 895 } | 948 } |
| 896 get [core.$single]() { | 949 get single() { |
| 897 let it = this[core.$iterator]; | 950 let it = this[dartx.iterator]; |
| 898 if (!dart.notNull(it.moveNext())) | 951 if (!dart.notNull(it.moveNext())) |
| 899 throw _internal.IterableElementError.noElement(); | 952 throw _internal.IterableElementError.noElement(); |
| 900 let result = it.current; | 953 let result = it.current; |
| 901 if (it.moveNext()) | 954 if (it.moveNext()) |
| 902 throw _internal.IterableElementError.tooMany(); | 955 throw _internal.IterableElementError.tooMany(); |
| 903 return result; | 956 return result; |
| 904 } | 957 } |
| 905 [core.$firstWhere](test, opts) { | 958 firstWhere(test, opts) { |
| 906 dart.as(test, dart.functionType(core.bool, [E])); | 959 dart.as(test, dart.functionType(core.bool, [E])); |
| 907 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 960 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
| 908 dart.as(orElse, dart.functionType(E, [])); | 961 dart.as(orElse, dart.functionType(E, [])); |
| 909 for (let element of this) { | 962 for (let element of this) { |
| 910 if (test(element)) | 963 if (test(element)) |
| 911 return element; | 964 return element; |
| 912 } | 965 } |
| 913 if (orElse != null) | 966 if (orElse != null) |
| 914 return orElse(); | 967 return orElse(); |
| 915 throw _internal.IterableElementError.noElement(); | 968 throw _internal.IterableElementError.noElement(); |
| 916 } | 969 } |
| 917 [core.$lastWhere](test, opts) { | 970 lastWhere(test, opts) { |
| 918 dart.as(test, dart.functionType(core.bool, [E])); | 971 dart.as(test, dart.functionType(core.bool, [E])); |
| 919 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 972 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
| 920 dart.as(orElse, dart.functionType(E, [])); | 973 dart.as(orElse, dart.functionType(E, [])); |
| 921 let result = null; | 974 let result = null; |
| 922 let foundMatching = false; | 975 let foundMatching = false; |
| 923 for (let element of this) { | 976 for (let element of this) { |
| 924 if (test(element)) { | 977 if (test(element)) { |
| 925 result = element; | 978 result = element; |
| 926 foundMatching = true; | 979 foundMatching = true; |
| 927 } | 980 } |
| 928 } | 981 } |
| 929 if (foundMatching) | 982 if (foundMatching) |
| 930 return result; | 983 return result; |
| 931 if (orElse != null) | 984 if (orElse != null) |
| 932 return orElse(); | 985 return orElse(); |
| 933 throw _internal.IterableElementError.noElement(); | 986 throw _internal.IterableElementError.noElement(); |
| 934 } | 987 } |
| 935 [core.$singleWhere](test) { | 988 singleWhere(test) { |
| 936 dart.as(test, dart.functionType(core.bool, [E])); | 989 dart.as(test, dart.functionType(core.bool, [E])); |
| 937 let result = null; | 990 let result = null; |
| 938 let foundMatching = false; | 991 let foundMatching = false; |
| 939 for (let element of this) { | 992 for (let element of this) { |
| 940 if (test(element)) { | 993 if (test(element)) { |
| 941 if (foundMatching) { | 994 if (foundMatching) { |
| 942 throw _internal.IterableElementError.tooMany(); | 995 throw _internal.IterableElementError.tooMany(); |
| 943 } | 996 } |
| 944 result = element; | 997 result = element; |
| 945 foundMatching = true; | 998 foundMatching = true; |
| 946 } | 999 } |
| 947 } | 1000 } |
| 948 if (foundMatching) | 1001 if (foundMatching) |
| 949 return result; | 1002 return result; |
| 950 throw _internal.IterableElementError.noElement(); | 1003 throw _internal.IterableElementError.noElement(); |
| 951 } | 1004 } |
| 952 [core.$elementAt](index) { | 1005 elementAt(index) { |
| 953 if (!(typeof index == 'number')) | 1006 if (!(typeof index == 'number')) |
| 954 throw new core.ArgumentError.notNull("index"); | 1007 throw new core.ArgumentError.notNull("index"); |
| 955 core.RangeError.checkNotNegative(index, "index"); | 1008 core.RangeError.checkNotNegative(index, "index"); |
| 956 let elementIndex = 0; | 1009 let elementIndex = 0; |
| 957 for (let element of this) { | 1010 for (let element of this) { |
| 958 if (index == elementIndex) | 1011 if (index == elementIndex) |
| 959 return element; | 1012 return element; |
| 960 elementIndex = dart.notNull(elementIndex) + 1; | 1013 elementIndex = dart.notNull(elementIndex) + 1; |
| 961 } | 1014 } |
| 962 throw core.RangeError.index(index, this, "index", null, elementIndex); | 1015 throw core.RangeError.index(index, this, "index", null, elementIndex); |
| 963 } | 1016 } |
| 964 toString() { | 1017 toString() { |
| 965 return IterableBase$().iterableToShortString(this, '(', ')'); | 1018 return IterableBase$().iterableToShortString(this, '(', ')'); |
| 966 } | 1019 } |
| 967 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { | 1020 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { |
| 968 if (leftDelimiter === void 0) | 1021 if (leftDelimiter === void 0) |
| 969 leftDelimiter = '('; | 1022 leftDelimiter = '('; |
| 970 if (rightDelimiter === void 0) | 1023 if (rightDelimiter === void 0) |
| 971 rightDelimiter = ')'; | 1024 rightDelimiter = ')'; |
| 972 if (IterableBase$()._isToStringVisiting(iterable)) { | 1025 if (IterableBase$()._isToStringVisiting(iterable)) { |
| 973 if (leftDelimiter == "(" && rightDelimiter == ")") { | 1026 if (leftDelimiter == "(" && rightDelimiter == ")") { |
| 974 return "(...)"; | 1027 return "(...)"; |
| 975 } | 1028 } |
| 976 return `${leftDelimiter}...${rightDelimiter}`; | 1029 return `${leftDelimiter}...${rightDelimiter}`; |
| 977 } | 1030 } |
| 978 let parts = []; | 1031 let parts = []; |
| 979 IterableBase$()._toStringVisiting[core.$add](iterable); | 1032 IterableBase$()._toStringVisiting[dartx.add](iterable); |
| 980 try { | 1033 try { |
| 981 IterableBase$()._iterablePartsToStrings(iterable, parts); | 1034 IterableBase$()._iterablePartsToStrings(iterable, parts); |
| 982 } finally { | 1035 } finally { |
| 983 dart.assert(core.identical(IterableBase$()._toStringVisiting[core.$las
t], iterable)); | 1036 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las
t], iterable)); |
| 984 IterableBase$()._toStringVisiting[core.$removeLast](); | 1037 IterableBase$()._toStringVisiting[dartx.removeLast](); |
| 985 } | 1038 } |
| 986 return dart.toString((() => { | 1039 return dart.toString((() => { |
| 987 let _ = new core.StringBuffer(leftDelimiter); | 1040 let _ = new core.StringBuffer(leftDelimiter); |
| 988 _.writeAll(parts, ", "); | 1041 _.writeAll(parts, ", "); |
| 989 _.write(rightDelimiter); | 1042 _.write(rightDelimiter); |
| 990 return _; | 1043 return _; |
| 991 })()); | 1044 })()); |
| 992 } | 1045 } |
| 993 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { | 1046 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { |
| 994 if (leftDelimiter === void 0) | 1047 if (leftDelimiter === void 0) |
| 995 leftDelimiter = '('; | 1048 leftDelimiter = '('; |
| 996 if (rightDelimiter === void 0) | 1049 if (rightDelimiter === void 0) |
| 997 rightDelimiter = ')'; | 1050 rightDelimiter = ')'; |
| 998 if (IterableBase$()._isToStringVisiting(iterable)) { | 1051 if (IterableBase$()._isToStringVisiting(iterable)) { |
| 999 return `${leftDelimiter}...${rightDelimiter}`; | 1052 return `${leftDelimiter}...${rightDelimiter}`; |
| 1000 } | 1053 } |
| 1001 let buffer = new core.StringBuffer(leftDelimiter); | 1054 let buffer = new core.StringBuffer(leftDelimiter); |
| 1002 IterableBase$()._toStringVisiting[core.$add](iterable); | 1055 IterableBase$()._toStringVisiting[dartx.add](iterable); |
| 1003 try { | 1056 try { |
| 1004 buffer.writeAll(iterable, ", "); | 1057 buffer.writeAll(iterable, ", "); |
| 1005 } finally { | 1058 } finally { |
| 1006 dart.assert(core.identical(IterableBase$()._toStringVisiting[core.$las
t], iterable)); | 1059 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las
t], iterable)); |
| 1007 IterableBase$()._toStringVisiting[core.$removeLast](); | 1060 IterableBase$()._toStringVisiting[dartx.removeLast](); |
| 1008 } | 1061 } |
| 1009 buffer.write(rightDelimiter); | 1062 buffer.write(rightDelimiter); |
| 1010 return dart.toString(buffer); | 1063 return dart.toString(buffer); |
| 1011 } | 1064 } |
| 1012 static _isToStringVisiting(o) { | 1065 static _isToStringVisiting(o) { |
| 1013 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString
Visiting[core.$length]); i = dart.notNull(i) + 1) { | 1066 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString
Visiting.length); i = dart.notNull(i) + 1) { |
| 1014 if (core.identical(o, IterableBase$()._toStringVisiting[core.$get](i))
) | 1067 if (core.identical(o, IterableBase$()._toStringVisiting[dartx.get](i))
) |
| 1015 return true; | 1068 return true; |
| 1016 } | 1069 } |
| 1017 return false; | 1070 return false; |
| 1018 } | 1071 } |
| 1019 static _iterablePartsToStrings(iterable, parts) { | 1072 static _iterablePartsToStrings(iterable, parts) { |
| 1020 let LENGTH_LIMIT = 80; | 1073 let LENGTH_LIMIT = 80; |
| 1021 let HEAD_COUNT = 3; | 1074 let HEAD_COUNT = 3; |
| 1022 let TAIL_COUNT = 2; | 1075 let TAIL_COUNT = 2; |
| 1023 let MAX_COUNT = 100; | 1076 let MAX_COUNT = 100; |
| 1024 let OVERHEAD = 2; | 1077 let OVERHEAD = 2; |
| 1025 let ELLIPSIS_SIZE = 3; | 1078 let ELLIPSIS_SIZE = 3; |
| 1026 let length = 0; | 1079 let length = 0; |
| 1027 let count = 0; | 1080 let count = 0; |
| 1028 let it = iterable[core.$iterator]; | 1081 let it = iterable[dartx.iterator]; |
| 1029 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { | 1082 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { |
| 1030 if (!dart.notNull(it.moveNext())) | 1083 if (!dart.notNull(it.moveNext())) |
| 1031 return; | 1084 return; |
| 1032 let next = `${it.current}`; | 1085 let next = `${it.current}`; |
| 1033 parts[core.$add](next); | 1086 parts[dartx.add](next); |
| 1034 length = dart.notNull(length) + (dart.notNull(next.length) + dart.notN
ull(OVERHEAD)); | 1087 length = dart.notNull(length) + (dart.notNull(next.length) + dart.notN
ull(OVERHEAD)); |
| 1035 count = dart.notNull(count) + 1; | 1088 count = dart.notNull(count) + 1; |
| 1036 } | 1089 } |
| 1037 let penultimateString = null; | 1090 let penultimateString = null; |
| 1038 let ultimateString = null; | 1091 let ultimateString = null; |
| 1039 let penultimate = null; | 1092 let penultimate = null; |
| 1040 let ultimate = null; | 1093 let ultimate = null; |
| 1041 if (!dart.notNull(it.moveNext())) { | 1094 if (!dart.notNull(it.moveNext())) { |
| 1042 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI
L_COUNT)) | 1095 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI
L_COUNT)) |
| 1043 return; | 1096 return; |
| 1044 ultimateString = dart.as(parts[core.$removeLast](), core.String); | 1097 ultimateString = dart.as(parts[dartx.removeLast](), core.String); |
| 1045 penultimateString = dart.as(parts[core.$removeLast](), core.String); | 1098 penultimateString = dart.as(parts[dartx.removeLast](), core.String); |
| 1046 } else { | 1099 } else { |
| 1047 penultimate = it.current; | 1100 penultimate = it.current; |
| 1048 count = dart.notNull(count) + 1; | 1101 count = dart.notNull(count) + 1; |
| 1049 if (!dart.notNull(it.moveNext())) { | 1102 if (!dart.notNull(it.moveNext())) { |
| 1050 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { | 1103 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { |
| 1051 parts[core.$add](`${penultimate}`); | 1104 parts[dartx.add](`${penultimate}`); |
| 1052 return; | 1105 return; |
| 1053 } | 1106 } |
| 1054 ultimateString = `${penultimate}`; | 1107 ultimateString = `${penultimate}`; |
| 1055 penultimateString = dart.as(parts[core.$removeLast](), core.String); | 1108 penultimateString = dart.as(parts[dartx.removeLast](), core.String); |
| 1056 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(OVERHEAD)); | 1109 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(OVERHEAD)); |
| 1057 } else { | 1110 } else { |
| 1058 ultimate = it.current; | 1111 ultimate = it.current; |
| 1059 count = dart.notNull(count) + 1; | 1112 count = dart.notNull(count) + 1; |
| 1060 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); | 1113 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); |
| 1061 while (it.moveNext()) { | 1114 while (it.moveNext()) { |
| 1062 penultimate = ultimate; | 1115 penultimate = ultimate; |
| 1063 ultimate = it.current; | 1116 ultimate = it.current; |
| 1064 count = dart.notNull(count) + 1; | 1117 count = dart.notNull(count) + 1; |
| 1065 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { | 1118 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { |
| 1066 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart.
notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no
tNull(HEAD_COUNT)) { | 1119 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart.
notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no
tNull(HEAD_COUNT)) { |
| 1067 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsen
d(dart.dload(parts[core.$removeLast](), 'length'), '+', OVERHEAD), core.int)); | 1120 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsen
d(dart.dload(parts[dartx.removeLast](), 'length'), '+', OVERHEAD), core.int)); |
| 1068 count = dart.notNull(count) - 1; | 1121 count = dart.notNull(count) - 1; |
| 1069 } | 1122 } |
| 1070 parts[core.$add]("..."); | 1123 parts[dartx.add]("..."); |
| 1071 return; | 1124 return; |
| 1072 } | 1125 } |
| 1073 } | 1126 } |
| 1074 penultimateString = `${penultimate}`; | 1127 penultimateString = `${penultimate}`; |
| 1075 ultimateString = `${ultimate}`; | 1128 ultimateString = `${ultimate}`; |
| 1076 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(penultimateString.length) + 2 * dart.notNull(OVERHEAD)); | 1129 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(penultimateString.length) + 2 * dart.notNull(OVERHEAD)); |
| 1077 } | 1130 } |
| 1078 } | 1131 } |
| 1079 let elision = null; | 1132 let elision = null; |
| 1080 if (dart.notNull(count) > dart.notNull(parts[core.$length]) + dart.notNu
ll(TAIL_COUNT)) { | 1133 if (dart.notNull(count) > dart.notNull(parts.length) + dart.notNull(TAIL
_COUNT)) { |
| 1081 elision = "..."; | 1134 elision = "..."; |
| 1082 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.no
tNull(OVERHEAD)); | 1135 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.no
tNull(OVERHEAD)); |
| 1083 } | 1136 } |
| 1084 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull
(parts[core.$length]) > dart.notNull(HEAD_COUNT)) { | 1137 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull
(parts.length) > dart.notNull(HEAD_COUNT)) { |
| 1085 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsend(dart.d
load(parts[core.$removeLast](), 'length'), '+', OVERHEAD), core.int)); | 1138 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsend(dart.d
load(parts[dartx.removeLast](), 'length'), '+', OVERHEAD), core.int)); |
| 1086 if (elision == null) { | 1139 if (elision == null) { |
| 1087 elision = "..."; | 1140 elision = "..."; |
| 1088 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.
notNull(OVERHEAD)); | 1141 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.
notNull(OVERHEAD)); |
| 1089 } | 1142 } |
| 1090 } | 1143 } |
| 1091 if (elision != null) { | 1144 if (elision != null) { |
| 1092 parts[core.$add](elision); | 1145 parts[dartx.add](elision); |
| 1093 } | 1146 } |
| 1094 parts[core.$add](penultimateString); | 1147 parts[dartx.add](penultimateString); |
| 1095 parts[core.$add](ultimateString); | 1148 parts[dartx.add](ultimateString); |
| 1096 } | 1149 } |
| 1097 [Symbol.iterator]() { | 1150 [Symbol.iterator]() { |
| 1098 return new dart.JsIterator(this[core.$iterator]); | 1151 return new dart.JsIterator(this.iterator); |
| 1099 } | 1152 } |
| 1100 } | 1153 } |
| 1101 IterableBase[dart.implements] = () => [core.Iterable$(E)]; | 1154 IterableBase[dart.implements] = () => [core.Iterable$(E)]; |
| 1155 dart.defineExtensionMembers(IterableBase, [ |
| 1156 'map', |
| 1157 'where', |
| 1158 'expand', |
| 1159 'contains', |
| 1160 'forEach', |
| 1161 'reduce', |
| 1162 'fold', |
| 1163 'every', |
| 1164 'join', |
| 1165 'any', |
| 1166 'toList', |
| 1167 'toSet', |
| 1168 'take', |
| 1169 'takeWhile', |
| 1170 'skip', |
| 1171 'skipWhile', |
| 1172 'firstWhere', |
| 1173 'lastWhere', |
| 1174 'singleWhere', |
| 1175 'elementAt', |
| 1176 'length', |
| 1177 'isEmpty', |
| 1178 'isNotEmpty', |
| 1179 'first', |
| 1180 'last', |
| 1181 'single' |
| 1182 ]); |
| 1102 dart.setSignature(IterableBase, { | 1183 dart.setSignature(IterableBase, { |
| 1103 constructors: () => ({IterableBase: [IterableBase$(E), []]}), | 1184 constructors: () => ({IterableBase: [IterableBase$(E), []]}), |
| 1104 methods: () => ({ | 1185 methods: () => ({ |
| 1105 [core.$map]: [core.Iterable, [dart.functionType(core.Object, [E])]], | 1186 map: [core.Iterable, [dart.functionType(core.Object, [E])]], |
| 1106 [core.$where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 1187 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 1107 [core.$expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, | 1188 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], |
| 1108 [core.$contains]: [core.bool, [core.Object]], | 1189 contains: [core.bool, [core.Object]], |
| 1109 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 1190 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 1110 [core.$reduce]: [E, [dart.functionType(E, [E, E])]], | 1191 reduce: [E, [dart.functionType(E, [E, E])]], |
| 1111 [core.$fold]: [core.Object, [core.Object, dart.functionType(core.Object,
[dart.bottom, E])]], | 1192 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], |
| 1112 [core.$every]: [core.bool, [dart.functionType(core.bool, [E])]], | 1193 every: [core.bool, [dart.functionType(core.bool, [E])]], |
| 1113 [core.$join]: [core.String, [], [core.String]], | 1194 join: [core.String, [], [core.String]], |
| 1114 [core.$any]: [core.bool, [dart.functionType(core.bool, [E])]], | 1195 any: [core.bool, [dart.functionType(core.bool, [E])]], |
| 1115 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 1196 toList: [core.List$(E), [], {growable: core.bool}], |
| 1116 [core.$toSet]: [core.Set$(E), []], | 1197 toSet: [core.Set$(E), []], |
| 1117 [core.$take]: [core.Iterable$(E), [core.int]], | 1198 take: [core.Iterable$(E), [core.int]], |
| 1118 [core.$takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 1199 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 1119 [core.$skip]: [core.Iterable$(E), [core.int]], | 1200 skip: [core.Iterable$(E), [core.int]], |
| 1120 [core.$skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 1201 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 1121 [core.$firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], | 1202 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
| 1122 [core.$lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], | 1203 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
| 1123 [core.$singleWhere]: [E, [dart.functionType(core.bool, [E])]], | 1204 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
| 1124 [core.$elementAt]: [E, [core.int]] | 1205 elementAt: [E, [core.int]] |
| 1125 }), | 1206 }), |
| 1126 statics: () => ({ | 1207 statics: () => ({ |
| 1127 iterableToShortString: [core.String, [core.Iterable], [core.String, core
.String]], | 1208 iterableToShortString: [core.String, [core.Iterable], [core.String, core
.String]], |
| 1128 iterableToFullString: [core.String, [core.Iterable], [core.String, core.
String]], | 1209 iterableToFullString: [core.String, [core.Iterable], [core.String, core.
String]], |
| 1129 _isToStringVisiting: [core.bool, [core.Object]], | 1210 _isToStringVisiting: [core.bool, [core.Object]], |
| 1130 _iterablePartsToStrings: [dart.void, [core.Iterable, core.List]] | 1211 _iterablePartsToStrings: [dart.void, [core.Iterable, core.List]] |
| 1131 }), | 1212 }), |
| 1132 names: ['iterableToShortString', 'iterableToFullString', '_isToStringVisit
ing', '_iterablePartsToStrings'] | 1213 names: ['iterableToShortString', 'iterableToFullString', '_isToStringVisit
ing', '_iterablePartsToStrings'] |
| 1133 }); | 1214 }); |
| 1134 return IterableBase; | 1215 return IterableBase; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 return new (_LinkedIdentityHashSet$(E))(); | 1371 return new (_LinkedIdentityHashSet$(E))(); |
| 1291 } | 1372 } |
| 1292 static from(elements) { | 1373 static from(elements) { |
| 1293 let result = LinkedHashSet$(E).new(); | 1374 let result = LinkedHashSet$(E).new(); |
| 1294 for (let element of elements) { | 1375 for (let element of elements) { |
| 1295 result.add(element); | 1376 result.add(element); |
| 1296 } | 1377 } |
| 1297 return result; | 1378 return result; |
| 1298 } | 1379 } |
| 1299 [Symbol.iterator]() { | 1380 [Symbol.iterator]() { |
| 1300 return new dart.JsIterator(this[core.$iterator]); | 1381 return new dart.JsIterator(this.iterator); |
| 1301 } | 1382 } |
| 1302 } | 1383 } |
| 1303 LinkedHashSet[dart.implements] = () => [HashSet$(E)]; | 1384 LinkedHashSet[dart.implements] = () => [HashSet$(E)]; |
| 1304 dart.setSignature(LinkedHashSet, { | 1385 dart.setSignature(LinkedHashSet, { |
| 1305 constructors: () => ({ | 1386 constructors: () => ({ |
| 1306 new: [LinkedHashSet$(E), [], {equals: dart.functionType(core.bool, [E, E
]), hashCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(co
re.bool, [core.Object])}], | 1387 new: [LinkedHashSet$(E), [], {equals: dart.functionType(core.bool, [E, E
]), hashCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(co
re.bool, [core.Object])}], |
| 1307 identity: [LinkedHashSet$(E), []], | 1388 identity: [LinkedHashSet$(E), []], |
| 1308 from: [LinkedHashSet$(E), [core.Iterable$(E)]] | 1389 from: [LinkedHashSet$(E), [core.Iterable$(E)]] |
| 1309 }) | 1390 }) |
| 1310 }); | 1391 }); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1331 addFirst(entry) { | 1412 addFirst(entry) { |
| 1332 dart.as(entry, E); | 1413 dart.as(entry, E); |
| 1333 this[_insertAfter](this, entry); | 1414 this[_insertAfter](this, entry); |
| 1334 } | 1415 } |
| 1335 add(entry) { | 1416 add(entry) { |
| 1336 dart.as(entry, E); | 1417 dart.as(entry, E); |
| 1337 this[_insertAfter](this[_previous], entry); | 1418 this[_insertAfter](this[_previous], entry); |
| 1338 } | 1419 } |
| 1339 addAll(entries) { | 1420 addAll(entries) { |
| 1340 dart.as(entries, core.Iterable$(E)); | 1421 dart.as(entries, core.Iterable$(E)); |
| 1341 entries[core.$forEach](dart.fn(entry => this[_insertAfter](this[_previou
s], dart.as(entry, E)), dart.void, [core.Object])); | 1422 entries[dartx.forEach](dart.fn(entry => this[_insertAfter](this[_previou
s], dart.as(entry, E)), dart.void, [core.Object])); |
| 1342 } | 1423 } |
| 1343 remove(entry) { | 1424 remove(entry) { |
| 1344 dart.as(entry, E); | 1425 dart.as(entry, E); |
| 1345 if (!dart.equals(entry[_list], this)) | 1426 if (!dart.equals(entry[_list], this)) |
| 1346 return false; | 1427 return false; |
| 1347 this[_unlink](entry); | 1428 this[_unlink](entry); |
| 1348 return true; | 1429 return true; |
| 1349 } | 1430 } |
| 1350 get [core.$iterator]() { | 1431 get iterator() { |
| 1351 return new (_LinkedListIterator$(E))(this); | 1432 return new (_LinkedListIterator$(E))(this); |
| 1352 } | 1433 } |
| 1353 get [core.$length]() { | 1434 get length() { |
| 1354 return this[_length]; | 1435 return this[_length]; |
| 1355 } | 1436 } |
| 1356 clear() { | 1437 clear() { |
| 1357 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 1438 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 1358 let next = this[_next]; | 1439 let next = this[_next]; |
| 1359 while (!dart.notNull(core.identical(next, this))) { | 1440 while (!dart.notNull(core.identical(next, this))) { |
| 1360 let entry = dart.as(next, E); | 1441 let entry = dart.as(next, E); |
| 1361 next = entry[_next]; | 1442 next = entry[_next]; |
| 1362 entry[_next] = entry[_previous] = entry[_list] = null; | 1443 entry[_next] = entry[_previous] = entry[_list] = null; |
| 1363 } | 1444 } |
| 1364 this[_next] = this[_previous] = this; | 1445 this[_next] = this[_previous] = this; |
| 1365 this[_length] = 0; | 1446 this[_length] = 0; |
| 1366 } | 1447 } |
| 1367 get [core.$first]() { | 1448 get first() { |
| 1368 if (core.identical(this[_next], this)) { | 1449 if (core.identical(this[_next], this)) { |
| 1369 throw new core.StateError('No such element'); | 1450 throw new core.StateError('No such element'); |
| 1370 } | 1451 } |
| 1371 return dart.as(this[_next], E); | 1452 return dart.as(this[_next], E); |
| 1372 } | 1453 } |
| 1373 get [core.$last]() { | 1454 get last() { |
| 1374 if (core.identical(this[_previous], this)) { | 1455 if (core.identical(this[_previous], this)) { |
| 1375 throw new core.StateError('No such element'); | 1456 throw new core.StateError('No such element'); |
| 1376 } | 1457 } |
| 1377 return dart.as(this[_previous], E); | 1458 return dart.as(this[_previous], E); |
| 1378 } | 1459 } |
| 1379 get [core.$single]() { | 1460 get single() { |
| 1380 if (core.identical(this[_previous], this)) { | 1461 if (core.identical(this[_previous], this)) { |
| 1381 throw new core.StateError('No such element'); | 1462 throw new core.StateError('No such element'); |
| 1382 } | 1463 } |
| 1383 if (!dart.notNull(core.identical(this[_previous], this[_next]))) { | 1464 if (!dart.notNull(core.identical(this[_previous], this[_next]))) { |
| 1384 throw new core.StateError('Too many elements'); | 1465 throw new core.StateError('Too many elements'); |
| 1385 } | 1466 } |
| 1386 return dart.as(this[_next], E); | 1467 return dart.as(this[_next], E); |
| 1387 } | 1468 } |
| 1388 [core.$forEach](action) { | 1469 forEach(action) { |
| 1389 dart.as(action, dart.functionType(dart.void, [E])); | 1470 dart.as(action, dart.functionType(dart.void, [E])); |
| 1390 let modificationCount = this[_modificationCount]; | 1471 let modificationCount = this[_modificationCount]; |
| 1391 let current = this[_next]; | 1472 let current = this[_next]; |
| 1392 while (!dart.notNull(core.identical(current, this))) { | 1473 while (!dart.notNull(core.identical(current, this))) { |
| 1393 action(dart.as(current, E)); | 1474 action(dart.as(current, E)); |
| 1394 if (modificationCount != this[_modificationCount]) { | 1475 if (modificationCount != this[_modificationCount]) { |
| 1395 throw new core.ConcurrentModificationError(this); | 1476 throw new core.ConcurrentModificationError(this); |
| 1396 } | 1477 } |
| 1397 current = current[_next]; | 1478 current = current[_next]; |
| 1398 } | 1479 } |
| 1399 } | 1480 } |
| 1400 get [core.$isEmpty]() { | 1481 get isEmpty() { |
| 1401 return this[_length] == 0; | 1482 return this[_length] == 0; |
| 1402 } | 1483 } |
| 1403 [_insertAfter](entry, newEntry) { | 1484 [_insertAfter](entry, newEntry) { |
| 1404 dart.as(newEntry, E); | 1485 dart.as(newEntry, E); |
| 1405 if (newEntry.list != null) { | 1486 if (newEntry.list != null) { |
| 1406 throw new core.StateError('LinkedListEntry is already in a LinkedList'
); | 1487 throw new core.StateError('LinkedListEntry is already in a LinkedList'
); |
| 1407 } | 1488 } |
| 1408 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 1489 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 1409 newEntry[_list] = this; | 1490 newEntry[_list] = this; |
| 1410 let predecessor = entry; | 1491 let predecessor = entry; |
| 1411 let successor = entry[_next]; | 1492 let successor = entry[_next]; |
| 1412 successor[_previous] = newEntry; | 1493 successor[_previous] = newEntry; |
| 1413 newEntry[_previous] = predecessor; | 1494 newEntry[_previous] = predecessor; |
| 1414 newEntry[_next] = successor; | 1495 newEntry[_next] = successor; |
| 1415 predecessor[_next] = newEntry; | 1496 predecessor[_next] = newEntry; |
| 1416 this[_length] = dart.notNull(this[_length]) + 1; | 1497 this[_length] = dart.notNull(this[_length]) + 1; |
| 1417 } | 1498 } |
| 1418 [_unlink](entry) { | 1499 [_unlink](entry) { |
| 1419 dart.as(entry, LinkedListEntry$(E)); | 1500 dart.as(entry, LinkedListEntry$(E)); |
| 1420 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 1501 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 1421 entry[_next][_previous] = entry[_previous]; | 1502 entry[_next][_previous] = entry[_previous]; |
| 1422 entry[_previous][_next] = entry[_next]; | 1503 entry[_previous][_next] = entry[_next]; |
| 1423 this[_length] = dart.notNull(this[_length]) - 1; | 1504 this[_length] = dart.notNull(this[_length]) - 1; |
| 1424 entry[_list] = entry[_next] = entry[_previous] = null; | 1505 entry[_list] = entry[_next] = entry[_previous] = null; |
| 1425 } | 1506 } |
| 1426 } | 1507 } |
| 1427 LinkedList[dart.implements] = () => [_LinkedListLink]; | 1508 LinkedList[dart.implements] = () => [_LinkedListLink]; |
| 1509 dart.defineExtensionMembers(LinkedList, [ |
| 1510 'forEach', |
| 1511 'iterator', |
| 1512 'length', |
| 1513 'first', |
| 1514 'last', |
| 1515 'single', |
| 1516 'isEmpty' |
| 1517 ]); |
| 1428 dart.setSignature(LinkedList, { | 1518 dart.setSignature(LinkedList, { |
| 1429 constructors: () => ({LinkedList: [LinkedList$(E), []]}), | 1519 constructors: () => ({LinkedList: [LinkedList$(E), []]}), |
| 1430 methods: () => ({ | 1520 methods: () => ({ |
| 1431 addFirst: [dart.void, [E]], | 1521 addFirst: [dart.void, [E]], |
| 1432 add: [dart.void, [E]], | 1522 add: [dart.void, [E]], |
| 1433 addAll: [dart.void, [core.Iterable$(E)]], | 1523 addAll: [dart.void, [core.Iterable$(E)]], |
| 1434 remove: [core.bool, [E]], | 1524 remove: [core.bool, [E]], |
| 1435 clear: [dart.void, []], | 1525 clear: [dart.void, []], |
| 1436 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 1526 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 1437 [_insertAfter]: [dart.void, [_LinkedListLink, E]], | 1527 [_insertAfter]: [dart.void, [_LinkedListLink, E]], |
| 1438 [_unlink]: [dart.void, [LinkedListEntry$(E)]] | 1528 [_unlink]: [dart.void, [LinkedListEntry$(E)]] |
| 1439 }) | 1529 }) |
| 1440 }); | 1530 }); |
| 1441 return LinkedList; | 1531 return LinkedList; |
| 1442 }); | 1532 }); |
| 1443 let LinkedList = LinkedList$(); | 1533 let LinkedList = LinkedList$(); |
| 1444 let _current = Symbol('_current'); | 1534 let _current = Symbol('_current'); |
| 1445 let _LinkedListIterator$ = dart.generic(function(E) { | 1535 let _LinkedListIterator$ = dart.generic(function(E) { |
| 1446 class _LinkedListIterator extends core.Object { | 1536 class _LinkedListIterator extends core.Object { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1519 unlink: [dart.void, []], | 1609 unlink: [dart.void, []], |
| 1520 insertAfter: [dart.void, [E]], | 1610 insertAfter: [dart.void, [E]], |
| 1521 insertBefore: [dart.void, [E]] | 1611 insertBefore: [dart.void, [E]] |
| 1522 }) | 1612 }) |
| 1523 }); | 1613 }); |
| 1524 return LinkedListEntry; | 1614 return LinkedListEntry; |
| 1525 }); | 1615 }); |
| 1526 let LinkedListEntry = LinkedListEntry$(); | 1616 let LinkedListEntry = LinkedListEntry$(); |
| 1527 let ListMixin$ = dart.generic(function(E) { | 1617 let ListMixin$ = dart.generic(function(E) { |
| 1528 class ListMixin extends core.Object { | 1618 class ListMixin extends core.Object { |
| 1529 get [core.$iterator]() { | 1619 get iterator() { |
| 1530 return new (_internal.ListIterator$(E))(this); | 1620 return new (_internal.ListIterator$(E))(this); |
| 1531 } | 1621 } |
| 1532 [Symbol.iterator]() { | 1622 [Symbol.iterator]() { |
| 1533 return new dart.JsIterator(this[core.$iterator]); | 1623 return new dart.JsIterator(this.iterator); |
| 1534 } | 1624 } |
| 1535 [core.$elementAt](index) { | 1625 elementAt(index) { |
| 1536 return this[core.$get](index); | 1626 return this.get(index); |
| 1537 } | 1627 } |
| 1538 [core.$forEach](action) { | 1628 forEach(action) { |
| 1539 dart.as(action, dart.functionType(dart.void, [E])); | 1629 dart.as(action, dart.functionType(dart.void, [E])); |
| 1540 let length = this[core.$length]; | 1630 let length = this.length; |
| 1541 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1631 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1542 action(this[core.$get](i)); | 1632 action(this.get(i)); |
| 1543 if (length != this[core.$length]) { | 1633 if (length != this.length) { |
| 1544 throw new core.ConcurrentModificationError(this); | 1634 throw new core.ConcurrentModificationError(this); |
| 1545 } | 1635 } |
| 1546 } | 1636 } |
| 1547 } | 1637 } |
| 1548 get [core.$isEmpty]() { | 1638 get isEmpty() { |
| 1549 return this[core.$length] == 0; | 1639 return this.length == 0; |
| 1550 } | 1640 } |
| 1551 get [core.$isNotEmpty]() { | 1641 get isNotEmpty() { |
| 1552 return !dart.notNull(this[core.$isEmpty]); | 1642 return !dart.notNull(this.isEmpty); |
| 1553 } | 1643 } |
| 1554 get [core.$first]() { | 1644 get first() { |
| 1555 if (this[core.$length] == 0) | 1645 if (this.length == 0) |
| 1556 throw _internal.IterableElementError.noElement(); | 1646 throw _internal.IterableElementError.noElement(); |
| 1557 return this[core.$get](0); | 1647 return this.get(0); |
| 1558 } | 1648 } |
| 1559 get [core.$last]() { | 1649 get last() { |
| 1560 if (this[core.$length] == 0) | 1650 if (this.length == 0) |
| 1561 throw _internal.IterableElementError.noElement(); | 1651 throw _internal.IterableElementError.noElement(); |
| 1562 return this[core.$get](dart.notNull(this[core.$length]) - 1); | 1652 return this.get(dart.notNull(this.length) - 1); |
| 1563 } | 1653 } |
| 1564 get [core.$single]() { | 1654 get single() { |
| 1565 if (this[core.$length] == 0) | 1655 if (this.length == 0) |
| 1566 throw _internal.IterableElementError.noElement(); | 1656 throw _internal.IterableElementError.noElement(); |
| 1567 if (dart.notNull(this[core.$length]) > 1) | 1657 if (dart.notNull(this.length) > 1) |
| 1568 throw _internal.IterableElementError.tooMany(); | 1658 throw _internal.IterableElementError.tooMany(); |
| 1569 return this[core.$get](0); | 1659 return this.get(0); |
| 1570 } | 1660 } |
| 1571 [core.$contains](element) { | 1661 contains(element) { |
| 1572 let length = this[core.$length]; | 1662 let length = this.length; |
| 1573 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1663 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
| 1574 if (dart.equals(this[core.$get](i), element)) | 1664 if (dart.equals(this.get(i), element)) |
| 1575 return true; | 1665 return true; |
| 1576 if (length != this[core.$length]) { | 1666 if (length != this.length) { |
| 1577 throw new core.ConcurrentModificationError(this); | 1667 throw new core.ConcurrentModificationError(this); |
| 1578 } | 1668 } |
| 1579 } | 1669 } |
| 1580 return false; | 1670 return false; |
| 1581 } | 1671 } |
| 1582 [core.$every](test) { | 1672 every(test) { |
| 1583 dart.as(test, dart.functionType(core.bool, [E])); | 1673 dart.as(test, dart.functionType(core.bool, [E])); |
| 1584 let length = this[core.$length]; | 1674 let length = this.length; |
| 1585 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1675 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1586 if (!dart.notNull(test(this[core.$get](i)))) | 1676 if (!dart.notNull(test(this.get(i)))) |
| 1587 return false; | 1677 return false; |
| 1588 if (length != this[core.$length]) { | 1678 if (length != this.length) { |
| 1589 throw new core.ConcurrentModificationError(this); | 1679 throw new core.ConcurrentModificationError(this); |
| 1590 } | 1680 } |
| 1591 } | 1681 } |
| 1592 return true; | 1682 return true; |
| 1593 } | 1683 } |
| 1594 [core.$any](test) { | 1684 any(test) { |
| 1595 dart.as(test, dart.functionType(core.bool, [E])); | 1685 dart.as(test, dart.functionType(core.bool, [E])); |
| 1596 let length = this[core.$length]; | 1686 let length = this.length; |
| 1597 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1687 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1598 if (test(this[core.$get](i))) | 1688 if (test(this.get(i))) |
| 1599 return true; | 1689 return true; |
| 1600 if (length != this[core.$length]) { | 1690 if (length != this.length) { |
| 1601 throw new core.ConcurrentModificationError(this); | 1691 throw new core.ConcurrentModificationError(this); |
| 1602 } | 1692 } |
| 1603 } | 1693 } |
| 1604 return false; | 1694 return false; |
| 1605 } | 1695 } |
| 1606 [core.$firstWhere](test, opts) { | 1696 firstWhere(test, opts) { |
| 1607 dart.as(test, dart.functionType(core.bool, [E])); | 1697 dart.as(test, dart.functionType(core.bool, [E])); |
| 1608 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 1698 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
| 1609 dart.as(orElse, dart.functionType(E, [])); | 1699 dart.as(orElse, dart.functionType(E, [])); |
| 1610 let length = this[core.$length]; | 1700 let length = this.length; |
| 1611 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1701 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1612 let element = this[core.$get](i); | 1702 let element = this.get(i); |
| 1613 if (test(element)) | 1703 if (test(element)) |
| 1614 return element; | 1704 return element; |
| 1615 if (length != this[core.$length]) { | 1705 if (length != this.length) { |
| 1616 throw new core.ConcurrentModificationError(this); | 1706 throw new core.ConcurrentModificationError(this); |
| 1617 } | 1707 } |
| 1618 } | 1708 } |
| 1619 if (orElse != null) | 1709 if (orElse != null) |
| 1620 return orElse(); | 1710 return orElse(); |
| 1621 throw _internal.IterableElementError.noElement(); | 1711 throw _internal.IterableElementError.noElement(); |
| 1622 } | 1712 } |
| 1623 [core.$lastWhere](test, opts) { | 1713 lastWhere(test, opts) { |
| 1624 dart.as(test, dart.functionType(core.bool, [E])); | 1714 dart.as(test, dart.functionType(core.bool, [E])); |
| 1625 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 1715 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
| 1626 dart.as(orElse, dart.functionType(E, [])); | 1716 dart.as(orElse, dart.functionType(E, [])); |
| 1627 let length = this[core.$length]; | 1717 let length = this.length; |
| 1628 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no
tNull(i) - 1) { | 1718 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no
tNull(i) - 1) { |
| 1629 let element = this[core.$get](i); | 1719 let element = this.get(i); |
| 1630 if (test(element)) | 1720 if (test(element)) |
| 1631 return element; | 1721 return element; |
| 1632 if (length != this[core.$length]) { | 1722 if (length != this.length) { |
| 1633 throw new core.ConcurrentModificationError(this); | 1723 throw new core.ConcurrentModificationError(this); |
| 1634 } | 1724 } |
| 1635 } | 1725 } |
| 1636 if (orElse != null) | 1726 if (orElse != null) |
| 1637 return orElse(); | 1727 return orElse(); |
| 1638 throw _internal.IterableElementError.noElement(); | 1728 throw _internal.IterableElementError.noElement(); |
| 1639 } | 1729 } |
| 1640 [core.$singleWhere](test) { | 1730 singleWhere(test) { |
| 1641 dart.as(test, dart.functionType(core.bool, [E])); | 1731 dart.as(test, dart.functionType(core.bool, [E])); |
| 1642 let length = this[core.$length]; | 1732 let length = this.length; |
| 1643 let match = null; | 1733 let match = null; |
| 1644 let matchFound = false; | 1734 let matchFound = false; |
| 1645 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1735 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1646 let element = this[core.$get](i); | 1736 let element = this.get(i); |
| 1647 if (test(element)) { | 1737 if (test(element)) { |
| 1648 if (matchFound) { | 1738 if (matchFound) { |
| 1649 throw _internal.IterableElementError.tooMany(); | 1739 throw _internal.IterableElementError.tooMany(); |
| 1650 } | 1740 } |
| 1651 matchFound = true; | 1741 matchFound = true; |
| 1652 match = element; | 1742 match = element; |
| 1653 } | 1743 } |
| 1654 if (length != this[core.$length]) { | 1744 if (length != this.length) { |
| 1655 throw new core.ConcurrentModificationError(this); | 1745 throw new core.ConcurrentModificationError(this); |
| 1656 } | 1746 } |
| 1657 } | 1747 } |
| 1658 if (matchFound) | 1748 if (matchFound) |
| 1659 return match; | 1749 return match; |
| 1660 throw _internal.IterableElementError.noElement(); | 1750 throw _internal.IterableElementError.noElement(); |
| 1661 } | 1751 } |
| 1662 [core.$join](separator) { | 1752 join(separator) { |
| 1663 if (separator === void 0) | 1753 if (separator === void 0) |
| 1664 separator = ""; | 1754 separator = ""; |
| 1665 if (this[core.$length] == 0) | 1755 if (this.length == 0) |
| 1666 return ""; | 1756 return ""; |
| 1667 let buffer = new core.StringBuffer(); | 1757 let buffer = new core.StringBuffer(); |
| 1668 buffer.writeAll(this, separator); | 1758 buffer.writeAll(this, separator); |
| 1669 return dart.toString(buffer); | 1759 return dart.toString(buffer); |
| 1670 } | 1760 } |
| 1671 [core.$where](test) { | 1761 where(test) { |
| 1672 dart.as(test, dart.functionType(core.bool, [E])); | 1762 dart.as(test, dart.functionType(core.bool, [E])); |
| 1673 return new (_internal.WhereIterable$(E))(this, test); | 1763 return new (_internal.WhereIterable$(E))(this, test); |
| 1674 } | 1764 } |
| 1675 [core.$map](f) { | 1765 map(f) { |
| 1676 dart.as(f, dart.functionType(core.Object, [E])); | 1766 dart.as(f, dart.functionType(core.Object, [E])); |
| 1677 return new _internal.MappedListIterable(this, f); | 1767 return new _internal.MappedListIterable(this, f); |
| 1678 } | 1768 } |
| 1679 [core.$expand](f) { | 1769 expand(f) { |
| 1680 dart.as(f, dart.functionType(core.Iterable, [E])); | 1770 dart.as(f, dart.functionType(core.Iterable, [E])); |
| 1681 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 1771 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
| 1682 } | 1772 } |
| 1683 [core.$reduce](combine) { | 1773 reduce(combine) { |
| 1684 dart.as(combine, dart.functionType(E, [E, E])); | 1774 dart.as(combine, dart.functionType(E, [E, E])); |
| 1685 let length = this[core.$length]; | 1775 let length = this.length; |
| 1686 if (length == 0) | 1776 if (length == 0) |
| 1687 throw _internal.IterableElementError.noElement(); | 1777 throw _internal.IterableElementError.noElement(); |
| 1688 let value = this[core.$get](0); | 1778 let value = this.get(0); |
| 1689 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1779 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1690 value = combine(value, this[core.$get](i)); | 1780 value = combine(value, this.get(i)); |
| 1691 if (length != this[core.$length]) { | 1781 if (length != this.length) { |
| 1692 throw new core.ConcurrentModificationError(this); | 1782 throw new core.ConcurrentModificationError(this); |
| 1693 } | 1783 } |
| 1694 } | 1784 } |
| 1695 return value; | 1785 return value; |
| 1696 } | 1786 } |
| 1697 [core.$fold](initialValue, combine) { | 1787 fold(initialValue, combine) { |
| 1698 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 1788 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); |
| 1699 let value = initialValue; | 1789 let value = initialValue; |
| 1700 let length = this[core.$length]; | 1790 let length = this.length; |
| 1701 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1791 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1702 value = dart.dcall(combine, value, this[core.$get](i)); | 1792 value = dart.dcall(combine, value, this.get(i)); |
| 1703 if (length != this[core.$length]) { | 1793 if (length != this.length) { |
| 1704 throw new core.ConcurrentModificationError(this); | 1794 throw new core.ConcurrentModificationError(this); |
| 1705 } | 1795 } |
| 1706 } | 1796 } |
| 1707 return value; | 1797 return value; |
| 1708 } | 1798 } |
| 1709 [core.$skip](count) { | 1799 skip(count) { |
| 1710 return new (_internal.SubListIterable$(E))(this, count, null); | 1800 return new (_internal.SubListIterable$(E))(this, count, null); |
| 1711 } | 1801 } |
| 1712 [core.$skipWhile](test) { | 1802 skipWhile(test) { |
| 1713 dart.as(test, dart.functionType(core.bool, [E])); | 1803 dart.as(test, dart.functionType(core.bool, [E])); |
| 1714 return new (_internal.SkipWhileIterable$(E))(this, test); | 1804 return new (_internal.SkipWhileIterable$(E))(this, test); |
| 1715 } | 1805 } |
| 1716 [core.$take](count) { | 1806 take(count) { |
| 1717 return new (_internal.SubListIterable$(E))(this, 0, count); | 1807 return new (_internal.SubListIterable$(E))(this, 0, count); |
| 1718 } | 1808 } |
| 1719 [core.$takeWhile](test) { | 1809 takeWhile(test) { |
| 1720 dart.as(test, dart.functionType(core.bool, [E])); | 1810 dart.as(test, dart.functionType(core.bool, [E])); |
| 1721 return new (_internal.TakeWhileIterable$(E))(this, test); | 1811 return new (_internal.TakeWhileIterable$(E))(this, test); |
| 1722 } | 1812 } |
| 1723 [core.$toList](opts) { | 1813 toList(opts) { |
| 1724 let growable = opts && 'growable' in opts ? opts.growable : true; | 1814 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 1725 let result = null; | 1815 let result = null; |
| 1726 if (growable) { | 1816 if (growable) { |
| 1727 result = core.List$(E).new(); | 1817 result = core.List$(E).new(); |
| 1728 result[core.$length] = this[core.$length]; | 1818 result.length = this.length; |
| 1729 } else { | 1819 } else { |
| 1730 result = core.List$(E).new(this[core.$length]); | 1820 result = core.List$(E).new(this.length); |
| 1731 } | 1821 } |
| 1732 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1822 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
| 1733 result[core.$set](i, this[core.$get](i)); | 1823 result[dartx.set](i, this.get(i)); |
| 1734 } | 1824 } |
| 1735 return result; | 1825 return result; |
| 1736 } | 1826 } |
| 1737 [core.$toSet]() { | 1827 toSet() { |
| 1738 let result = core.Set$(E).new(); | 1828 let result = core.Set$(E).new(); |
| 1739 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1829 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
| 1740 result.add(this[core.$get](i)); | 1830 result.add(this.get(i)); |
| 1741 } | 1831 } |
| 1742 return result; | 1832 return result; |
| 1743 } | 1833 } |
| 1744 [core.$add](element) { | 1834 add(element) { |
| 1745 dart.as(element, E); | 1835 dart.as(element, E); |
| 1746 this[core.$set]((() => { | 1836 this.set((() => { |
| 1747 let x = this[core.$length]; | 1837 let x = this.length; |
| 1748 this[core.$length] = dart.notNull(x) + 1; | 1838 this.length = dart.notNull(x) + 1; |
| 1749 return x; | 1839 return x; |
| 1750 })(), element); | 1840 })(), element); |
| 1751 } | 1841 } |
| 1752 [core.$addAll](iterable) { | 1842 addAll(iterable) { |
| 1753 dart.as(iterable, core.Iterable$(E)); | 1843 dart.as(iterable, core.Iterable$(E)); |
| 1754 for (let element of iterable) { | 1844 for (let element of iterable) { |
| 1755 this[core.$set]((() => { | 1845 this.set((() => { |
| 1756 let x = this[core.$length]; | 1846 let x = this.length; |
| 1757 this[core.$length] = dart.notNull(x) + 1; | 1847 this.length = dart.notNull(x) + 1; |
| 1758 return x; | 1848 return x; |
| 1759 })(), element); | 1849 })(), element); |
| 1760 } | 1850 } |
| 1761 } | 1851 } |
| 1762 [core.$remove](element) { | 1852 remove(element) { |
| 1763 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1853 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
| 1764 if (dart.equals(this[core.$get](i), element)) { | 1854 if (dart.equals(this.get(i), element)) { |
| 1765 this[core.$setRange](i, dart.notNull(this[core.$length]) - 1, this,
dart.notNull(i) + 1); | 1855 this.setRange(i, dart.notNull(this.length) - 1, this, dart.notNull(i
) + 1); |
| 1766 this[core.$length] = dart.notNull(this[core.$length]) - 1; | 1856 this.length = dart.notNull(this.length) - 1; |
| 1767 return true; | 1857 return true; |
| 1768 } | 1858 } |
| 1769 } | 1859 } |
| 1770 return false; | 1860 return false; |
| 1771 } | 1861 } |
| 1772 [core.$removeWhere](test) { | 1862 removeWhere(test) { |
| 1773 dart.as(test, dart.functionType(core.bool, [E])); | 1863 dart.as(test, dart.functionType(core.bool, [E])); |
| 1774 ListMixin$()._filter(this, test, false); | 1864 ListMixin$()._filter(this, test, false); |
| 1775 } | 1865 } |
| 1776 [core.$retainWhere](test) { | 1866 retainWhere(test) { |
| 1777 dart.as(test, dart.functionType(core.bool, [E])); | 1867 dart.as(test, dart.functionType(core.bool, [E])); |
| 1778 ListMixin$()._filter(this, test, true); | 1868 ListMixin$()._filter(this, test, true); |
| 1779 } | 1869 } |
| 1780 static _filter(source, test, retainMatching) { | 1870 static _filter(source, test, retainMatching) { |
| 1781 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1871 dart.as(test, dart.functionType(core.bool, [dart.bottom])); |
| 1782 let retained = []; | 1872 let retained = []; |
| 1783 let length = source[core.$length]; | 1873 let length = source.length; |
| 1784 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1874 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1785 let element = source[core.$get](i); | 1875 let element = source[dartx.get](i); |
| 1786 if (dart.dcall(test, element) == retainMatching) { | 1876 if (dart.dcall(test, element) == retainMatching) { |
| 1787 retained[core.$add](element); | 1877 retained[dartx.add](element); |
| 1788 } | 1878 } |
| 1789 if (length != source[core.$length]) { | 1879 if (length != source.length) { |
| 1790 throw new core.ConcurrentModificationError(source); | 1880 throw new core.ConcurrentModificationError(source); |
| 1791 } | 1881 } |
| 1792 } | 1882 } |
| 1793 if (retained[core.$length] != source[core.$length]) { | 1883 if (retained.length != source.length) { |
| 1794 source[core.$setRange](0, retained[core.$length], retained); | 1884 source[dartx.setRange](0, retained.length, retained); |
| 1795 source[core.$length] = retained[core.$length]; | 1885 source.length = retained.length; |
| 1796 } | 1886 } |
| 1797 } | 1887 } |
| 1798 [core.$clear]() { | 1888 clear() { |
| 1799 this[core.$length] = 0; | 1889 this.length = 0; |
| 1800 } | 1890 } |
| 1801 [core.$removeLast]() { | 1891 removeLast() { |
| 1802 if (this[core.$length] == 0) { | 1892 if (this.length == 0) { |
| 1803 throw _internal.IterableElementError.noElement(); | 1893 throw _internal.IterableElementError.noElement(); |
| 1804 } | 1894 } |
| 1805 let result = this[core.$get](dart.notNull(this[core.$length]) - 1); | 1895 let result = this.get(dart.notNull(this.length) - 1); |
| 1806 this[core.$length] = dart.notNull(this[core.$length]) - 1; | 1896 this.length = dart.notNull(this.length) - 1; |
| 1807 return result; | 1897 return result; |
| 1808 } | 1898 } |
| 1809 [core.$sort](compare) { | 1899 sort(compare) { |
| 1810 if (compare === void 0) | 1900 if (compare === void 0) |
| 1811 compare = null; | 1901 compare = null; |
| 1812 dart.as(compare, dart.functionType(core.int, [E, E])); | 1902 dart.as(compare, dart.functionType(core.int, [E, E])); |
| 1813 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co
mpare); | 1903 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co
mpare); |
| 1814 } | 1904 } |
| 1815 [core.$shuffle](random) { | 1905 shuffle(random) { |
| 1816 if (random === void 0) | 1906 if (random === void 0) |
| 1817 random = null; | 1907 random = null; |
| 1818 if (random == null) | 1908 if (random == null) |
| 1819 random = math.Random.new(); | 1909 random = math.Random.new(); |
| 1820 let length = this[core.$length]; | 1910 let length = this.length; |
| 1821 while (dart.notNull(length) > 1) { | 1911 while (dart.notNull(length) > 1) { |
| 1822 let pos = random.nextInt(length); | 1912 let pos = random.nextInt(length); |
| 1823 length = dart.notNull(length) - 1; | 1913 length = dart.notNull(length) - 1; |
| 1824 let tmp = this[core.$get](length); | 1914 let tmp = this.get(length); |
| 1825 this[core.$set](length, this[core.$get](pos)); | 1915 this.set(length, this.get(pos)); |
| 1826 this[core.$set](pos, tmp); | 1916 this.set(pos, tmp); |
| 1827 } | 1917 } |
| 1828 } | 1918 } |
| 1829 [core.$asMap]() { | 1919 asMap() { |
| 1830 return new (_internal.ListMapView$(E))(this); | 1920 return new (_internal.ListMapView$(E))(this); |
| 1831 } | 1921 } |
| 1832 [core.$sublist](start, end) { | 1922 sublist(start, end) { |
| 1833 if (end === void 0) | 1923 if (end === void 0) |
| 1834 end = null; | 1924 end = null; |
| 1835 let listLength = this[core.$length]; | 1925 let listLength = this.length; |
| 1836 if (end == null) | 1926 if (end == null) |
| 1837 end = listLength; | 1927 end = listLength; |
| 1838 core.RangeError.checkValidRange(start, end, listLength); | 1928 core.RangeError.checkValidRange(start, end, listLength); |
| 1839 let length = dart.notNull(end) - dart.notNull(start); | 1929 let length = dart.notNull(end) - dart.notNull(start); |
| 1840 let result = core.List$(E).new(); | 1930 let result = core.List$(E).new(); |
| 1841 result[core.$length] = length; | 1931 result.length = length; |
| 1842 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1932 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1843 result[core.$set](i, this[core.$get](dart.notNull(start) + dart.notNul
l(i))); | 1933 result[dartx.set](i, this.get(dart.notNull(start) + dart.notNull(i))); |
| 1844 } | 1934 } |
| 1845 return result; | 1935 return result; |
| 1846 } | 1936 } |
| 1847 [core.$getRange](start, end) { | 1937 getRange(start, end) { |
| 1848 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1938 core.RangeError.checkValidRange(start, end, this.length); |
| 1849 return new (_internal.SubListIterable$(E))(this, start, end); | 1939 return new (_internal.SubListIterable$(E))(this, start, end); |
| 1850 } | 1940 } |
| 1851 [core.$removeRange](start, end) { | 1941 removeRange(start, end) { |
| 1852 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1942 core.RangeError.checkValidRange(start, end, this.length); |
| 1853 let length = dart.notNull(end) - dart.notNull(start); | 1943 let length = dart.notNull(end) - dart.notNull(start); |
| 1854 this[core.$setRange](start, dart.notNull(this[core.$length]) - dart.notN
ull(length), this, end); | 1944 this.setRange(start, dart.notNull(this.length) - dart.notNull(length), t
his, end); |
| 1855 this[core.$length] = dart.notNull(this[core.$length]) - dart.notNull(len
gth); | 1945 this.length = dart.notNull(this.length) - dart.notNull(length); |
| 1856 } | 1946 } |
| 1857 [core.$fillRange](start, end, fill) { | 1947 fillRange(start, end, fill) { |
| 1858 if (fill === void 0) | 1948 if (fill === void 0) |
| 1859 fill = null; | 1949 fill = null; |
| 1860 dart.as(fill, E); | 1950 dart.as(fill, E); |
| 1861 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1951 core.RangeError.checkValidRange(start, end, this.length); |
| 1862 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { | 1952 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { |
| 1863 this[core.$set](i, fill); | 1953 this.set(i, fill); |
| 1864 } | 1954 } |
| 1865 } | 1955 } |
| 1866 [core.$setRange](start, end, iterable, skipCount) { | 1956 setRange(start, end, iterable, skipCount) { |
| 1867 dart.as(iterable, core.Iterable$(E)); | 1957 dart.as(iterable, core.Iterable$(E)); |
| 1868 if (skipCount === void 0) | 1958 if (skipCount === void 0) |
| 1869 skipCount = 0; | 1959 skipCount = 0; |
| 1870 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1960 core.RangeError.checkValidRange(start, end, this.length); |
| 1871 let length = dart.notNull(end) - dart.notNull(start); | 1961 let length = dart.notNull(end) - dart.notNull(start); |
| 1872 if (length == 0) | 1962 if (length == 0) |
| 1873 return; | 1963 return; |
| 1874 core.RangeError.checkNotNegative(skipCount, "skipCount"); | 1964 core.RangeError.checkNotNegative(skipCount, "skipCount"); |
| 1875 let otherList = null; | 1965 let otherList = null; |
| 1876 let otherStart = null; | 1966 let otherStart = null; |
| 1877 if (dart.is(iterable, core.List)) { | 1967 if (dart.is(iterable, core.List)) { |
| 1878 otherList = dart.as(iterable, core.List); | 1968 otherList = dart.as(iterable, core.List); |
| 1879 otherStart = skipCount; | 1969 otherStart = skipCount; |
| 1880 } else { | 1970 } else { |
| 1881 otherList = iterable[core.$skip](skipCount)[core.$toList]({growable: f
alse}); | 1971 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f
alse}); |
| 1882 otherStart = 0; | 1972 otherStart = 0; |
| 1883 } | 1973 } |
| 1884 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other
List[core.$length])) { | 1974 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other
List.length)) { |
| 1885 throw _internal.IterableElementError.tooFew(); | 1975 throw _internal.IterableElementError.tooFew(); |
| 1886 } | 1976 } |
| 1887 if (dart.notNull(otherStart) < dart.notNull(start)) { | 1977 if (dart.notNull(otherStart) < dart.notNull(start)) { |
| 1888 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.
notNull(i) - 1) { | 1978 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.
notNull(i) - 1) { |
| 1889 this[core.$set](dart.notNull(start) + dart.notNull(i), dart.as(other
List[core.$get](dart.notNull(otherStart) + dart.notNull(i)), E)); | 1979 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da
rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E)); |
| 1890 } | 1980 } |
| 1891 } else { | 1981 } else { |
| 1892 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu
ll(i) + 1) { | 1982 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu
ll(i) + 1) { |
| 1893 this[core.$set](dart.notNull(start) + dart.notNull(i), dart.as(other
List[core.$get](dart.notNull(otherStart) + dart.notNull(i)), E)); | 1983 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da
rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E)); |
| 1894 } | 1984 } |
| 1895 } | 1985 } |
| 1896 } | 1986 } |
| 1897 [core.$replaceRange](start, end, newContents) { | 1987 replaceRange(start, end, newContents) { |
| 1898 dart.as(newContents, core.Iterable$(E)); | 1988 dart.as(newContents, core.Iterable$(E)); |
| 1899 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1989 core.RangeError.checkValidRange(start, end, this.length); |
| 1900 if (!dart.is(newContents, _internal.EfficientLength)) { | 1990 if (!dart.is(newContents, _internal.EfficientLength)) { |
| 1901 newContents = newContents[core.$toList](); | 1991 newContents = newContents[dartx.toList](); |
| 1902 } | 1992 } |
| 1903 let removeLength = dart.notNull(end) - dart.notNull(start); | 1993 let removeLength = dart.notNull(end) - dart.notNull(start); |
| 1904 let insertLength = newContents[core.$length]; | 1994 let insertLength = newContents.length; |
| 1905 if (dart.notNull(removeLength) >= dart.notNull(insertLength)) { | 1995 if (dart.notNull(removeLength) >= dart.notNull(insertLength)) { |
| 1906 let delta = dart.notNull(removeLength) - dart.notNull(insertLength); | 1996 let delta = dart.notNull(removeLength) - dart.notNull(insertLength); |
| 1907 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); | 1997 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); |
| 1908 let newLength = dart.notNull(this[core.$length]) - dart.notNull(delta)
; | 1998 let newLength = dart.notNull(this.length) - dart.notNull(delta); |
| 1909 this[core.$setRange](start, insertEnd, newContents); | 1999 this.setRange(start, insertEnd, newContents); |
| 1910 if (delta != 0) { | 2000 if (delta != 0) { |
| 1911 this[core.$setRange](insertEnd, newLength, this, end); | 2001 this.setRange(insertEnd, newLength, this, end); |
| 1912 this[core.$length] = newLength; | 2002 this.length = newLength; |
| 1913 } | 2003 } |
| 1914 } else { | 2004 } else { |
| 1915 let delta = dart.notNull(insertLength) - dart.notNull(removeLength); | 2005 let delta = dart.notNull(insertLength) - dart.notNull(removeLength); |
| 1916 let newLength = dart.notNull(this[core.$length]) + dart.notNull(delta)
; | 2006 let newLength = dart.notNull(this.length) + dart.notNull(delta); |
| 1917 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); | 2007 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); |
| 1918 this[core.$length] = newLength; | 2008 this.length = newLength; |
| 1919 this[core.$setRange](insertEnd, newLength, this, end); | 2009 this.setRange(insertEnd, newLength, this, end); |
| 1920 this[core.$setRange](start, insertEnd, newContents); | 2010 this.setRange(start, insertEnd, newContents); |
| 1921 } | 2011 } |
| 1922 } | 2012 } |
| 1923 [core.$indexOf](element, startIndex) { | 2013 indexOf(element, startIndex) { |
| 1924 if (startIndex === void 0) | 2014 if (startIndex === void 0) |
| 1925 startIndex = 0; | 2015 startIndex = 0; |
| 1926 if (dart.notNull(startIndex) >= dart.notNull(this[core.$length])) { | 2016 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { |
| 1927 return -1; | 2017 return -1; |
| 1928 } | 2018 } |
| 1929 if (dart.notNull(startIndex) < 0) { | 2019 if (dart.notNull(startIndex) < 0) { |
| 1930 startIndex = 0; | 2020 startIndex = 0; |
| 1931 } | 2021 } |
| 1932 for (let i = startIndex; dart.notNull(i) < dart.notNull(this[core.$lengt
h]); i = dart.notNull(i) + 1) { | 2022 for (let i = startIndex; dart.notNull(i) < dart.notNull(this.length); i
= dart.notNull(i) + 1) { |
| 1933 if (dart.equals(this[core.$get](i), element)) { | 2023 if (dart.equals(this.get(i), element)) { |
| 1934 return i; | 2024 return i; |
| 1935 } | 2025 } |
| 1936 } | 2026 } |
| 1937 return -1; | 2027 return -1; |
| 1938 } | 2028 } |
| 1939 [core.$lastIndexOf](element, startIndex) { | 2029 lastIndexOf(element, startIndex) { |
| 1940 if (startIndex === void 0) | 2030 if (startIndex === void 0) |
| 1941 startIndex = null; | 2031 startIndex = null; |
| 1942 if (startIndex == null) { | 2032 if (startIndex == null) { |
| 1943 startIndex = dart.notNull(this[core.$length]) - 1; | 2033 startIndex = dart.notNull(this.length) - 1; |
| 1944 } else { | 2034 } else { |
| 1945 if (dart.notNull(startIndex) < 0) { | 2035 if (dart.notNull(startIndex) < 0) { |
| 1946 return -1; | 2036 return -1; |
| 1947 } | 2037 } |
| 1948 if (dart.notNull(startIndex) >= dart.notNull(this[core.$length])) { | 2038 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { |
| 1949 startIndex = dart.notNull(this[core.$length]) - 1; | 2039 startIndex = dart.notNull(this.length) - 1; |
| 1950 } | 2040 } |
| 1951 } | 2041 } |
| 1952 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1)
{ | 2042 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1)
{ |
| 1953 if (dart.equals(this[core.$get](i), element)) { | 2043 if (dart.equals(this.get(i), element)) { |
| 1954 return i; | 2044 return i; |
| 1955 } | 2045 } |
| 1956 } | 2046 } |
| 1957 return -1; | 2047 return -1; |
| 1958 } | 2048 } |
| 1959 [core.$insert](index, element) { | 2049 insert(index, element) { |
| 1960 dart.as(element, E); | 2050 dart.as(element, E); |
| 1961 core.RangeError.checkValueInInterval(index, 0, this[core.$length], "inde
x"); | 2051 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); |
| 1962 if (index == this[core.$length]) { | 2052 if (index == this.length) { |
| 1963 this[core.$add](element); | 2053 this.add(element); |
| 1964 return; | 2054 return; |
| 1965 } | 2055 } |
| 1966 if (!(typeof index == 'number')) | 2056 if (!(typeof index == 'number')) |
| 1967 throw new core.ArgumentError(index); | 2057 throw new core.ArgumentError(index); |
| 1968 this[core.$length] = dart.notNull(this[core.$length]) + 1; | 2058 this.length = dart.notNull(this.length) + 1; |
| 1969 this[core.$setRange](dart.notNull(index) + 1, this[core.$length], this,
index); | 2059 this.setRange(dart.notNull(index) + 1, this.length, this, index); |
| 1970 this[core.$set](index, element); | 2060 this.set(index, element); |
| 1971 } | 2061 } |
| 1972 [core.$removeAt](index) { | 2062 removeAt(index) { |
| 1973 let result = this[core.$get](index); | 2063 let result = this.get(index); |
| 1974 this[core.$setRange](index, dart.notNull(this[core.$length]) - 1, this,
dart.notNull(index) + 1); | 2064 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i
ndex) + 1); |
| 1975 this[core.$length] = dart.notNull(this[core.$length]) - 1; | 2065 this.length = dart.notNull(this.length) - 1; |
| 1976 return result; | 2066 return result; |
| 1977 } | 2067 } |
| 1978 [core.$insertAll](index, iterable) { | 2068 insertAll(index, iterable) { |
| 1979 dart.as(iterable, core.Iterable$(E)); | 2069 dart.as(iterable, core.Iterable$(E)); |
| 1980 core.RangeError.checkValueInInterval(index, 0, this[core.$length], "inde
x"); | 2070 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); |
| 1981 if (dart.is(iterable, _internal.EfficientLength)) { | 2071 if (dart.is(iterable, _internal.EfficientLength)) { |
| 1982 iterable = iterable[core.$toList](); | 2072 iterable = iterable[dartx.toList](); |
| 1983 } | 2073 } |
| 1984 let insertionLength = iterable[core.$length]; | 2074 let insertionLength = iterable.length; |
| 1985 this[core.$length] = dart.notNull(this[core.$length]) + dart.notNull(ins
ertionLength); | 2075 this.length = dart.notNull(this.length) + dart.notNull(insertionLength); |
| 1986 this[core.$setRange](dart.notNull(index) + dart.notNull(insertionLength)
, this[core.$length], this, index); | 2076 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this.
length, this, index); |
| 1987 this[core.$setAll](index, iterable); | 2077 this.setAll(index, iterable); |
| 1988 } | 2078 } |
| 1989 [core.$setAll](index, iterable) { | 2079 setAll(index, iterable) { |
| 1990 dart.as(iterable, core.Iterable$(E)); | 2080 dart.as(iterable, core.Iterable$(E)); |
| 1991 if (dart.is(iterable, core.List)) { | 2081 if (dart.is(iterable, core.List)) { |
| 1992 this[core.$setRange](index, dart.notNull(index) + dart.notNull(iterabl
e[core.$length]), iterable); | 2082 this.setRange(index, dart.notNull(index) + dart.notNull(iterable.lengt
h), iterable); |
| 1993 } else { | 2083 } else { |
| 1994 for (let element of iterable) { | 2084 for (let element of iterable) { |
| 1995 this[core.$set]((() => { | 2085 this.set((() => { |
| 1996 let x = index; | 2086 let x = index; |
| 1997 index = dart.notNull(x) + 1; | 2087 index = dart.notNull(x) + 1; |
| 1998 return x; | 2088 return x; |
| 1999 })(), element); | 2089 })(), element); |
| 2000 } | 2090 } |
| 2001 } | 2091 } |
| 2002 } | 2092 } |
| 2003 get [core.$reversed]() { | 2093 get reversed() { |
| 2004 return new (_internal.ReversedListIterable$(E))(this); | 2094 return new (_internal.ReversedListIterable$(E))(this); |
| 2005 } | 2095 } |
| 2006 [core.$toString]() { | 2096 toString() { |
| 2007 return IterableBase.iterableToFullString(this, '[', ']'); | 2097 return IterableBase.iterableToFullString(this, '[', ']'); |
| 2008 } | 2098 } |
| 2009 } | 2099 } |
| 2010 ListMixin[dart.implements] = () => [core.List$(E)]; | 2100 ListMixin[dart.implements] = () => [core.List$(E)]; |
| 2101 dart.defineExtensionMembers(ListMixin, [ |
| 2102 'elementAt', |
| 2103 'forEach', |
| 2104 'contains', |
| 2105 'every', |
| 2106 'any', |
| 2107 'firstWhere', |
| 2108 'lastWhere', |
| 2109 'singleWhere', |
| 2110 'join', |
| 2111 'where', |
| 2112 'map', |
| 2113 'expand', |
| 2114 'reduce', |
| 2115 'fold', |
| 2116 'skip', |
| 2117 'skipWhile', |
| 2118 'take', |
| 2119 'takeWhile', |
| 2120 'toList', |
| 2121 'toSet', |
| 2122 'add', |
| 2123 'addAll', |
| 2124 'remove', |
| 2125 'removeWhere', |
| 2126 'retainWhere', |
| 2127 'clear', |
| 2128 'removeLast', |
| 2129 'sort', |
| 2130 'shuffle', |
| 2131 'asMap', |
| 2132 'sublist', |
| 2133 'getRange', |
| 2134 'removeRange', |
| 2135 'fillRange', |
| 2136 'setRange', |
| 2137 'replaceRange', |
| 2138 'indexOf', |
| 2139 'lastIndexOf', |
| 2140 'insert', |
| 2141 'removeAt', |
| 2142 'insertAll', |
| 2143 'setAll', |
| 2144 'iterator', |
| 2145 'isEmpty', |
| 2146 'isNotEmpty', |
| 2147 'first', |
| 2148 'last', |
| 2149 'single', |
| 2150 'reversed' |
| 2151 ]); |
| 2011 dart.setSignature(ListMixin, { | 2152 dart.setSignature(ListMixin, { |
| 2012 methods: () => ({ | 2153 methods: () => ({ |
| 2013 [core.$elementAt]: [E, [core.int]], | 2154 elementAt: [E, [core.int]], |
| 2014 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 2155 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 2015 [core.$contains]: [core.bool, [core.Object]], | 2156 contains: [core.bool, [core.Object]], |
| 2016 [core.$every]: [core.bool, [dart.functionType(core.bool, [E])]], | 2157 every: [core.bool, [dart.functionType(core.bool, [E])]], |
| 2017 [core.$any]: [core.bool, [dart.functionType(core.bool, [E])]], | 2158 any: [core.bool, [dart.functionType(core.bool, [E])]], |
| 2018 [core.$firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], | 2159 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
| 2019 [core.$lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], | 2160 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
| 2020 [core.$singleWhere]: [E, [dart.functionType(core.bool, [E])]], | 2161 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
| 2021 [core.$join]: [core.String, [], [core.String]], | 2162 join: [core.String, [], [core.String]], |
| 2022 [core.$where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 2163 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 2023 [core.$map]: [core.Iterable, [dart.functionType(core.Object, [E])]], | 2164 map: [core.Iterable, [dart.functionType(core.Object, [E])]], |
| 2024 [core.$expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, | 2165 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], |
| 2025 [core.$reduce]: [E, [dart.functionType(E, [E, E])]], | 2166 reduce: [E, [dart.functionType(E, [E, E])]], |
| 2026 [core.$fold]: [core.Object, [core.Object, dart.functionType(core.Object,
[dart.bottom, E])]], | 2167 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], |
| 2027 [core.$skip]: [core.Iterable$(E), [core.int]], | 2168 skip: [core.Iterable$(E), [core.int]], |
| 2028 [core.$skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 2169 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 2029 [core.$take]: [core.Iterable$(E), [core.int]], | 2170 take: [core.Iterable$(E), [core.int]], |
| 2030 [core.$takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 2171 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 2031 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 2172 toList: [core.List$(E), [], {growable: core.bool}], |
| 2032 [core.$toSet]: [core.Set$(E), []], | 2173 toSet: [core.Set$(E), []], |
| 2033 [core.$add]: [dart.void, [E]], | 2174 add: [dart.void, [E]], |
| 2034 [core.$addAll]: [dart.void, [core.Iterable$(E)]], | 2175 addAll: [dart.void, [core.Iterable$(E)]], |
| 2035 [core.$remove]: [core.bool, [core.Object]], | 2176 remove: [core.bool, [core.Object]], |
| 2036 [core.$removeWhere]: [dart.void, [dart.functionType(core.bool, [E])]], | 2177 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| 2037 [core.$retainWhere]: [dart.void, [dart.functionType(core.bool, [E])]], | 2178 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| 2038 [core.$clear]: [dart.void, []], | 2179 clear: [dart.void, []], |
| 2039 [core.$removeLast]: [E, []], | 2180 removeLast: [E, []], |
| 2040 [core.$sort]: [dart.void, [], [dart.functionType(core.int, [E, E])]], | 2181 sort: [dart.void, [], [dart.functionType(core.int, [E, E])]], |
| 2041 [core.$shuffle]: [dart.void, [], [math.Random]], | 2182 shuffle: [dart.void, [], [math.Random]], |
| 2042 [core.$asMap]: [core.Map$(core.int, E), []], | 2183 asMap: [core.Map$(core.int, E), []], |
| 2043 [core.$sublist]: [core.List$(E), [core.int], [core.int]], | 2184 sublist: [core.List$(E), [core.int], [core.int]], |
| 2044 [core.$getRange]: [core.Iterable$(E), [core.int, core.int]], | 2185 getRange: [core.Iterable$(E), [core.int, core.int]], |
| 2045 [core.$removeRange]: [dart.void, [core.int, core.int]], | 2186 removeRange: [dart.void, [core.int, core.int]], |
| 2046 [core.$fillRange]: [dart.void, [core.int, core.int], [E]], | 2187 fillRange: [dart.void, [core.int, core.int], [E]], |
| 2047 [core.$setRange]: [dart.void, [core.int, core.int, core.Iterable$(E)], [
core.int]], | 2188 setRange: [dart.void, [core.int, core.int, core.Iterable$(E)], [core.int
]], |
| 2048 [core.$replaceRange]: [dart.void, [core.int, core.int, core.Iterable$(E)
]], | 2189 replaceRange: [dart.void, [core.int, core.int, core.Iterable$(E)]], |
| 2049 [core.$indexOf]: [core.int, [core.Object], [core.int]], | 2190 indexOf: [core.int, [core.Object], [core.int]], |
| 2050 [core.$lastIndexOf]: [core.int, [core.Object], [core.int]], | 2191 lastIndexOf: [core.int, [core.Object], [core.int]], |
| 2051 [core.$insert]: [dart.void, [core.int, E]], | 2192 insert: [dart.void, [core.int, E]], |
| 2052 [core.$removeAt]: [E, [core.int]], | 2193 removeAt: [E, [core.int]], |
| 2053 [core.$insertAll]: [dart.void, [core.int, core.Iterable$(E)]], | 2194 insertAll: [dart.void, [core.int, core.Iterable$(E)]], |
| 2054 [core.$setAll]: [dart.void, [core.int, core.Iterable$(E)]] | 2195 setAll: [dart.void, [core.int, core.Iterable$(E)]] |
| 2055 }), | 2196 }), |
| 2056 statics: () => ({_filter: [dart.void, [core.List, dart.functionType(core.b
ool, [dart.bottom]), core.bool]]}), | 2197 statics: () => ({_filter: [dart.void, [core.List, dart.functionType(core.b
ool, [dart.bottom]), core.bool]]}), |
| 2057 names: ['_filter'] | 2198 names: ['_filter'] |
| 2058 }); | 2199 }); |
| 2059 return ListMixin; | 2200 return ListMixin; |
| 2060 }); | 2201 }); |
| 2061 let ListMixin = ListMixin$(); | 2202 let ListMixin = ListMixin$(); |
| 2062 let ListBase$ = dart.generic(function(E) { | 2203 let ListBase$ = dart.generic(function(E) { |
| 2063 class ListBase extends dart.mixin(core.Object, ListMixin$(E)) { | 2204 class ListBase extends dart.mixin(core.Object, ListMixin$(E)) { |
| 2064 static listToString(list) { | 2205 static listToString(list) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2089 containsValue(value) { | 2230 containsValue(value) { |
| 2090 for (let key of this.keys) { | 2231 for (let key of this.keys) { |
| 2091 if (dart.equals(this.get(key), value)) | 2232 if (dart.equals(this.get(key), value)) |
| 2092 return true; | 2233 return true; |
| 2093 } | 2234 } |
| 2094 return false; | 2235 return false; |
| 2095 } | 2236 } |
| 2096 putIfAbsent(key, ifAbsent) { | 2237 putIfAbsent(key, ifAbsent) { |
| 2097 dart.as(key, K); | 2238 dart.as(key, K); |
| 2098 dart.as(ifAbsent, dart.functionType(V, [])); | 2239 dart.as(ifAbsent, dart.functionType(V, [])); |
| 2099 if (this.keys[core.$contains](key)) { | 2240 if (this.keys[dartx.contains](key)) { |
| 2100 return this.get(key); | 2241 return this.get(key); |
| 2101 } | 2242 } |
| 2102 return this.set(key, ifAbsent()); | 2243 return this.set(key, ifAbsent()); |
| 2103 } | 2244 } |
| 2104 containsKey(key) { | 2245 containsKey(key) { |
| 2105 return this.keys[core.$contains](key); | 2246 return this.keys[dartx.contains](key); |
| 2106 } | 2247 } |
| 2107 get length() { | 2248 get length() { |
| 2108 return this.keys[core.$length]; | 2249 return this.keys.length; |
| 2109 } | 2250 } |
| 2110 get isEmpty() { | 2251 get isEmpty() { |
| 2111 return this.keys[core.$isEmpty]; | 2252 return this.keys[dartx.isEmpty]; |
| 2112 } | 2253 } |
| 2113 get isNotEmpty() { | 2254 get isNotEmpty() { |
| 2114 return this.keys[core.$isNotEmpty]; | 2255 return this.keys[dartx.isNotEmpty]; |
| 2115 } | 2256 } |
| 2116 get values() { | 2257 get values() { |
| 2117 return new (_MapBaseValueIterable$(V))(this); | 2258 return new (_MapBaseValueIterable$(V))(this); |
| 2118 } | 2259 } |
| 2119 toString() { | 2260 toString() { |
| 2120 return Maps.mapToString(this); | 2261 return Maps.mapToString(this); |
| 2121 } | 2262 } |
| 2122 } | 2263 } |
| 2123 MapMixin[dart.implements] = () => [core.Map$(K, V)]; | 2264 MapMixin[dart.implements] = () => [core.Map$(K, V)]; |
| 2124 dart.setSignature(MapMixin, { | 2265 dart.setSignature(MapMixin, { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 return UnmodifiableMapBase; | 2320 return UnmodifiableMapBase; |
| 2180 }); | 2321 }); |
| 2181 let UnmodifiableMapBase = UnmodifiableMapBase$(); | 2322 let UnmodifiableMapBase = UnmodifiableMapBase$(); |
| 2182 let _map = Symbol('_map'); | 2323 let _map = Symbol('_map'); |
| 2183 let _MapBaseValueIterable$ = dart.generic(function(V) { | 2324 let _MapBaseValueIterable$ = dart.generic(function(V) { |
| 2184 class _MapBaseValueIterable extends IterableBase$(V) { | 2325 class _MapBaseValueIterable extends IterableBase$(V) { |
| 2185 _MapBaseValueIterable(map) { | 2326 _MapBaseValueIterable(map) { |
| 2186 this[_map] = map; | 2327 this[_map] = map; |
| 2187 super.IterableBase(); | 2328 super.IterableBase(); |
| 2188 } | 2329 } |
| 2189 get [core.$length]() { | 2330 get length() { |
| 2190 return this[_map].length; | 2331 return this[_map].length; |
| 2191 } | 2332 } |
| 2192 get [core.$isEmpty]() { | 2333 get isEmpty() { |
| 2193 return this[_map].isEmpty; | 2334 return this[_map].isEmpty; |
| 2194 } | 2335 } |
| 2195 get [core.$isNotEmpty]() { | 2336 get isNotEmpty() { |
| 2196 return this[_map].isNotEmpty; | 2337 return this[_map].isNotEmpty; |
| 2197 } | 2338 } |
| 2198 get [core.$first]() { | 2339 get first() { |
| 2199 return dart.as(this[_map].get(this[_map].keys[core.$first]), V); | 2340 return dart.as(this[_map].get(this[_map].keys[dartx.first]), V); |
| 2200 } | 2341 } |
| 2201 get [core.$single]() { | 2342 get single() { |
| 2202 return dart.as(this[_map].get(this[_map].keys[core.$single]), V); | 2343 return dart.as(this[_map].get(this[_map].keys[dartx.single]), V); |
| 2203 } | 2344 } |
| 2204 get [core.$last]() { | 2345 get last() { |
| 2205 return dart.as(this[_map].get(this[_map].keys[core.$last]), V); | 2346 return dart.as(this[_map].get(this[_map].keys[dartx.last]), V); |
| 2206 } | 2347 } |
| 2207 get [core.$iterator]() { | 2348 get iterator() { |
| 2208 return new (_MapBaseValueIterator$(V))(this[_map]); | 2349 return new (_MapBaseValueIterator$(V))(this[_map]); |
| 2209 } | 2350 } |
| 2210 } | 2351 } |
| 2211 _MapBaseValueIterable[dart.implements] = () => [_internal.EfficientLength]; | 2352 _MapBaseValueIterable[dart.implements] = () => [_internal.EfficientLength]; |
| 2353 dart.defineExtensionMembers(_MapBaseValueIterable, [ |
| 2354 'length', |
| 2355 'isEmpty', |
| 2356 'isNotEmpty', |
| 2357 'first', |
| 2358 'single', |
| 2359 'last', |
| 2360 'iterator' |
| 2361 ]); |
| 2212 dart.setSignature(_MapBaseValueIterable, { | 2362 dart.setSignature(_MapBaseValueIterable, { |
| 2213 constructors: () => ({_MapBaseValueIterable: [_MapBaseValueIterable$(V), [
core.Map]]}) | 2363 constructors: () => ({_MapBaseValueIterable: [_MapBaseValueIterable$(V), [
core.Map]]}) |
| 2214 }); | 2364 }); |
| 2215 return _MapBaseValueIterable; | 2365 return _MapBaseValueIterable; |
| 2216 }); | 2366 }); |
| 2217 let _MapBaseValueIterable = _MapBaseValueIterable$(); | 2367 let _MapBaseValueIterable = _MapBaseValueIterable$(); |
| 2218 let _keys = Symbol('_keys'); | 2368 let _keys = Symbol('_keys'); |
| 2219 let _MapBaseValueIterator$ = dart.generic(function(V) { | 2369 let _MapBaseValueIterator$ = dart.generic(function(V) { |
| 2220 class _MapBaseValueIterator extends core.Object { | 2370 class _MapBaseValueIterator extends core.Object { |
| 2221 _MapBaseValueIterator(map) { | 2371 _MapBaseValueIterator(map) { |
| 2222 this[_map] = map; | 2372 this[_map] = map; |
| 2223 this[_keys] = map.keys[core.$iterator]; | 2373 this[_keys] = map.keys[dartx.iterator]; |
| 2224 this[_current] = null; | 2374 this[_current] = null; |
| 2225 } | 2375 } |
| 2226 moveNext() { | 2376 moveNext() { |
| 2227 if (this[_keys].moveNext()) { | 2377 if (this[_keys].moveNext()) { |
| 2228 this[_current] = dart.as(this[_map].get(this[_keys].current), V); | 2378 this[_current] = dart.as(this[_map].get(this[_keys].current), V); |
| 2229 return true; | 2379 return true; |
| 2230 } | 2380 } |
| 2231 this[_current] = null; | 2381 this[_current] = null; |
| 2232 return false; | 2382 return false; |
| 2233 } | 2383 } |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2342 } | 2492 } |
| 2343 static putIfAbsent(map, key, ifAbsent) { | 2493 static putIfAbsent(map, key, ifAbsent) { |
| 2344 if (map.containsKey(key)) { | 2494 if (map.containsKey(key)) { |
| 2345 return map.get(key); | 2495 return map.get(key); |
| 2346 } | 2496 } |
| 2347 let v = ifAbsent(); | 2497 let v = ifAbsent(); |
| 2348 map.set(key, v); | 2498 map.set(key, v); |
| 2349 return v; | 2499 return v; |
| 2350 } | 2500 } |
| 2351 static clear(map) { | 2501 static clear(map) { |
| 2352 for (let k of map.keys[core.$toList]()) { | 2502 for (let k of map.keys[dartx.toList]()) { |
| 2353 map.remove(k); | 2503 map.remove(k); |
| 2354 } | 2504 } |
| 2355 } | 2505 } |
| 2356 static forEach(map, f) { | 2506 static forEach(map, f) { |
| 2357 for (let k of map.keys) { | 2507 for (let k of map.keys) { |
| 2358 dart.dcall(f, k, map.get(k)); | 2508 dart.dcall(f, k, map.get(k)); |
| 2359 } | 2509 } |
| 2360 } | 2510 } |
| 2361 static getValues(map) { | 2511 static getValues(map) { |
| 2362 return map.keys[core.$map](dart.fn(key => map.get(key))); | 2512 return map.keys[dartx.map](dart.fn(key => map.get(key))); |
| 2363 } | 2513 } |
| 2364 static length(map) { | 2514 static length(map) { |
| 2365 return map.keys[core.$length]; | 2515 return map.keys.length; |
| 2366 } | 2516 } |
| 2367 static isEmpty(map) { | 2517 static isEmpty(map) { |
| 2368 return map.keys[core.$isEmpty]; | 2518 return map.keys[dartx.isEmpty]; |
| 2369 } | 2519 } |
| 2370 static isNotEmpty(map) { | 2520 static isNotEmpty(map) { |
| 2371 return map.keys[core.$isNotEmpty]; | 2521 return map.keys[dartx.isNotEmpty]; |
| 2372 } | 2522 } |
| 2373 static mapToString(m) { | 2523 static mapToString(m) { |
| 2374 if (IterableBase._isToStringVisiting(m)) { | 2524 if (IterableBase._isToStringVisiting(m)) { |
| 2375 return '{...}'; | 2525 return '{...}'; |
| 2376 } | 2526 } |
| 2377 let result = new core.StringBuffer(); | 2527 let result = new core.StringBuffer(); |
| 2378 try { | 2528 try { |
| 2379 IterableBase._toStringVisiting[core.$add](m); | 2529 IterableBase._toStringVisiting[dartx.add](m); |
| 2380 result.write('{'); | 2530 result.write('{'); |
| 2381 let first = true; | 2531 let first = true; |
| 2382 m.forEach(dart.fn((k, v) => { | 2532 m.forEach(dart.fn((k, v) => { |
| 2383 if (!dart.notNull(first)) { | 2533 if (!dart.notNull(first)) { |
| 2384 result.write(', '); | 2534 result.write(', '); |
| 2385 } | 2535 } |
| 2386 first = false; | 2536 first = false; |
| 2387 result.write(k); | 2537 result.write(k); |
| 2388 result.write(': '); | 2538 result.write(': '); |
| 2389 result.write(v); | 2539 result.write(v); |
| 2390 })); | 2540 })); |
| 2391 result.write('}'); | 2541 result.write('}'); |
| 2392 } finally { | 2542 } finally { |
| 2393 dart.assert(core.identical(IterableBase._toStringVisiting[core.$last], m
)); | 2543 dart.assert(core.identical(IterableBase._toStringVisiting[dartx.last], m
)); |
| 2394 IterableBase._toStringVisiting[core.$removeLast](); | 2544 IterableBase._toStringVisiting[dartx.removeLast](); |
| 2395 } | 2545 } |
| 2396 return dart.toString(result); | 2546 return dart.toString(result); |
| 2397 } | 2547 } |
| 2398 static _id(x) { | 2548 static _id(x) { |
| 2399 return x; | 2549 return x; |
| 2400 } | 2550 } |
| 2401 static _fillMapWithMappedIterable(map, iterable, key, value) { | 2551 static _fillMapWithMappedIterable(map, iterable, key, value) { |
| 2402 if (key == null) | 2552 if (key == null) |
| 2403 key = Maps._id; | 2553 key = Maps._id; |
| 2404 if (value == null) | 2554 if (value == null) |
| 2405 value = Maps._id; | 2555 value = Maps._id; |
| 2406 for (let element of iterable) { | 2556 for (let element of iterable) { |
| 2407 map.set(dart.dcall(key, element), dart.dcall(value, element)); | 2557 map.set(dart.dcall(key, element), dart.dcall(value, element)); |
| 2408 } | 2558 } |
| 2409 } | 2559 } |
| 2410 static _fillMapWithIterables(map, keys, values) { | 2560 static _fillMapWithIterables(map, keys, values) { |
| 2411 let keyIterator = keys[core.$iterator]; | 2561 let keyIterator = keys[dartx.iterator]; |
| 2412 let valueIterator = values[core.$iterator]; | 2562 let valueIterator = values[dartx.iterator]; |
| 2413 let hasNextKey = keyIterator.moveNext(); | 2563 let hasNextKey = keyIterator.moveNext(); |
| 2414 let hasNextValue = valueIterator.moveNext(); | 2564 let hasNextValue = valueIterator.moveNext(); |
| 2415 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { | 2565 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { |
| 2416 map.set(keyIterator.current, valueIterator.current); | 2566 map.set(keyIterator.current, valueIterator.current); |
| 2417 hasNextKey = keyIterator.moveNext(); | 2567 hasNextKey = keyIterator.moveNext(); |
| 2418 hasNextValue = valueIterator.moveNext(); | 2568 hasNextValue = valueIterator.moveNext(); |
| 2419 } | 2569 } |
| 2420 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { | 2570 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { |
| 2421 throw new core.ArgumentError("Iterables do not have same length."); | 2571 throw new core.ArgumentError("Iterables do not have same length."); |
| 2422 } | 2572 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2442 }); | 2592 }); |
| 2443 let Queue$ = dart.generic(function(E) { | 2593 let Queue$ = dart.generic(function(E) { |
| 2444 class Queue extends core.Object { | 2594 class Queue extends core.Object { |
| 2445 static new() { | 2595 static new() { |
| 2446 return new (ListQueue$(E))(); | 2596 return new (ListQueue$(E))(); |
| 2447 } | 2597 } |
| 2448 static from(elements) { | 2598 static from(elements) { |
| 2449 return ListQueue$(E).from(elements); | 2599 return ListQueue$(E).from(elements); |
| 2450 } | 2600 } |
| 2451 [Symbol.iterator]() { | 2601 [Symbol.iterator]() { |
| 2452 return new dart.JsIterator(this[core.$iterator]); | 2602 return new dart.JsIterator(this.iterator); |
| 2453 } | 2603 } |
| 2454 } | 2604 } |
| 2455 Queue[dart.implements] = () => [core.Iterable$(E), _internal.EfficientLength
]; | 2605 Queue[dart.implements] = () => [core.Iterable$(E), _internal.EfficientLength
]; |
| 2456 dart.setSignature(Queue, { | 2606 dart.setSignature(Queue, { |
| 2457 constructors: () => ({ | 2607 constructors: () => ({ |
| 2458 new: [Queue$(E), []], | 2608 new: [Queue$(E), []], |
| 2459 from: [Queue$(E), [core.Iterable]] | 2609 from: [Queue$(E), [core.Iterable]] |
| 2460 }) | 2610 }) |
| 2461 }); | 2611 }); |
| 2462 return Queue; | 2612 return Queue; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2568 super.IterableBase(); | 2718 super.IterableBase(); |
| 2569 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); | 2719 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); |
| 2570 } | 2720 } |
| 2571 static from(elements) { | 2721 static from(elements) { |
| 2572 let list = new (DoubleLinkedQueue$(E))(); | 2722 let list = new (DoubleLinkedQueue$(E))(); |
| 2573 for (let e of dart.as(elements, core.Iterable$(E))) { | 2723 for (let e of dart.as(elements, core.Iterable$(E))) { |
| 2574 list.addLast(e); | 2724 list.addLast(e); |
| 2575 } | 2725 } |
| 2576 return dart.as(list, DoubleLinkedQueue$(E)); | 2726 return dart.as(list, DoubleLinkedQueue$(E)); |
| 2577 } | 2727 } |
| 2578 get [core.$length]() { | 2728 get length() { |
| 2579 return this[_elementCount]; | 2729 return this[_elementCount]; |
| 2580 } | 2730 } |
| 2581 addLast(value) { | 2731 addLast(value) { |
| 2582 dart.as(value, E); | 2732 dart.as(value, E); |
| 2583 this[_sentinel].prepend(value); | 2733 this[_sentinel].prepend(value); |
| 2584 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; | 2734 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; |
| 2585 } | 2735 } |
| 2586 addFirst(value) { | 2736 addFirst(value) { |
| 2587 dart.as(value, E); | 2737 dart.as(value, E); |
| 2588 this[_sentinel].append(value); | 2738 this[_sentinel].append(value); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2635 } | 2785 } |
| 2636 } | 2786 } |
| 2637 removeWhere(test) { | 2787 removeWhere(test) { |
| 2638 dart.as(test, dart.functionType(core.bool, [E])); | 2788 dart.as(test, dart.functionType(core.bool, [E])); |
| 2639 this[_filter](test, true); | 2789 this[_filter](test, true); |
| 2640 } | 2790 } |
| 2641 retainWhere(test) { | 2791 retainWhere(test) { |
| 2642 dart.as(test, dart.functionType(core.bool, [E])); | 2792 dart.as(test, dart.functionType(core.bool, [E])); |
| 2643 this[_filter](test, false); | 2793 this[_filter](test, false); |
| 2644 } | 2794 } |
| 2645 get [core.$first]() { | 2795 get first() { |
| 2646 return this[_sentinel][_next].element; | 2796 return this[_sentinel][_next].element; |
| 2647 } | 2797 } |
| 2648 get [core.$last]() { | 2798 get last() { |
| 2649 return this[_sentinel][_previous].element; | 2799 return this[_sentinel][_previous].element; |
| 2650 } | 2800 } |
| 2651 get [core.$single]() { | 2801 get single() { |
| 2652 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous]))
{ | 2802 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous]))
{ |
| 2653 return this[_sentinel][_next].element; | 2803 return this[_sentinel][_next].element; |
| 2654 } | 2804 } |
| 2655 throw _internal.IterableElementError.tooMany(); | 2805 throw _internal.IterableElementError.tooMany(); |
| 2656 } | 2806 } |
| 2657 lastEntry() { | 2807 lastEntry() { |
| 2658 return this[_sentinel].previousEntry(); | 2808 return this[_sentinel].previousEntry(); |
| 2659 } | 2809 } |
| 2660 firstEntry() { | 2810 firstEntry() { |
| 2661 return this[_sentinel].nextEntry(); | 2811 return this[_sentinel].nextEntry(); |
| 2662 } | 2812 } |
| 2663 get [core.$isEmpty]() { | 2813 get isEmpty() { |
| 2664 return core.identical(this[_sentinel][_next], this[_sentinel]); | 2814 return core.identical(this[_sentinel][_next], this[_sentinel]); |
| 2665 } | 2815 } |
| 2666 clear() { | 2816 clear() { |
| 2667 this[_sentinel][_next] = this[_sentinel]; | 2817 this[_sentinel][_next] = this[_sentinel]; |
| 2668 this[_sentinel][_previous] = this[_sentinel]; | 2818 this[_sentinel][_previous] = this[_sentinel]; |
| 2669 this[_elementCount] = 0; | 2819 this[_elementCount] = 0; |
| 2670 } | 2820 } |
| 2671 forEachEntry(f) { | 2821 forEachEntry(f) { |
| 2672 dart.as(f, dart.functionType(dart.void, [DoubleLinkedQueueEntry$(E)])); | 2822 dart.as(f, dart.functionType(dart.void, [DoubleLinkedQueueEntry$(E)])); |
| 2673 let entry = this[_sentinel][_next]; | 2823 let entry = this[_sentinel][_next]; |
| 2674 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { | 2824 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { |
| 2675 let nextEntry = entry[_next]; | 2825 let nextEntry = entry[_next]; |
| 2676 f(entry); | 2826 f(entry); |
| 2677 entry = nextEntry; | 2827 entry = nextEntry; |
| 2678 } | 2828 } |
| 2679 } | 2829 } |
| 2680 get [core.$iterator]() { | 2830 get iterator() { |
| 2681 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]); | 2831 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]); |
| 2682 } | 2832 } |
| 2683 toString() { | 2833 toString() { |
| 2684 return IterableBase.iterableToFullString(this, '{', '}'); | 2834 return IterableBase.iterableToFullString(this, '{', '}'); |
| 2685 } | 2835 } |
| 2686 } | 2836 } |
| 2687 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)]; | 2837 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)]; |
| 2838 dart.defineExtensionMembers(DoubleLinkedQueue, [ |
| 2839 'length', |
| 2840 'first', |
| 2841 'last', |
| 2842 'single', |
| 2843 'isEmpty', |
| 2844 'iterator' |
| 2845 ]); |
| 2688 dart.setSignature(DoubleLinkedQueue, { | 2846 dart.setSignature(DoubleLinkedQueue, { |
| 2689 constructors: () => ({ | 2847 constructors: () => ({ |
| 2690 DoubleLinkedQueue: [DoubleLinkedQueue$(E), []], | 2848 DoubleLinkedQueue: [DoubleLinkedQueue$(E), []], |
| 2691 from: [DoubleLinkedQueue$(E), [core.Iterable]] | 2849 from: [DoubleLinkedQueue$(E), [core.Iterable]] |
| 2692 }), | 2850 }), |
| 2693 methods: () => ({ | 2851 methods: () => ({ |
| 2694 addLast: [dart.void, [E]], | 2852 addLast: [dart.void, [E]], |
| 2695 addFirst: [dart.void, [E]], | 2853 addFirst: [dart.void, [E]], |
| 2696 add: [dart.void, [E]], | 2854 add: [dart.void, [E]], |
| 2697 addAll: [dart.void, [core.Iterable$(E)]], | 2855 addAll: [dart.void, [core.Iterable$(E)]], |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2763 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue$()._INITIAL_CAPACITY)) { | 2921 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue$()._INITIAL_CAPACITY)) { |
| 2764 initialCapacity = ListQueue$()._INITIAL_CAPACITY; | 2922 initialCapacity = ListQueue$()._INITIAL_CAPACITY; |
| 2765 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { | 2923 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { |
| 2766 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); | 2924 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); |
| 2767 } | 2925 } |
| 2768 dart.assert(ListQueue$()._isPowerOf2(initialCapacity)); | 2926 dart.assert(ListQueue$()._isPowerOf2(initialCapacity)); |
| 2769 this[_table] = core.List$(E).new(initialCapacity); | 2927 this[_table] = core.List$(E).new(initialCapacity); |
| 2770 } | 2928 } |
| 2771 static from(elements) { | 2929 static from(elements) { |
| 2772 if (dart.is(elements, core.List)) { | 2930 if (dart.is(elements, core.List)) { |
| 2773 let length = elements[core.$length]; | 2931 let length = elements.length; |
| 2774 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); | 2932 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); |
| 2775 dart.assert(dart.notNull(queue[_table][core.$length]) > dart.notNull(l
ength)); | 2933 dart.assert(dart.notNull(queue[_table].length) > dart.notNull(length))
; |
| 2776 let sourceList = elements; | 2934 let sourceList = elements; |
| 2777 queue[_table][core.$setRange](0, length, dart.as(sourceList, core.Iter
able$(E)), 0); | 2935 queue[_table][dartx.setRange](0, length, dart.as(sourceList, core.Iter
able$(E)), 0); |
| 2778 queue[_tail] = length; | 2936 queue[_tail] = length; |
| 2779 return queue; | 2937 return queue; |
| 2780 } else { | 2938 } else { |
| 2781 let capacity = ListQueue$()._INITIAL_CAPACITY; | 2939 let capacity = ListQueue$()._INITIAL_CAPACITY; |
| 2782 if (dart.is(elements, _internal.EfficientLength)) { | 2940 if (dart.is(elements, _internal.EfficientLength)) { |
| 2783 capacity = elements[core.$length]; | 2941 capacity = elements.length; |
| 2784 } | 2942 } |
| 2785 let result = new (ListQueue$(E))(capacity); | 2943 let result = new (ListQueue$(E))(capacity); |
| 2786 for (let element of dart.as(elements, core.Iterable$(E))) { | 2944 for (let element of dart.as(elements, core.Iterable$(E))) { |
| 2787 result.addLast(element); | 2945 result.addLast(element); |
| 2788 } | 2946 } |
| 2789 return result; | 2947 return result; |
| 2790 } | 2948 } |
| 2791 } | 2949 } |
| 2792 get [core.$iterator]() { | 2950 get iterator() { |
| 2793 return new (_ListQueueIterator$(E))(this); | 2951 return new (_ListQueueIterator$(E))(this); |
| 2794 } | 2952 } |
| 2795 [core.$forEach](action) { | 2953 forEach(action) { |
| 2796 dart.as(action, dart.functionType(dart.void, [E])); | 2954 dart.as(action, dart.functionType(dart.void, [E])); |
| 2797 let modificationCount = this[_modificationCount]; | 2955 let modificationCount = this[_modificationCount]; |
| 2798 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da
rt.notNull(this[_table][core.$length]) - 1) { | 2956 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da
rt.notNull(this[_table].length) - 1) { |
| 2799 action(this[_table][core.$get](i)); | 2957 action(this[_table][dartx.get](i)); |
| 2800 this[_checkModification](modificationCount); | 2958 this[_checkModification](modificationCount); |
| 2801 } | 2959 } |
| 2802 } | 2960 } |
| 2803 get [core.$isEmpty]() { | 2961 get isEmpty() { |
| 2804 return this[_head] == this[_tail]; | 2962 return this[_head] == this[_tail]; |
| 2805 } | 2963 } |
| 2806 get [core.$length]() { | 2964 get length() { |
| 2807 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN
ull(this[_table][core.$length]) - 1; | 2965 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN
ull(this[_table].length) - 1; |
| 2808 } | 2966 } |
| 2809 get [core.$first]() { | 2967 get first() { |
| 2810 if (this[_head] == this[_tail]) | 2968 if (this[_head] == this[_tail]) |
| 2811 throw _internal.IterableElementError.noElement(); | 2969 throw _internal.IterableElementError.noElement(); |
| 2812 return this[_table][core.$get](this[_head]); | 2970 return this[_table][dartx.get](this[_head]); |
| 2813 } | 2971 } |
| 2814 get [core.$last]() { | 2972 get last() { |
| 2815 if (this[_head] == this[_tail]) | 2973 if (this[_head] == this[_tail]) |
| 2816 throw _internal.IterableElementError.noElement(); | 2974 throw _internal.IterableElementError.noElement(); |
| 2817 return this[_table][core.$get](dart.notNull(this[_tail]) - 1 & dart.notN
ull(this[_table][core.$length]) - 1); | 2975 return this[_table][dartx.get](dart.notNull(this[_tail]) - 1 & dart.notN
ull(this[_table].length) - 1); |
| 2818 } | 2976 } |
| 2819 get [core.$single]() { | 2977 get single() { |
| 2820 if (this[_head] == this[_tail]) | 2978 if (this[_head] == this[_tail]) |
| 2821 throw _internal.IterableElementError.noElement(); | 2979 throw _internal.IterableElementError.noElement(); |
| 2822 if (dart.notNull(this[core.$length]) > 1) | 2980 if (dart.notNull(this.length) > 1) |
| 2823 throw _internal.IterableElementError.tooMany(); | 2981 throw _internal.IterableElementError.tooMany(); |
| 2824 return this[_table][core.$get](this[_head]); | 2982 return this[_table][dartx.get](this[_head]); |
| 2825 } | 2983 } |
| 2826 [core.$elementAt](index) { | 2984 elementAt(index) { |
| 2827 core.RangeError.checkValidIndex(index, this); | 2985 core.RangeError.checkValidIndex(index, this); |
| 2828 return this[_table][core.$get](dart.notNull(this[_head]) + dart.notNull(
index) & dart.notNull(this[_table][core.$length]) - 1); | 2986 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull(
index) & dart.notNull(this[_table].length) - 1); |
| 2829 } | 2987 } |
| 2830 [core.$toList](opts) { | 2988 toList(opts) { |
| 2831 let growable = opts && 'growable' in opts ? opts.growable : true; | 2989 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 2832 let list = null; | 2990 let list = null; |
| 2833 if (growable) { | 2991 if (growable) { |
| 2834 list = core.List$(E).new(); | 2992 list = core.List$(E).new(); |
| 2835 list[core.$length] = this[core.$length]; | 2993 list.length = this.length; |
| 2836 } else { | 2994 } else { |
| 2837 list = core.List$(E).new(this[core.$length]); | 2995 list = core.List$(E).new(this.length); |
| 2838 } | 2996 } |
| 2839 this[_writeToList](list); | 2997 this[_writeToList](list); |
| 2840 return list; | 2998 return list; |
| 2841 } | 2999 } |
| 2842 add(element) { | 3000 add(element) { |
| 2843 dart.as(element, E); | 3001 dart.as(element, E); |
| 2844 this[_add](element); | 3002 this[_add](element); |
| 2845 } | 3003 } |
| 2846 addAll(elements) { | 3004 addAll(elements) { |
| 2847 dart.as(elements, core.Iterable$(E)); | 3005 dart.as(elements, core.Iterable$(E)); |
| 2848 if (dart.is(elements, core.List)) { | 3006 if (dart.is(elements, core.List)) { |
| 2849 let list = dart.as(elements, core.List); | 3007 let list = dart.as(elements, core.List); |
| 2850 let addCount = list[core.$length]; | 3008 let addCount = list.length; |
| 2851 let length = this[core.$length]; | 3009 let length = this.length; |
| 2852 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this
[_table][core.$length])) { | 3010 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this
[_table].length)) { |
| 2853 this[_preGrow](dart.notNull(length) + dart.notNull(addCount)); | 3011 this[_preGrow](dart.notNull(length) + dart.notNull(addCount)); |
| 2854 this[_table][core.$setRange](length, dart.notNull(length) + dart.not
Null(addCount), dart.as(list, core.Iterable$(E)), 0); | 3012 this[_table][dartx.setRange](length, dart.notNull(length) + dart.not
Null(addCount), dart.as(list, core.Iterable$(E)), 0); |
| 2855 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); | 3013 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); |
| 2856 } else { | 3014 } else { |
| 2857 let endSpace = dart.notNull(this[_table][core.$length]) - dart.notNu
ll(this[_tail]); | 3015 let endSpace = dart.notNull(this[_table].length) - dart.notNull(this
[_tail]); |
| 2858 if (dart.notNull(addCount) < dart.notNull(endSpace)) { | 3016 if (dart.notNull(addCount) < dart.notNull(endSpace)) { |
| 2859 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(addCount), dart.as(list, core.Iterable$(E)), 0); | 3017 this[_table][dartx.setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(addCount), dart.as(list, core.Iterable$(E)), 0); |
| 2860 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); | 3018 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); |
| 2861 } else { | 3019 } else { |
| 2862 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace); | 3020 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace); |
| 2863 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0); | 3021 this[_table][dartx.setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0); |
| 2864 this[_table][core.$setRange](0, preSpace, dart.as(list, core.Itera
ble$(E)), endSpace); | 3022 this[_table][dartx.setRange](0, preSpace, dart.as(list, core.Itera
ble$(E)), endSpace); |
| 2865 this[_tail] = preSpace; | 3023 this[_tail] = preSpace; |
| 2866 } | 3024 } |
| 2867 } | 3025 } |
| 2868 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3026 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2869 } else { | 3027 } else { |
| 2870 for (let element of elements) | 3028 for (let element of elements) |
| 2871 this[_add](element); | 3029 this[_add](element); |
| 2872 } | 3030 } |
| 2873 } | 3031 } |
| 2874 remove(object) { | 3032 remove(object) { |
| 2875 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da
rt.notNull(this[_table][core.$length]) - 1) { | 3033 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da
rt.notNull(this[_table].length) - 1) { |
| 2876 let element = this[_table][core.$get](i); | 3034 let element = this[_table][dartx.get](i); |
| 2877 if (dart.equals(element, object)) { | 3035 if (dart.equals(element, object)) { |
| 2878 this[_remove](i); | 3036 this[_remove](i); |
| 2879 this[_modificationCount] = dart.notNull(this[_modificationCount]) +
1; | 3037 this[_modificationCount] = dart.notNull(this[_modificationCount]) +
1; |
| 2880 return true; | 3038 return true; |
| 2881 } | 3039 } |
| 2882 } | 3040 } |
| 2883 return false; | 3041 return false; |
| 2884 } | 3042 } |
| 2885 [_filterWhere](test, removeMatching) { | 3043 [_filterWhere](test, removeMatching) { |
| 2886 dart.as(test, dart.functionType(core.bool, [E])); | 3044 dart.as(test, dart.functionType(core.bool, [E])); |
| 2887 let index = this[_head]; | 3045 let index = this[_head]; |
| 2888 let modificationCount = this[_modificationCount]; | 3046 let modificationCount = this[_modificationCount]; |
| 2889 let i = this[_head]; | 3047 let i = this[_head]; |
| 2890 while (i != this[_tail]) { | 3048 while (i != this[_tail]) { |
| 2891 let element = this[_table][core.$get](i); | 3049 let element = this[_table][dartx.get](i); |
| 2892 let remove = core.identical(removeMatching, test(element)); | 3050 let remove = core.identical(removeMatching, test(element)); |
| 2893 this[_checkModification](modificationCount); | 3051 this[_checkModification](modificationCount); |
| 2894 if (remove) { | 3052 if (remove) { |
| 2895 i = this[_remove](i); | 3053 i = this[_remove](i); |
| 2896 modificationCount = this[_modificationCount] = dart.notNull(this[_mo
dificationCount]) + 1; | 3054 modificationCount = this[_modificationCount] = dart.notNull(this[_mo
dificationCount]) + 1; |
| 2897 } else { | 3055 } else { |
| 2898 i = dart.notNull(i) + 1 & dart.notNull(this[_table][core.$length]) -
1; | 3056 i = dart.notNull(i) + 1 & dart.notNull(this[_table].length) - 1; |
| 2899 } | 3057 } |
| 2900 } | 3058 } |
| 2901 } | 3059 } |
| 2902 removeWhere(test) { | 3060 removeWhere(test) { |
| 2903 dart.as(test, dart.functionType(core.bool, [E])); | 3061 dart.as(test, dart.functionType(core.bool, [E])); |
| 2904 this[_filterWhere](test, true); | 3062 this[_filterWhere](test, true); |
| 2905 } | 3063 } |
| 2906 retainWhere(test) { | 3064 retainWhere(test) { |
| 2907 dart.as(test, dart.functionType(core.bool, [E])); | 3065 dart.as(test, dart.functionType(core.bool, [E])); |
| 2908 this[_filterWhere](test, false); | 3066 this[_filterWhere](test, false); |
| 2909 } | 3067 } |
| 2910 clear() { | 3068 clear() { |
| 2911 if (this[_head] != this[_tail]) { | 3069 if (this[_head] != this[_tail]) { |
| 2912 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 &
dart.notNull(this[_table][core.$length]) - 1) { | 3070 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 &
dart.notNull(this[_table].length) - 1) { |
| 2913 this[_table][core.$set](i, null); | 3071 this[_table][dartx.set](i, null); |
| 2914 } | 3072 } |
| 2915 this[_head] = this[_tail] = 0; | 3073 this[_head] = this[_tail] = 0; |
| 2916 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3074 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2917 } | 3075 } |
| 2918 } | 3076 } |
| 2919 toString() { | 3077 toString() { |
| 2920 return IterableBase.iterableToFullString(this, "{", "}"); | 3078 return IterableBase.iterableToFullString(this, "{", "}"); |
| 2921 } | 3079 } |
| 2922 addLast(element) { | 3080 addLast(element) { |
| 2923 dart.as(element, E); | 3081 dart.as(element, E); |
| 2924 this[_add](element); | 3082 this[_add](element); |
| 2925 } | 3083 } |
| 2926 addFirst(element) { | 3084 addFirst(element) { |
| 2927 dart.as(element, E); | 3085 dart.as(element, E); |
| 2928 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][
core.$length]) - 1; | 3086 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table].
length) - 1; |
| 2929 this[_table][core.$set](this[_head], element); | 3087 this[_table][dartx.set](this[_head], element); |
| 2930 if (this[_head] == this[_tail]) | 3088 if (this[_head] == this[_tail]) |
| 2931 this[_grow](); | 3089 this[_grow](); |
| 2932 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3090 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2933 } | 3091 } |
| 2934 removeFirst() { | 3092 removeFirst() { |
| 2935 if (this[_head] == this[_tail]) | 3093 if (this[_head] == this[_tail]) |
| 2936 throw _internal.IterableElementError.noElement(); | 3094 throw _internal.IterableElementError.noElement(); |
| 2937 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3095 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2938 let result = this[_table][core.$get](this[_head]); | 3096 let result = this[_table][dartx.get](this[_head]); |
| 2939 this[_table][core.$set](this[_head], null); | 3097 this[_table][dartx.set](this[_head], null); |
| 2940 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][
core.$length]) - 1; | 3098 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table].
length) - 1; |
| 2941 return result; | 3099 return result; |
| 2942 } | 3100 } |
| 2943 removeLast() { | 3101 removeLast() { |
| 2944 if (this[_head] == this[_tail]) | 3102 if (this[_head] == this[_tail]) |
| 2945 throw _internal.IterableElementError.noElement(); | 3103 throw _internal.IterableElementError.noElement(); |
| 2946 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3104 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2947 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][
core.$length]) - 1; | 3105 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table].
length) - 1; |
| 2948 let result = this[_table][core.$get](this[_tail]); | 3106 let result = this[_table][dartx.get](this[_tail]); |
| 2949 this[_table][core.$set](this[_tail], null); | 3107 this[_table][dartx.set](this[_tail], null); |
| 2950 return result; | 3108 return result; |
| 2951 } | 3109 } |
| 2952 static _isPowerOf2(number) { | 3110 static _isPowerOf2(number) { |
| 2953 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; | 3111 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; |
| 2954 } | 3112 } |
| 2955 static _nextPowerOf2(number) { | 3113 static _nextPowerOf2(number) { |
| 2956 dart.assert(dart.notNull(number) > 0); | 3114 dart.assert(dart.notNull(number) > 0); |
| 2957 number = (dart.notNull(number) << 1) - 1; | 3115 number = (dart.notNull(number) << 1) - 1; |
| 2958 for (;;) { | 3116 for (;;) { |
| 2959 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; | 3117 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; |
| 2960 if (nextNumber == 0) | 3118 if (nextNumber == 0) |
| 2961 return number; | 3119 return number; |
| 2962 number = nextNumber; | 3120 number = nextNumber; |
| 2963 } | 3121 } |
| 2964 } | 3122 } |
| 2965 [_checkModification](expectedModificationCount) { | 3123 [_checkModification](expectedModificationCount) { |
| 2966 if (expectedModificationCount != this[_modificationCount]) { | 3124 if (expectedModificationCount != this[_modificationCount]) { |
| 2967 throw new core.ConcurrentModificationError(this); | 3125 throw new core.ConcurrentModificationError(this); |
| 2968 } | 3126 } |
| 2969 } | 3127 } |
| 2970 [_add](element) { | 3128 [_add](element) { |
| 2971 dart.as(element, E); | 3129 dart.as(element, E); |
| 2972 this[_table][core.$set](this[_tail], element); | 3130 this[_table][dartx.set](this[_tail], element); |
| 2973 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][
core.$length]) - 1; | 3131 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table].
length) - 1; |
| 2974 if (this[_head] == this[_tail]) | 3132 if (this[_head] == this[_tail]) |
| 2975 this[_grow](); | 3133 this[_grow](); |
| 2976 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3134 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2977 } | 3135 } |
| 2978 [_remove](offset) { | 3136 [_remove](offset) { |
| 2979 let mask = dart.notNull(this[_table][core.$length]) - 1; | 3137 let mask = dart.notNull(this[_table].length) - 1; |
| 2980 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d
art.notNull(mask); | 3138 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d
art.notNull(mask); |
| 2981 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar
t.notNull(mask); | 3139 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar
t.notNull(mask); |
| 2982 if (dart.notNull(startDistance) < dart.notNull(endDistance)) { | 3140 if (dart.notNull(startDistance) < dart.notNull(endDistance)) { |
| 2983 let i = offset; | 3141 let i = offset; |
| 2984 while (i != this[_head]) { | 3142 while (i != this[_head]) { |
| 2985 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask); | 3143 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask); |
| 2986 this[_table][core.$set](i, this[_table][core.$get](prevOffset)); | 3144 this[_table][dartx.set](i, this[_table][dartx.get](prevOffset)); |
| 2987 i = prevOffset; | 3145 i = prevOffset; |
| 2988 } | 3146 } |
| 2989 this[_table][core.$set](this[_head], null); | 3147 this[_table][dartx.set](this[_head], null); |
| 2990 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(mask); | 3148 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(mask); |
| 2991 return dart.notNull(offset) + 1 & dart.notNull(mask); | 3149 return dart.notNull(offset) + 1 & dart.notNull(mask); |
| 2992 } else { | 3150 } else { |
| 2993 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(mask); | 3151 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(mask); |
| 2994 let i = offset; | 3152 let i = offset; |
| 2995 while (i != this[_tail]) { | 3153 while (i != this[_tail]) { |
| 2996 let nextOffset = dart.notNull(i) + 1 & dart.notNull(mask); | 3154 let nextOffset = dart.notNull(i) + 1 & dart.notNull(mask); |
| 2997 this[_table][core.$set](i, this[_table][core.$get](nextOffset)); | 3155 this[_table][dartx.set](i, this[_table][dartx.get](nextOffset)); |
| 2998 i = nextOffset; | 3156 i = nextOffset; |
| 2999 } | 3157 } |
| 3000 this[_table][core.$set](this[_tail], null); | 3158 this[_table][dartx.set](this[_tail], null); |
| 3001 return offset; | 3159 return offset; |
| 3002 } | 3160 } |
| 3003 } | 3161 } |
| 3004 [_grow]() { | 3162 [_grow]() { |
| 3005 let newTable = core.List$(E).new(dart.notNull(this[_table][core.$length]
) * 2); | 3163 let newTable = core.List$(E).new(dart.notNull(this[_table].length) * 2); |
| 3006 let split = dart.notNull(this[_table][core.$length]) - dart.notNull(this
[_head]); | 3164 let split = dart.notNull(this[_table].length) - dart.notNull(this[_head]
); |
| 3007 newTable[core.$setRange](0, split, this[_table], this[_head]); | 3165 newTable[dartx.setRange](0, split, this[_table], this[_head]); |
| 3008 newTable[core.$setRange](split, dart.notNull(split) + dart.notNull(this[
_head]), this[_table], 0); | 3166 newTable[dartx.setRange](split, dart.notNull(split) + dart.notNull(this[
_head]), this[_table], 0); |
| 3009 this[_head] = 0; | 3167 this[_head] = 0; |
| 3010 this[_tail] = this[_table][core.$length]; | 3168 this[_tail] = this[_table].length; |
| 3011 this[_table] = newTable; | 3169 this[_table] = newTable; |
| 3012 } | 3170 } |
| 3013 [_writeToList](target) { | 3171 [_writeToList](target) { |
| 3014 dart.as(target, core.List$(E)); | 3172 dart.as(target, core.List$(E)); |
| 3015 dart.assert(dart.notNull(target[core.$length]) >= dart.notNull(this[core
.$length])); | 3173 dart.assert(dart.notNull(target.length) >= dart.notNull(this.length)); |
| 3016 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { | 3174 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { |
| 3017 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); | 3175 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); |
| 3018 target[core.$setRange](0, length, this[_table], this[_head]); | 3176 target[dartx.setRange](0, length, this[_table], this[_head]); |
| 3019 return length; | 3177 return length; |
| 3020 } else { | 3178 } else { |
| 3021 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no
tNull(this[_head]); | 3179 let firstPartSize = dart.notNull(this[_table].length) - dart.notNull(t
his[_head]); |
| 3022 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); | 3180 target[dartx.setRange](0, firstPartSize, this[_table], this[_head]); |
| 3023 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da
rt.notNull(this[_tail]), this[_table], 0); | 3181 target[dartx.setRange](firstPartSize, dart.notNull(firstPartSize) + da
rt.notNull(this[_tail]), this[_table], 0); |
| 3024 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); | 3182 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); |
| 3025 } | 3183 } |
| 3026 } | 3184 } |
| 3027 [_preGrow](newElementCount) { | 3185 [_preGrow](newElementCount) { |
| 3028 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this[core.$len
gth])); | 3186 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); |
| 3029 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); | 3187 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); |
| 3030 let newCapacity = ListQueue$()._nextPowerOf2(newElementCount); | 3188 let newCapacity = ListQueue$()._nextPowerOf2(newElementCount); |
| 3031 let newTable = core.List$(E).new(newCapacity); | 3189 let newTable = core.List$(E).new(newCapacity); |
| 3032 this[_tail] = this[_writeToList](newTable); | 3190 this[_tail] = this[_writeToList](newTable); |
| 3033 this[_table] = newTable; | 3191 this[_table] = newTable; |
| 3034 this[_head] = 0; | 3192 this[_head] = 0; |
| 3035 } | 3193 } |
| 3036 } | 3194 } |
| 3037 ListQueue[dart.implements] = () => [Queue$(E)]; | 3195 ListQueue[dart.implements] = () => [Queue$(E)]; |
| 3196 dart.defineExtensionMembers(ListQueue, [ |
| 3197 'forEach', |
| 3198 'elementAt', |
| 3199 'toList', |
| 3200 'iterator', |
| 3201 'isEmpty', |
| 3202 'length', |
| 3203 'first', |
| 3204 'last', |
| 3205 'single' |
| 3206 ]); |
| 3038 dart.setSignature(ListQueue, { | 3207 dart.setSignature(ListQueue, { |
| 3039 constructors: () => ({ | 3208 constructors: () => ({ |
| 3040 ListQueue: [ListQueue$(E), [], [core.int]], | 3209 ListQueue: [ListQueue$(E), [], [core.int]], |
| 3041 from: [ListQueue$(E), [core.Iterable]] | 3210 from: [ListQueue$(E), [core.Iterable]] |
| 3042 }), | 3211 }), |
| 3043 methods: () => ({ | 3212 methods: () => ({ |
| 3044 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 3213 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 3045 [core.$elementAt]: [E, [core.int]], | 3214 elementAt: [E, [core.int]], |
| 3046 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 3215 toList: [core.List$(E), [], {growable: core.bool}], |
| 3047 add: [dart.void, [E]], | 3216 add: [dart.void, [E]], |
| 3048 addAll: [dart.void, [core.Iterable$(E)]], | 3217 addAll: [dart.void, [core.Iterable$(E)]], |
| 3049 remove: [core.bool, [core.Object]], | 3218 remove: [core.bool, [core.Object]], |
| 3050 [_filterWhere]: [dart.void, [dart.functionType(core.bool, [E]), core.boo
l]], | 3219 [_filterWhere]: [dart.void, [dart.functionType(core.bool, [E]), core.boo
l]], |
| 3051 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 3220 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| 3052 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 3221 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| 3053 clear: [dart.void, []], | 3222 clear: [dart.void, []], |
| 3054 addLast: [dart.void, [E]], | 3223 addLast: [dart.void, [E]], |
| 3055 addFirst: [dart.void, [E]], | 3224 addFirst: [dart.void, [E]], |
| 3056 removeFirst: [E, []], | 3225 removeFirst: [E, []], |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3086 } | 3255 } |
| 3087 get current() { | 3256 get current() { |
| 3088 return this[_current]; | 3257 return this[_current]; |
| 3089 } | 3258 } |
| 3090 moveNext() { | 3259 moveNext() { |
| 3091 this[_queue][_checkModification](this[_modificationCount]); | 3260 this[_queue][_checkModification](this[_modificationCount]); |
| 3092 if (this[_position] == this[_end]) { | 3261 if (this[_position] == this[_end]) { |
| 3093 this[_current] = null; | 3262 this[_current] = null; |
| 3094 return false; | 3263 return false; |
| 3095 } | 3264 } |
| 3096 this[_current] = dart.as(this[_queue][_table][core.$get](this[_position]
), E); | 3265 this[_current] = dart.as(this[_queue][_table][dartx.get](this[_position]
), E); |
| 3097 this[_position] = dart.notNull(this[_position]) + 1 & dart.notNull(this[
_queue][_table][core.$length]) - 1; | 3266 this[_position] = dart.notNull(this[_position]) + 1 & dart.notNull(this[
_queue][_table].length) - 1; |
| 3098 return true; | 3267 return true; |
| 3099 } | 3268 } |
| 3100 } | 3269 } |
| 3101 _ListQueueIterator[dart.implements] = () => [core.Iterator$(E)]; | 3270 _ListQueueIterator[dart.implements] = () => [core.Iterator$(E)]; |
| 3102 dart.setSignature(_ListQueueIterator, { | 3271 dart.setSignature(_ListQueueIterator, { |
| 3103 constructors: () => ({_ListQueueIterator: [_ListQueueIterator$(E), [ListQu
eue]]}), | 3272 constructors: () => ({_ListQueueIterator: [_ListQueueIterator$(E), [ListQu
eue]]}), |
| 3104 methods: () => ({moveNext: [core.bool, []]}) | 3273 methods: () => ({moveNext: [core.bool, []]}) |
| 3105 }); | 3274 }); |
| 3106 return _ListQueueIterator; | 3275 return _ListQueueIterator; |
| 3107 }); | 3276 }); |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3550 let SplayTreeMap = SplayTreeMap$(); | 3719 let SplayTreeMap = SplayTreeMap$(); |
| 3551 let _workList = Symbol('_workList'); | 3720 let _workList = Symbol('_workList'); |
| 3552 let _tree = Symbol('_tree'); | 3721 let _tree = Symbol('_tree'); |
| 3553 let _currentNode = Symbol('_currentNode'); | 3722 let _currentNode = Symbol('_currentNode'); |
| 3554 let _findLeftMostDescendent = Symbol('_findLeftMostDescendent'); | 3723 let _findLeftMostDescendent = Symbol('_findLeftMostDescendent'); |
| 3555 let _getValue = Symbol('_getValue'); | 3724 let _getValue = Symbol('_getValue'); |
| 3556 let _rebuildWorkList = Symbol('_rebuildWorkList'); | 3725 let _rebuildWorkList = Symbol('_rebuildWorkList'); |
| 3557 let _SplayTreeIterator$ = dart.generic(function(T) { | 3726 let _SplayTreeIterator$ = dart.generic(function(T) { |
| 3558 class _SplayTreeIterator extends core.Object { | 3727 class _SplayTreeIterator extends core.Object { |
| 3559 _SplayTreeIterator(tree) { | 3728 _SplayTreeIterator(tree) { |
| 3560 this[_workList] = dart.setType([], core.List$(_SplayTreeNode)); | 3729 this[_workList] = dart.list([], _SplayTreeNode); |
| 3561 this[_tree] = tree; | 3730 this[_tree] = tree; |
| 3562 this[_modificationCount] = tree[_modificationCount]; | 3731 this[_modificationCount] = tree[_modificationCount]; |
| 3563 this[_splayCount] = tree[_splayCount]; | 3732 this[_splayCount] = tree[_splayCount]; |
| 3564 this[_currentNode] = null; | 3733 this[_currentNode] = null; |
| 3565 this[_findLeftMostDescendent](tree[_root]); | 3734 this[_findLeftMostDescendent](tree[_root]); |
| 3566 } | 3735 } |
| 3567 startAt(tree, startKey) { | 3736 startAt(tree, startKey) { |
| 3568 this[_workList] = dart.setType([], core.List$(_SplayTreeNode)); | 3737 this[_workList] = dart.list([], _SplayTreeNode); |
| 3569 this[_tree] = tree; | 3738 this[_tree] = tree; |
| 3570 this[_modificationCount] = tree[_modificationCount]; | 3739 this[_modificationCount] = tree[_modificationCount]; |
| 3571 this[_splayCount] = null; | 3740 this[_splayCount] = null; |
| 3572 this[_currentNode] = null; | 3741 this[_currentNode] = null; |
| 3573 if (tree[_root] == null) | 3742 if (tree[_root] == null) |
| 3574 return; | 3743 return; |
| 3575 let compare = tree[_splay](startKey); | 3744 let compare = tree[_splay](startKey); |
| 3576 this[_splayCount] = tree[_splayCount]; | 3745 this[_splayCount] = tree[_splayCount]; |
| 3577 if (dart.notNull(compare) < 0) { | 3746 if (dart.notNull(compare) < 0) { |
| 3578 this[_findLeftMostDescendent](tree[_root].right); | 3747 this[_findLeftMostDescendent](tree[_root].right); |
| 3579 } else { | 3748 } else { |
| 3580 this[_workList][core.$add](tree[_root]); | 3749 this[_workList][dartx.add](tree[_root]); |
| 3581 } | 3750 } |
| 3582 } | 3751 } |
| 3583 get current() { | 3752 get current() { |
| 3584 if (this[_currentNode] == null) | 3753 if (this[_currentNode] == null) |
| 3585 return null; | 3754 return null; |
| 3586 return this[_getValue](dart.as(this[_currentNode], _SplayTreeMapNode)); | 3755 return this[_getValue](dart.as(this[_currentNode], _SplayTreeMapNode)); |
| 3587 } | 3756 } |
| 3588 [_findLeftMostDescendent](node) { | 3757 [_findLeftMostDescendent](node) { |
| 3589 while (node != null) { | 3758 while (node != null) { |
| 3590 this[_workList][core.$add](node); | 3759 this[_workList][dartx.add](node); |
| 3591 node = node.left; | 3760 node = node.left; |
| 3592 } | 3761 } |
| 3593 } | 3762 } |
| 3594 [_rebuildWorkList](currentNode) { | 3763 [_rebuildWorkList](currentNode) { |
| 3595 dart.assert(!dart.notNull(this[_workList][core.$isEmpty])); | 3764 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); |
| 3596 this[_workList][core.$clear](); | 3765 this[_workList][dartx.clear](); |
| 3597 if (currentNode == null) { | 3766 if (currentNode == null) { |
| 3598 this[_findLeftMostDescendent](this[_tree][_root]); | 3767 this[_findLeftMostDescendent](this[_tree][_root]); |
| 3599 } else { | 3768 } else { |
| 3600 this[_tree][_splay](currentNode.key); | 3769 this[_tree][_splay](currentNode.key); |
| 3601 this[_findLeftMostDescendent](this[_tree][_root].right); | 3770 this[_findLeftMostDescendent](this[_tree][_root].right); |
| 3602 dart.assert(!dart.notNull(this[_workList][core.$isEmpty])); | 3771 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); |
| 3603 } | 3772 } |
| 3604 } | 3773 } |
| 3605 moveNext() { | 3774 moveNext() { |
| 3606 if (this[_modificationCount] != this[_tree][_modificationCount]) { | 3775 if (this[_modificationCount] != this[_tree][_modificationCount]) { |
| 3607 throw new core.ConcurrentModificationError(this[_tree]); | 3776 throw new core.ConcurrentModificationError(this[_tree]); |
| 3608 } | 3777 } |
| 3609 if (this[_workList][core.$isEmpty]) { | 3778 if (this[_workList][dartx.isEmpty]) { |
| 3610 this[_currentNode] = null; | 3779 this[_currentNode] = null; |
| 3611 return false; | 3780 return false; |
| 3612 } | 3781 } |
| 3613 if (this[_tree][_splayCount] != this[_splayCount] && dart.notNull(this[_
currentNode] != null)) { | 3782 if (this[_tree][_splayCount] != this[_splayCount] && dart.notNull(this[_
currentNode] != null)) { |
| 3614 this[_rebuildWorkList](this[_currentNode]); | 3783 this[_rebuildWorkList](this[_currentNode]); |
| 3615 } | 3784 } |
| 3616 this[_currentNode] = this[_workList][core.$removeLast](); | 3785 this[_currentNode] = this[_workList][dartx.removeLast](); |
| 3617 this[_findLeftMostDescendent](this[_currentNode].right); | 3786 this[_findLeftMostDescendent](this[_currentNode].right); |
| 3618 return true; | 3787 return true; |
| 3619 } | 3788 } |
| 3620 } | 3789 } |
| 3621 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)]; | 3790 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)]; |
| 3622 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt'); | 3791 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt'); |
| 3623 dart.setSignature(_SplayTreeIterator, { | 3792 dart.setSignature(_SplayTreeIterator, { |
| 3624 constructors: () => ({ | 3793 constructors: () => ({ |
| 3625 _SplayTreeIterator: [_SplayTreeIterator$(T), [_SplayTree]], | 3794 _SplayTreeIterator: [_SplayTreeIterator$(T), [_SplayTree]], |
| 3626 startAt: [_SplayTreeIterator$(T), [_SplayTree, core.Object]] | 3795 startAt: [_SplayTreeIterator$(T), [_SplayTree, core.Object]] |
| 3627 }), | 3796 }), |
| 3628 methods: () => ({ | 3797 methods: () => ({ |
| 3629 [_findLeftMostDescendent]: [dart.void, [_SplayTreeNode]], | 3798 [_findLeftMostDescendent]: [dart.void, [_SplayTreeNode]], |
| 3630 [_rebuildWorkList]: [dart.void, [_SplayTreeNode]], | 3799 [_rebuildWorkList]: [dart.void, [_SplayTreeNode]], |
| 3631 moveNext: [core.bool, []] | 3800 moveNext: [core.bool, []] |
| 3632 }) | 3801 }) |
| 3633 }); | 3802 }); |
| 3634 return _SplayTreeIterator; | 3803 return _SplayTreeIterator; |
| 3635 }); | 3804 }); |
| 3636 let _SplayTreeIterator = _SplayTreeIterator$(); | 3805 let _SplayTreeIterator = _SplayTreeIterator$(); |
| 3637 let _copyNode = Symbol('_copyNode'); | 3806 let _copyNode = Symbol('_copyNode'); |
| 3638 let _SplayTreeKeyIterable$ = dart.generic(function(K) { | 3807 let _SplayTreeKeyIterable$ = dart.generic(function(K) { |
| 3639 class _SplayTreeKeyIterable extends IterableBase$(K) { | 3808 class _SplayTreeKeyIterable extends IterableBase$(K) { |
| 3640 _SplayTreeKeyIterable(tree) { | 3809 _SplayTreeKeyIterable(tree) { |
| 3641 this[_tree] = tree; | 3810 this[_tree] = tree; |
| 3642 super.IterableBase(); | 3811 super.IterableBase(); |
| 3643 } | 3812 } |
| 3644 get [core.$length]() { | 3813 get length() { |
| 3645 return this[_tree][_count]; | 3814 return this[_tree][_count]; |
| 3646 } | 3815 } |
| 3647 get [core.$isEmpty]() { | 3816 get isEmpty() { |
| 3648 return this[_tree][_count] == 0; | 3817 return this[_tree][_count] == 0; |
| 3649 } | 3818 } |
| 3650 get [core.$iterator]() { | 3819 get iterator() { |
| 3651 return new (_SplayTreeKeyIterator$(K))(this[_tree]); | 3820 return new (_SplayTreeKeyIterator$(K))(this[_tree]); |
| 3652 } | 3821 } |
| 3653 [core.$toSet]() { | 3822 toSet() { |
| 3654 let setOrMap = this[_tree]; | 3823 let setOrMap = this[_tree]; |
| 3655 let set = new (SplayTreeSet$(K))(dart.as(setOrMap[_comparator], __CastTy
pe0), dart.as(setOrMap[_validKey], __CastType3)); | 3824 let set = new (SplayTreeSet$(K))(dart.as(setOrMap[_comparator], __CastTy
pe0), dart.as(setOrMap[_validKey], __CastType3)); |
| 3656 set[_count] = this[_tree][_count]; | 3825 set[_count] = this[_tree][_count]; |
| 3657 set[_root] = set[_copyNode](this[_tree][_root]); | 3826 set[_root] = set[_copyNode](this[_tree][_root]); |
| 3658 return set; | 3827 return set; |
| 3659 } | 3828 } |
| 3660 } | 3829 } |
| 3661 _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength]; | 3830 _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength]; |
| 3831 dart.defineExtensionMembers(_SplayTreeKeyIterable, ['toSet', 'length', 'isEm
pty', 'iterator']); |
| 3662 dart.setSignature(_SplayTreeKeyIterable, { | 3832 dart.setSignature(_SplayTreeKeyIterable, { |
| 3663 constructors: () => ({_SplayTreeKeyIterable: [_SplayTreeKeyIterable$(K), [
_SplayTree$(K)]]}), | 3833 constructors: () => ({_SplayTreeKeyIterable: [_SplayTreeKeyIterable$(K), [
_SplayTree$(K)]]}), |
| 3664 methods: () => ({[core.$toSet]: [core.Set$(K), []]}) | 3834 methods: () => ({toSet: [core.Set$(K), []]}) |
| 3665 }); | 3835 }); |
| 3666 return _SplayTreeKeyIterable; | 3836 return _SplayTreeKeyIterable; |
| 3667 }); | 3837 }); |
| 3668 let _SplayTreeKeyIterable = _SplayTreeKeyIterable$(); | 3838 let _SplayTreeKeyIterable = _SplayTreeKeyIterable$(); |
| 3669 let _SplayTreeValueIterable$ = dart.generic(function(K, V) { | 3839 let _SplayTreeValueIterable$ = dart.generic(function(K, V) { |
| 3670 class _SplayTreeValueIterable extends IterableBase$(V) { | 3840 class _SplayTreeValueIterable extends IterableBase$(V) { |
| 3671 _SplayTreeValueIterable(map) { | 3841 _SplayTreeValueIterable(map) { |
| 3672 this[_map] = map; | 3842 this[_map] = map; |
| 3673 super.IterableBase(); | 3843 super.IterableBase(); |
| 3674 } | 3844 } |
| 3675 get [core.$length]() { | 3845 get length() { |
| 3676 return this[_map][_count]; | 3846 return this[_map][_count]; |
| 3677 } | 3847 } |
| 3678 get [core.$isEmpty]() { | 3848 get isEmpty() { |
| 3679 return this[_map][_count] == 0; | 3849 return this[_map][_count] == 0; |
| 3680 } | 3850 } |
| 3681 get [core.$iterator]() { | 3851 get iterator() { |
| 3682 return new (_SplayTreeValueIterator$(K, V))(this[_map]); | 3852 return new (_SplayTreeValueIterator$(K, V))(this[_map]); |
| 3683 } | 3853 } |
| 3684 } | 3854 } |
| 3685 _SplayTreeValueIterable[dart.implements] = () => [_internal.EfficientLength]
; | 3855 _SplayTreeValueIterable[dart.implements] = () => [_internal.EfficientLength]
; |
| 3856 dart.defineExtensionMembers(_SplayTreeValueIterable, ['length', 'isEmpty', '
iterator']); |
| 3686 dart.setSignature(_SplayTreeValueIterable, { | 3857 dart.setSignature(_SplayTreeValueIterable, { |
| 3687 constructors: () => ({_SplayTreeValueIterable: [_SplayTreeValueIterable$(K
, V), [SplayTreeMap$(K, V)]]}) | 3858 constructors: () => ({_SplayTreeValueIterable: [_SplayTreeValueIterable$(K
, V), [SplayTreeMap$(K, V)]]}) |
| 3688 }); | 3859 }); |
| 3689 return _SplayTreeValueIterable; | 3860 return _SplayTreeValueIterable; |
| 3690 }); | 3861 }); |
| 3691 let _SplayTreeValueIterable = _SplayTreeValueIterable$(); | 3862 let _SplayTreeValueIterable = _SplayTreeValueIterable$(); |
| 3692 let _SplayTreeKeyIterator$ = dart.generic(function(K) { | 3863 let _SplayTreeKeyIterator$ = dart.generic(function(K) { |
| 3693 class _SplayTreeKeyIterator extends _SplayTreeIterator$(K) { | 3864 class _SplayTreeKeyIterator extends _SplayTreeIterator$(K) { |
| 3694 _SplayTreeKeyIterator(map) { | 3865 _SplayTreeKeyIterator(map) { |
| 3695 super._SplayTreeIterator(map); | 3866 super._SplayTreeIterator(map); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3765 for (let element of dart.as(elements, core.Iterable$(E))) { | 3936 for (let element of dart.as(elements, core.Iterable$(E))) { |
| 3766 result.add(element); | 3937 result.add(element); |
| 3767 } | 3938 } |
| 3768 return result; | 3939 return result; |
| 3769 } | 3940 } |
| 3770 [_compare](e1, e2) { | 3941 [_compare](e1, e2) { |
| 3771 dart.as(e1, E); | 3942 dart.as(e1, E); |
| 3772 dart.as(e2, E); | 3943 dart.as(e2, E); |
| 3773 return this[_comparator](e1, e2); | 3944 return this[_comparator](e1, e2); |
| 3774 } | 3945 } |
| 3775 get [core.$iterator]() { | 3946 get iterator() { |
| 3776 return new (_SplayTreeKeyIterator$(E))(this); | 3947 return new (_SplayTreeKeyIterator$(E))(this); |
| 3777 } | 3948 } |
| 3778 get [core.$length]() { | 3949 get length() { |
| 3779 return this[_count]; | 3950 return this[_count]; |
| 3780 } | 3951 } |
| 3781 get [core.$isEmpty]() { | 3952 get isEmpty() { |
| 3782 return this[_root] == null; | 3953 return this[_root] == null; |
| 3783 } | 3954 } |
| 3784 get [core.$isNotEmpty]() { | 3955 get isNotEmpty() { |
| 3785 return this[_root] != null; | 3956 return this[_root] != null; |
| 3786 } | 3957 } |
| 3787 get [core.$first]() { | 3958 get first() { |
| 3788 if (this[_count] == 0) | 3959 if (this[_count] == 0) |
| 3789 throw _internal.IterableElementError.noElement(); | 3960 throw _internal.IterableElementError.noElement(); |
| 3790 return dart.as(this[_first].key, E); | 3961 return dart.as(this[_first].key, E); |
| 3791 } | 3962 } |
| 3792 get [core.$last]() { | 3963 get last() { |
| 3793 if (this[_count] == 0) | 3964 if (this[_count] == 0) |
| 3794 throw _internal.IterableElementError.noElement(); | 3965 throw _internal.IterableElementError.noElement(); |
| 3795 return dart.as(this[_last].key, E); | 3966 return dart.as(this[_last].key, E); |
| 3796 } | 3967 } |
| 3797 get [core.$single]() { | 3968 get single() { |
| 3798 if (this[_count] == 0) | 3969 if (this[_count] == 0) |
| 3799 throw _internal.IterableElementError.noElement(); | 3970 throw _internal.IterableElementError.noElement(); |
| 3800 if (dart.notNull(this[_count]) > 1) | 3971 if (dart.notNull(this[_count]) > 1) |
| 3801 throw _internal.IterableElementError.tooMany(); | 3972 throw _internal.IterableElementError.tooMany(); |
| 3802 return this[_root].key; | 3973 return this[_root].key; |
| 3803 } | 3974 } |
| 3804 [core.$contains](object) { | 3975 contains(object) { |
| 3805 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj
ect, E)) == 0; | 3976 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj
ect, E)) == 0; |
| 3806 } | 3977 } |
| 3807 add(element) { | 3978 add(element) { |
| 3808 dart.as(element, E); | 3979 dart.as(element, E); |
| 3809 let compare = this[_splay](element); | 3980 let compare = this[_splay](element); |
| 3810 if (compare == 0) | 3981 if (compare == 0) |
| 3811 return false; | 3982 return false; |
| 3812 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); | 3983 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); |
| 3813 return true; | 3984 return true; |
| 3814 } | 3985 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3852 if (!dart.notNull(this[_validKey](object))) | 4023 if (!dart.notNull(this[_validKey](object))) |
| 3853 return null; | 4024 return null; |
| 3854 let comp = this[_splay](dart.as(object, E)); | 4025 let comp = this[_splay](dart.as(object, E)); |
| 3855 if (comp != 0) | 4026 if (comp != 0) |
| 3856 return null; | 4027 return null; |
| 3857 return this[_root].key; | 4028 return this[_root].key; |
| 3858 } | 4029 } |
| 3859 intersection(other) { | 4030 intersection(other) { |
| 3860 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 4031 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
| 3861 for (let element of this) { | 4032 for (let element of this) { |
| 3862 if (other[core.$contains](element)) | 4033 if (other.contains(element)) |
| 3863 result.add(element); | 4034 result.add(element); |
| 3864 } | 4035 } |
| 3865 return result; | 4036 return result; |
| 3866 } | 4037 } |
| 3867 difference(other) { | 4038 difference(other) { |
| 3868 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 4039 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
| 3869 for (let element of this) { | 4040 for (let element of this) { |
| 3870 if (!dart.notNull(other[core.$contains](element))) | 4041 if (!dart.notNull(other.contains(element))) |
| 3871 result.add(element); | 4042 result.add(element); |
| 3872 } | 4043 } |
| 3873 return result; | 4044 return result; |
| 3874 } | 4045 } |
| 3875 union(other) { | 4046 union(other) { |
| 3876 dart.as(other, core.Set$(E)); | 4047 dart.as(other, core.Set$(E)); |
| 3877 let _ = this[_clone](); | 4048 let _ = this[_clone](); |
| 3878 _.addAll(other); | 4049 _.addAll(other); |
| 3879 return _; | 4050 return _; |
| 3880 } | 4051 } |
| 3881 [_clone]() { | 4052 [_clone]() { |
| 3882 let set = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 4053 let set = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
| 3883 set[_count] = this[_count]; | 4054 set[_count] = this[_count]; |
| 3884 set[_root] = this[_copyNode](this[_root]); | 4055 set[_root] = this[_copyNode](this[_root]); |
| 3885 return set; | 4056 return set; |
| 3886 } | 4057 } |
| 3887 [_copyNode](node) { | 4058 [_copyNode](node) { |
| 3888 dart.as(node, _SplayTreeNode$(E)); | 4059 dart.as(node, _SplayTreeNode$(E)); |
| 3889 if (node == null) | 4060 if (node == null) |
| 3890 return null; | 4061 return null; |
| 3891 let _ = new (_SplayTreeNode$(E))(node.key); | 4062 let _ = new (_SplayTreeNode$(E))(node.key); |
| 3892 _.left = this[_copyNode](node.left); | 4063 _.left = this[_copyNode](node.left); |
| 3893 _.right = this[_copyNode](node.right); | 4064 _.right = this[_copyNode](node.right); |
| 3894 return _; | 4065 return _; |
| 3895 } | 4066 } |
| 3896 clear() { | 4067 clear() { |
| 3897 this[_clear](); | 4068 this[_clear](); |
| 3898 } | 4069 } |
| 3899 [core.$toSet]() { | 4070 toSet() { |
| 3900 return this[_clone](); | 4071 return this[_clone](); |
| 3901 } | 4072 } |
| 3902 toString() { | 4073 toString() { |
| 3903 return IterableBase.iterableToFullString(this, '{', '}'); | 4074 return IterableBase.iterableToFullString(this, '{', '}'); |
| 3904 } | 4075 } |
| 3905 } | 4076 } |
| 3906 dart.setSignature(SplayTreeSet, { | 4077 dart.setSignature(SplayTreeSet, { |
| 3907 constructors: () => ({ | 4078 constructors: () => ({ |
| 3908 SplayTreeSet: [SplayTreeSet$(E), [], [dart.functionType(core.int, [E, E]
), dart.functionType(core.bool, [core.Object])]], | 4079 SplayTreeSet: [SplayTreeSet$(E), [], [dart.functionType(core.int, [E, E]
), dart.functionType(core.bool, [core.Object])]], |
| 3909 from: [SplayTreeSet$(E), [core.Iterable], [dart.functionType(core.int, [
E, E]), dart.functionType(core.bool, [core.Object])]] | 4080 from: [SplayTreeSet$(E), [core.Iterable], [dart.functionType(core.int, [
E, E]), dart.functionType(core.bool, [core.Object])]] |
| 3910 }), | 4081 }), |
| 3911 methods: () => ({ | 4082 methods: () => ({ |
| 3912 [_compare]: [core.int, [E, E]], | 4083 [_compare]: [core.int, [E, E]], |
| 3913 [core.$contains]: [core.bool, [core.Object]], | 4084 contains: [core.bool, [core.Object]], |
| 3914 add: [core.bool, [E]], | 4085 add: [core.bool, [E]], |
| 3915 remove: [core.bool, [core.Object]], | 4086 remove: [core.bool, [core.Object]], |
| 3916 addAll: [dart.void, [core.Iterable$(E)]], | 4087 addAll: [dart.void, [core.Iterable$(E)]], |
| 3917 lookup: [E, [core.Object]], | 4088 lookup: [E, [core.Object]], |
| 3918 intersection: [core.Set$(E), [core.Set$(core.Object)]], | 4089 intersection: [core.Set$(E), [core.Set$(core.Object)]], |
| 3919 difference: [core.Set$(E), [core.Set$(core.Object)]], | 4090 difference: [core.Set$(E), [core.Set$(core.Object)]], |
| 3920 union: [core.Set$(E), [core.Set$(E)]], | 4091 union: [core.Set$(E), [core.Set$(E)]], |
| 3921 [_clone]: [SplayTreeSet$(E), []], | 4092 [_clone]: [SplayTreeSet$(E), []], |
| 3922 [_copyNode]: [_SplayTreeNode$(E), [_SplayTreeNode$(E)]], | 4093 [_copyNode]: [_SplayTreeNode$(E), [_SplayTreeNode$(E)]], |
| 3923 [core.$toSet]: [core.Set$(E), []] | 4094 toSet: [core.Set$(E), []] |
| 3924 }) | 4095 }) |
| 3925 }); | 4096 }); |
| 3926 return SplayTreeSet; | 4097 return SplayTreeSet; |
| 3927 }); | 4098 }); |
| 3928 let SplayTreeSet = SplayTreeSet$(); | 4099 let SplayTreeSet = SplayTreeSet$(); |
| 3929 let __CastType0$ = dart.generic(function(K) { | 4100 let __CastType0$ = dart.generic(function(K) { |
| 3930 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.i
nt, [K, K])); | 4101 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.i
nt, [K, K])); |
| 3931 return __CastType0; | 4102 return __CastType0; |
| 3932 }); | 4103 }); |
| 3933 let __CastType0 = __CastType0$(); | 4104 let __CastType0 = __CastType0$(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3980 } | 4151 } |
| 3981 } | 4152 } |
| 3982 [_containsKey](key) { | 4153 [_containsKey](key) { |
| 3983 let rest = this[_rest]; | 4154 let rest = this[_rest]; |
| 3984 if (rest == null) | 4155 if (rest == null) |
| 3985 return false; | 4156 return false; |
| 3986 let bucket = this[_getBucket](rest, key); | 4157 let bucket = this[_getBucket](rest, key); |
| 3987 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 4158 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
| 3988 } | 4159 } |
| 3989 containsValue(value) { | 4160 containsValue(value) { |
| 3990 return this[_computeKeys]()[core.$any](dart.fn(each => dart.equals(this.
get(each), value), core.bool, [core.Object])); | 4161 return this[_computeKeys]()[dartx.any](dart.fn(each => dart.equals(this.
get(each), value), core.bool, [core.Object])); |
| 3991 } | 4162 } |
| 3992 addAll(other) { | 4163 addAll(other) { |
| 3993 dart.as(other, core.Map$(K, V)); | 4164 dart.as(other, core.Map$(K, V)); |
| 3994 other.forEach(dart.fn((key, value) => { | 4165 other.forEach(dart.fn((key, value) => { |
| 3995 dart.as(key, K); | 4166 dart.as(key, K); |
| 3996 dart.as(value, V); | 4167 dart.as(value, V); |
| 3997 this.set(key, value); | 4168 this.set(key, value); |
| 3998 }, core.Object, [K, V])); | 4169 }, core.Object, [K, V])); |
| 3999 } | 4170 } |
| 4000 get(key) { | 4171 get(key) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4088 } | 4259 } |
| 4089 clear() { | 4260 clear() { |
| 4090 if (dart.notNull(this[_length]) > 0) { | 4261 if (dart.notNull(this[_length]) > 0) { |
| 4091 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; | 4262 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; |
| 4092 this[_length] = 0; | 4263 this[_length] = 0; |
| 4093 } | 4264 } |
| 4094 } | 4265 } |
| 4095 forEach(action) { | 4266 forEach(action) { |
| 4096 dart.as(action, dart.functionType(dart.void, [K, V])); | 4267 dart.as(action, dart.functionType(dart.void, [K, V])); |
| 4097 let keys = this[_computeKeys](); | 4268 let keys = this[_computeKeys](); |
| 4098 for (let i = 0, length = keys[core.$length]; dart.notNull(i) < dart.notN
ull(length); i = dart.notNull(i) + 1) { | 4269 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len
gth); i = dart.notNull(i) + 1) { |
| 4099 let key = keys[i]; | 4270 let key = keys[i]; |
| 4100 action(dart.as(key, K), this.get(key)); | 4271 action(dart.as(key, K), this.get(key)); |
| 4101 if (keys !== this[_keys]) { | 4272 if (keys !== this[_keys]) { |
| 4102 throw new core.ConcurrentModificationError(this); | 4273 throw new core.ConcurrentModificationError(this); |
| 4103 } | 4274 } |
| 4104 } | 4275 } |
| 4105 } | 4276 } |
| 4106 [_computeKeys]() { | 4277 [_computeKeys]() { |
| 4107 if (this[_keys] != null) | 4278 if (this[_keys] != null) |
| 4108 return this[_keys]; | 4279 return this[_keys]; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4332 }); | 4503 }); |
| 4333 return _CustomHashMap; | 4504 return _CustomHashMap; |
| 4334 }); | 4505 }); |
| 4335 let _CustomHashMap = _CustomHashMap$(); | 4506 let _CustomHashMap = _CustomHashMap$(); |
| 4336 let HashMapKeyIterable$ = dart.generic(function(E) { | 4507 let HashMapKeyIterable$ = dart.generic(function(E) { |
| 4337 class HashMapKeyIterable extends IterableBase$(E) { | 4508 class HashMapKeyIterable extends IterableBase$(E) { |
| 4338 HashMapKeyIterable(map) { | 4509 HashMapKeyIterable(map) { |
| 4339 this[_map] = map; | 4510 this[_map] = map; |
| 4340 super.IterableBase(); | 4511 super.IterableBase(); |
| 4341 } | 4512 } |
| 4342 get [core.$length]() { | 4513 get length() { |
| 4343 return dart.as(dart.dload(this[_map], _length), core.int); | 4514 return dart.as(dart.dload(this[_map], _length), core.int); |
| 4344 } | 4515 } |
| 4345 get [core.$isEmpty]() { | 4516 get isEmpty() { |
| 4346 return dart.equals(dart.dload(this[_map], _length), 0); | 4517 return dart.equals(dart.dload(this[_map], _length), 0); |
| 4347 } | 4518 } |
| 4348 get [core.$iterator]() { | 4519 get iterator() { |
| 4349 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[
_map], _computeKeys), core.List)); | 4520 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[
_map], _computeKeys), core.List)); |
| 4350 } | 4521 } |
| 4351 [core.$contains](element) { | 4522 contains(element) { |
| 4352 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); | 4523 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); |
| 4353 } | 4524 } |
| 4354 [core.$forEach](f) { | 4525 forEach(f) { |
| 4355 dart.as(f, dart.functionType(dart.void, [E])); | 4526 dart.as(f, dart.functionType(dart.void, [E])); |
| 4356 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List); | 4527 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List); |
| 4357 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len
gth); i = dart.notNull(i) + 1) { | 4528 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len
gth); i = dart.notNull(i) + 1) { |
| 4358 f(dart.as(keys[i], E)); | 4529 f(dart.as(keys[i], E)); |
| 4359 if (keys !== dart.dload(this[_map], _keys)) { | 4530 if (keys !== dart.dload(this[_map], _keys)) { |
| 4360 throw new core.ConcurrentModificationError(this[_map]); | 4531 throw new core.ConcurrentModificationError(this[_map]); |
| 4361 } | 4532 } |
| 4362 } | 4533 } |
| 4363 } | 4534 } |
| 4364 } | 4535 } |
| 4365 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; | 4536 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; |
| 4537 dart.defineExtensionMembers(HashMapKeyIterable, [ |
| 4538 'contains', |
| 4539 'forEach', |
| 4540 'length', |
| 4541 'isEmpty', |
| 4542 'iterator' |
| 4543 ]); |
| 4366 dart.setSignature(HashMapKeyIterable, { | 4544 dart.setSignature(HashMapKeyIterable, { |
| 4367 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [core.O
bject]]}), | 4545 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [core.O
bject]]}), |
| 4368 methods: () => ({[core.$forEach]: [dart.void, [dart.functionType(dart.void
, [E])]]}) | 4546 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]]
}) |
| 4369 }); | 4547 }); |
| 4370 return HashMapKeyIterable; | 4548 return HashMapKeyIterable; |
| 4371 }); | 4549 }); |
| 4372 let HashMapKeyIterable = HashMapKeyIterable$(); | 4550 let HashMapKeyIterable = HashMapKeyIterable$(); |
| 4373 let _offset = Symbol('_offset'); | 4551 let _offset = Symbol('_offset'); |
| 4374 let HashMapKeyIterator$ = dart.generic(function(E) { | 4552 let HashMapKeyIterator$ = dart.generic(function(E) { |
| 4375 class HashMapKeyIterator extends core.Object { | 4553 class HashMapKeyIterator extends core.Object { |
| 4376 HashMapKeyIterator(map, keys) { | 4554 HashMapKeyIterator(map, keys) { |
| 4377 this[_map] = map; | 4555 this[_map] = map; |
| 4378 this[_keys] = keys; | 4556 this[_keys] = keys; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4455 } | 4633 } |
| 4456 } | 4634 } |
| 4457 [_containsKey](key) { | 4635 [_containsKey](key) { |
| 4458 let rest = this[_rest]; | 4636 let rest = this[_rest]; |
| 4459 if (rest == null) | 4637 if (rest == null) |
| 4460 return false; | 4638 return false; |
| 4461 let bucket = this[_getBucket](rest, key); | 4639 let bucket = this[_getBucket](rest, key); |
| 4462 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 4640 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
| 4463 } | 4641 } |
| 4464 containsValue(value) { | 4642 containsValue(value) { |
| 4465 return this.keys[core.$any](dart.fn(each => dart.equals(this.get(each),
value), core.bool, [core.Object])); | 4643 return this.keys[dartx.any](dart.fn(each => dart.equals(this.get(each),
value), core.bool, [core.Object])); |
| 4466 } | 4644 } |
| 4467 addAll(other) { | 4645 addAll(other) { |
| 4468 dart.as(other, core.Map$(K, V)); | 4646 dart.as(other, core.Map$(K, V)); |
| 4469 other.forEach(dart.fn((key, value) => { | 4647 other.forEach(dart.fn((key, value) => { |
| 4470 dart.as(key, K); | 4648 dart.as(key, K); |
| 4471 dart.as(value, V); | 4649 dart.as(value, V); |
| 4472 this.set(key, value); | 4650 this.set(key, value); |
| 4473 }, core.Object, [K, V])); | 4651 }, core.Object, [K, V])); |
| 4474 } | 4652 } |
| 4475 get(key) { | 4653 get(key) { |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4815 } | 4993 } |
| 4816 dart.setSignature(LinkedHashMapCell, { | 4994 dart.setSignature(LinkedHashMapCell, { |
| 4817 constructors: () => ({LinkedHashMapCell: [LinkedHashMapCell, [core.Object, c
ore.Object]]}) | 4995 constructors: () => ({LinkedHashMapCell: [LinkedHashMapCell, [core.Object, c
ore.Object]]}) |
| 4818 }); | 4996 }); |
| 4819 let LinkedHashMapKeyIterable$ = dart.generic(function(E) { | 4997 let LinkedHashMapKeyIterable$ = dart.generic(function(E) { |
| 4820 class LinkedHashMapKeyIterable extends IterableBase$(E) { | 4998 class LinkedHashMapKeyIterable extends IterableBase$(E) { |
| 4821 LinkedHashMapKeyIterable(map) { | 4999 LinkedHashMapKeyIterable(map) { |
| 4822 this[_map] = map; | 5000 this[_map] = map; |
| 4823 super.IterableBase(); | 5001 super.IterableBase(); |
| 4824 } | 5002 } |
| 4825 get [core.$length]() { | 5003 get length() { |
| 4826 return dart.as(dart.dload(this[_map], _length), core.int); | 5004 return dart.as(dart.dload(this[_map], _length), core.int); |
| 4827 } | 5005 } |
| 4828 get [core.$isEmpty]() { | 5006 get isEmpty() { |
| 4829 return dart.equals(dart.dload(this[_map], _length), 0); | 5007 return dart.equals(dart.dload(this[_map], _length), 0); |
| 4830 } | 5008 } |
| 4831 get [core.$iterator]() { | 5009 get iterator() { |
| 4832 return new (LinkedHashMapKeyIterator$(E))(this[_map], dart.as(dart.dload
(this[_map], _modifications), core.int)); | 5010 return new (LinkedHashMapKeyIterator$(E))(this[_map], dart.as(dart.dload
(this[_map], _modifications), core.int)); |
| 4833 } | 5011 } |
| 4834 [core.$contains](element) { | 5012 contains(element) { |
| 4835 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); | 5013 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); |
| 4836 } | 5014 } |
| 4837 [core.$forEach](f) { | 5015 forEach(f) { |
| 4838 dart.as(f, dart.functionType(dart.void, [E])); | 5016 dart.as(f, dart.functionType(dart.void, [E])); |
| 4839 let cell = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell); | 5017 let cell = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell); |
| 4840 let modifications = dart.as(dart.dload(this[_map], _modifications), core
.int); | 5018 let modifications = dart.as(dart.dload(this[_map], _modifications), core
.int); |
| 4841 while (cell != null) { | 5019 while (cell != null) { |
| 4842 f(dart.as(cell[_key], E)); | 5020 f(dart.as(cell[_key], E)); |
| 4843 if (!dart.equals(modifications, dart.dload(this[_map], _modifications)
)) { | 5021 if (!dart.equals(modifications, dart.dload(this[_map], _modifications)
)) { |
| 4844 throw new core.ConcurrentModificationError(this[_map]); | 5022 throw new core.ConcurrentModificationError(this[_map]); |
| 4845 } | 5023 } |
| 4846 cell = cell[_next]; | 5024 cell = cell[_next]; |
| 4847 } | 5025 } |
| 4848 } | 5026 } |
| 4849 } | 5027 } |
| 4850 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength
]; | 5028 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength
]; |
| 5029 dart.defineExtensionMembers(LinkedHashMapKeyIterable, [ |
| 5030 'contains', |
| 5031 'forEach', |
| 5032 'length', |
| 5033 'isEmpty', |
| 5034 'iterator' |
| 5035 ]); |
| 4851 dart.setSignature(LinkedHashMapKeyIterable, { | 5036 dart.setSignature(LinkedHashMapKeyIterable, { |
| 4852 constructors: () => ({LinkedHashMapKeyIterable: [LinkedHashMapKeyIterable$
(E), [core.Object]]}), | 5037 constructors: () => ({LinkedHashMapKeyIterable: [LinkedHashMapKeyIterable$
(E), [core.Object]]}), |
| 4853 methods: () => ({[core.$forEach]: [dart.void, [dart.functionType(dart.void
, [E])]]}) | 5038 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]]
}) |
| 4854 }); | 5039 }); |
| 4855 return LinkedHashMapKeyIterable; | 5040 return LinkedHashMapKeyIterable; |
| 4856 }); | 5041 }); |
| 4857 let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$(); | 5042 let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$(); |
| 4858 let _cell = Symbol('_cell'); | 5043 let _cell = Symbol('_cell'); |
| 4859 let LinkedHashMapKeyIterator$ = dart.generic(function(E) { | 5044 let LinkedHashMapKeyIterator$ = dart.generic(function(E) { |
| 4860 class LinkedHashMapKeyIterator extends core.Object { | 5045 class LinkedHashMapKeyIterator extends core.Object { |
| 4861 LinkedHashMapKeyIterator(map, modifications) { | 5046 LinkedHashMapKeyIterator(map, modifications) { |
| 4862 this[_map] = map; | 5047 this[_map] = map; |
| 4863 this[_modifications] = modifications; | 5048 this[_modifications] = modifications; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4898 _HashSet() { | 5083 _HashSet() { |
| 4899 this[_length] = 0; | 5084 this[_length] = 0; |
| 4900 this[_strings] = null; | 5085 this[_strings] = null; |
| 4901 this[_nums] = null; | 5086 this[_nums] = null; |
| 4902 this[_rest] = null; | 5087 this[_rest] = null; |
| 4903 this[_elements] = null; | 5088 this[_elements] = null; |
| 4904 } | 5089 } |
| 4905 [_newSet]() { | 5090 [_newSet]() { |
| 4906 return new (_HashSet$(E))(); | 5091 return new (_HashSet$(E))(); |
| 4907 } | 5092 } |
| 4908 get [core.$iterator]() { | 5093 get iterator() { |
| 4909 return new (HashSetIterator$(E))(this, this[_computeElements]()); | 5094 return new (HashSetIterator$(E))(this, this[_computeElements]()); |
| 4910 } | 5095 } |
| 4911 get [core.$length]() { | 5096 get length() { |
| 4912 return this[_length]; | 5097 return this[_length]; |
| 4913 } | 5098 } |
| 4914 get [core.$isEmpty]() { | 5099 get isEmpty() { |
| 4915 return this[_length] == 0; | 5100 return this[_length] == 0; |
| 4916 } | 5101 } |
| 4917 get [core.$isNotEmpty]() { | 5102 get isNotEmpty() { |
| 4918 return !dart.notNull(this[core.$isEmpty]); | 5103 return !dart.notNull(this.isEmpty); |
| 4919 } | 5104 } |
| 4920 [core.$contains](object) { | 5105 contains(object) { |
| 4921 if (_HashSet$()._isStringElement(object)) { | 5106 if (_HashSet$()._isStringElement(object)) { |
| 4922 let strings = this[_strings]; | 5107 let strings = this[_strings]; |
| 4923 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o
bject); | 5108 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o
bject); |
| 4924 } else if (_HashSet$()._isNumericElement(object)) { | 5109 } else if (_HashSet$()._isNumericElement(object)) { |
| 4925 let nums = this[_nums]; | 5110 let nums = this[_nums]; |
| 4926 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object)
; | 5111 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object)
; |
| 4927 } else { | 5112 } else { |
| 4928 return this[_contains](object); | 5113 return this[_contains](object); |
| 4929 } | 5114 } |
| 4930 } | 5115 } |
| 4931 [_contains](object) { | 5116 [_contains](object) { |
| 4932 let rest = this[_rest]; | 5117 let rest = this[_rest]; |
| 4933 if (rest == null) | 5118 if (rest == null) |
| 4934 return false; | 5119 return false; |
| 4935 let bucket = this[_getBucket](rest, object); | 5120 let bucket = this[_getBucket](rest, object); |
| 4936 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 5121 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
| 4937 } | 5122 } |
| 4938 lookup(object) { | 5123 lookup(object) { |
| 4939 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_
HashSet$()._isNumericElement(object))) { | 5124 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_
HashSet$()._isNumericElement(object))) { |
| 4940 return dart.as(this[core.$contains](object) ? object : null, E); | 5125 return dart.as(this.contains(object) ? object : null, E); |
| 4941 } | 5126 } |
| 4942 return this[_lookup](object); | 5127 return this[_lookup](object); |
| 4943 } | 5128 } |
| 4944 [_lookup](object) { | 5129 [_lookup](object) { |
| 4945 let rest = this[_rest]; | 5130 let rest = this[_rest]; |
| 4946 if (rest == null) | 5131 if (rest == null) |
| 4947 return null; | 5132 return null; |
| 4948 let bucket = this[_getBucket](rest, object); | 5133 let bucket = this[_getBucket](rest, object); |
| 4949 let index = this[_findBucketIndex](bucket, object); | 5134 let index = this[_findBucketIndex](bucket, object); |
| 4950 if (dart.notNull(index) < 0) | 5135 if (dart.notNull(index) < 0) |
| 4951 return null; | 5136 return null; |
| 4952 return dart.as(bucket[core.$get](index), E); | 5137 return dart.as(bucket[dartx.get](index), E); |
| 4953 } | 5138 } |
| 4954 add(element) { | 5139 add(element) { |
| 4955 dart.as(element, E); | 5140 dart.as(element, E); |
| 4956 if (_HashSet$()._isStringElement(element)) { | 5141 if (_HashSet$()._isStringElement(element)) { |
| 4957 let strings = this[_strings]; | 5142 let strings = this[_strings]; |
| 4958 if (strings == null) | 5143 if (strings == null) |
| 4959 this[_strings] = strings = _HashSet$()._newHashTable(); | 5144 this[_strings] = strings = _HashSet$()._newHashTable(); |
| 4960 return this[_addHashTableEntry](strings, element); | 5145 return this[_addHashTableEntry](strings, element); |
| 4961 } else if (_HashSet$()._isNumericElement(element)) { | 5146 } else if (_HashSet$()._isNumericElement(element)) { |
| 4962 let nums = this[_nums]; | 5147 let nums = this[_nums]; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5117 } | 5302 } |
| 5118 static _newHashTable() { | 5303 static _newHashTable() { |
| 5119 let table = Object.create(null); | 5304 let table = Object.create(null); |
| 5120 let temporaryKey = '<non-identifier-key>'; | 5305 let temporaryKey = '<non-identifier-key>'; |
| 5121 _HashSet$()._setTableEntry(table, temporaryKey, table); | 5306 _HashSet$()._setTableEntry(table, temporaryKey, table); |
| 5122 _HashSet$()._deleteTableEntry(table, temporaryKey); | 5307 _HashSet$()._deleteTableEntry(table, temporaryKey); |
| 5123 return table; | 5308 return table; |
| 5124 } | 5309 } |
| 5125 } | 5310 } |
| 5126 _HashSet[dart.implements] = () => [HashSet$(E)]; | 5311 _HashSet[dart.implements] = () => [HashSet$(E)]; |
| 5312 dart.defineExtensionMembers(_HashSet, [ |
| 5313 'contains', |
| 5314 'iterator', |
| 5315 'length', |
| 5316 'isEmpty', |
| 5317 'isNotEmpty' |
| 5318 ]); |
| 5127 dart.setSignature(_HashSet, { | 5319 dart.setSignature(_HashSet, { |
| 5128 constructors: () => ({_HashSet: [_HashSet$(E), []]}), | 5320 constructors: () => ({_HashSet: [_HashSet$(E), []]}), |
| 5129 methods: () => ({ | 5321 methods: () => ({ |
| 5130 [_newSet]: [core.Set$(E), []], | 5322 [_newSet]: [core.Set$(E), []], |
| 5131 [core.$contains]: [core.bool, [core.Object]], | 5323 contains: [core.bool, [core.Object]], |
| 5132 [_contains]: [core.bool, [core.Object]], | 5324 [_contains]: [core.bool, [core.Object]], |
| 5133 lookup: [E, [core.Object]], | 5325 lookup: [E, [core.Object]], |
| 5134 [_lookup]: [E, [core.Object]], | 5326 [_lookup]: [E, [core.Object]], |
| 5135 add: [core.bool, [E]], | 5327 add: [core.bool, [E]], |
| 5136 [_add]: [core.bool, [E]], | 5328 [_add]: [core.bool, [E]], |
| 5137 addAll: [dart.void, [core.Iterable$(E)]], | 5329 addAll: [dart.void, [core.Iterable$(E)]], |
| 5138 remove: [core.bool, [core.Object]], | 5330 remove: [core.bool, [core.Object]], |
| 5139 [_remove]: [core.bool, [core.Object]], | 5331 [_remove]: [core.bool, [core.Object]], |
| 5140 [_computeElements]: [core.List, []], | 5332 [_computeElements]: [core.List, []], |
| 5141 [_addHashTableEntry]: [core.bool, [core.Object, E]], | 5333 [_addHashTableEntry]: [core.bool, [core.Object, E]], |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5208 } | 5400 } |
| 5209 return -1; | 5401 return -1; |
| 5210 } | 5402 } |
| 5211 [_computeHashCode](element) { | 5403 [_computeHashCode](element) { |
| 5212 return this[_hasher](dart.as(element, E)) & 0x3ffffff; | 5404 return this[_hasher](dart.as(element, E)) & 0x3ffffff; |
| 5213 } | 5405 } |
| 5214 add(object) { | 5406 add(object) { |
| 5215 dart.as(object, E); | 5407 dart.as(object, E); |
| 5216 return super[_add](object); | 5408 return super[_add](object); |
| 5217 } | 5409 } |
| 5218 [core.$contains](object) { | 5410 contains(object) { |
| 5219 if (!dart.notNull(this[_validKey](object))) | 5411 if (!dart.notNull(this[_validKey](object))) |
| 5220 return false; | 5412 return false; |
| 5221 return super[_contains](object); | 5413 return super[_contains](object); |
| 5222 } | 5414 } |
| 5223 lookup(object) { | 5415 lookup(object) { |
| 5224 if (!dart.notNull(this[_validKey](object))) | 5416 if (!dart.notNull(this[_validKey](object))) |
| 5225 return null; | 5417 return null; |
| 5226 return super[_lookup](object); | 5418 return super[_lookup](object); |
| 5227 } | 5419 } |
| 5228 remove(object) { | 5420 remove(object) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5287 this[_first] = null; | 5479 this[_first] = null; |
| 5288 this[_last] = null; | 5480 this[_last] = null; |
| 5289 this[_modifications] = 0; | 5481 this[_modifications] = 0; |
| 5290 } | 5482 } |
| 5291 [_newSet]() { | 5483 [_newSet]() { |
| 5292 return new (_LinkedHashSet$(E))(); | 5484 return new (_LinkedHashSet$(E))(); |
| 5293 } | 5485 } |
| 5294 [_unsupported](operation) { | 5486 [_unsupported](operation) { |
| 5295 throw `LinkedHashSet: unsupported ${operation}`; | 5487 throw `LinkedHashSet: unsupported ${operation}`; |
| 5296 } | 5488 } |
| 5297 get [core.$iterator]() { | 5489 get iterator() { |
| 5298 return new (LinkedHashSetIterator$(E))(this, this[_modifications]); | 5490 return new (LinkedHashSetIterator$(E))(this, this[_modifications]); |
| 5299 } | 5491 } |
| 5300 get [core.$length]() { | 5492 get length() { |
| 5301 return this[_length]; | 5493 return this[_length]; |
| 5302 } | 5494 } |
| 5303 get [core.$isEmpty]() { | 5495 get isEmpty() { |
| 5304 return this[_length] == 0; | 5496 return this[_length] == 0; |
| 5305 } | 5497 } |
| 5306 get [core.$isNotEmpty]() { | 5498 get isNotEmpty() { |
| 5307 return !dart.notNull(this[core.$isEmpty]); | 5499 return !dart.notNull(this.isEmpty); |
| 5308 } | 5500 } |
| 5309 [core.$contains](object) { | 5501 contains(object) { |
| 5310 if (_LinkedHashSet$()._isStringElement(object)) { | 5502 if (_LinkedHashSet$()._isStringElement(object)) { |
| 5311 let strings = this[_strings]; | 5503 let strings = this[_strings]; |
| 5312 if (strings == null) | 5504 if (strings == null) |
| 5313 return false; | 5505 return false; |
| 5314 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object),
LinkedHashSetCell); | 5506 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object),
LinkedHashSetCell); |
| 5315 return cell != null; | 5507 return cell != null; |
| 5316 } else if (_LinkedHashSet$()._isNumericElement(object)) { | 5508 } else if (_LinkedHashSet$()._isNumericElement(object)) { |
| 5317 let nums = this[_nums]; | 5509 let nums = this[_nums]; |
| 5318 if (nums == null) | 5510 if (nums == null) |
| 5319 return false; | 5511 return false; |
| 5320 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin
kedHashSetCell); | 5512 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin
kedHashSetCell); |
| 5321 return cell != null; | 5513 return cell != null; |
| 5322 } else { | 5514 } else { |
| 5323 return this[_contains](object); | 5515 return this[_contains](object); |
| 5324 } | 5516 } |
| 5325 } | 5517 } |
| 5326 [_contains](object) { | 5518 [_contains](object) { |
| 5327 let rest = this[_rest]; | 5519 let rest = this[_rest]; |
| 5328 if (rest == null) | 5520 if (rest == null) |
| 5329 return false; | 5521 return false; |
| 5330 let bucket = this[_getBucket](rest, object); | 5522 let bucket = this[_getBucket](rest, object); |
| 5331 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 5523 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
| 5332 } | 5524 } |
| 5333 lookup(object) { | 5525 lookup(object) { |
| 5334 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not
Null(_LinkedHashSet$()._isNumericElement(object))) { | 5526 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not
Null(_LinkedHashSet$()._isNumericElement(object))) { |
| 5335 return dart.as(this[core.$contains](object) ? object : null, E); | 5527 return dart.as(this.contains(object) ? object : null, E); |
| 5336 } else { | 5528 } else { |
| 5337 return this[_lookup](object); | 5529 return this[_lookup](object); |
| 5338 } | 5530 } |
| 5339 } | 5531 } |
| 5340 [_lookup](object) { | 5532 [_lookup](object) { |
| 5341 let rest = this[_rest]; | 5533 let rest = this[_rest]; |
| 5342 if (rest == null) | 5534 if (rest == null) |
| 5343 return null; | 5535 return null; |
| 5344 let bucket = this[_getBucket](rest, object); | 5536 let bucket = this[_getBucket](rest, object); |
| 5345 let index = this[_findBucketIndex](bucket, object); | 5537 let index = this[_findBucketIndex](bucket, object); |
| 5346 if (dart.notNull(index) < 0) | 5538 if (dart.notNull(index) < 0) |
| 5347 return null; | 5539 return null; |
| 5348 return dart.as(dart.dload(bucket[core.$get](index), _element), E); | 5540 return dart.as(dart.dload(bucket[dartx.get](index), _element), E); |
| 5349 } | 5541 } |
| 5350 [core.$forEach](action) { | 5542 forEach(action) { |
| 5351 dart.as(action, dart.functionType(dart.void, [E])); | 5543 dart.as(action, dart.functionType(dart.void, [E])); |
| 5352 let cell = this[_first]; | 5544 let cell = this[_first]; |
| 5353 let modifications = this[_modifications]; | 5545 let modifications = this[_modifications]; |
| 5354 while (cell != null) { | 5546 while (cell != null) { |
| 5355 action(dart.as(cell[_element], E)); | 5547 action(dart.as(cell[_element], E)); |
| 5356 if (modifications != this[_modifications]) { | 5548 if (modifications != this[_modifications]) { |
| 5357 throw new core.ConcurrentModificationError(this); | 5549 throw new core.ConcurrentModificationError(this); |
| 5358 } | 5550 } |
| 5359 cell = cell[_next]; | 5551 cell = cell[_next]; |
| 5360 } | 5552 } |
| 5361 } | 5553 } |
| 5362 get [core.$first]() { | 5554 get first() { |
| 5363 if (this[_first] == null) | 5555 if (this[_first] == null) |
| 5364 throw new core.StateError("No elements"); | 5556 throw new core.StateError("No elements"); |
| 5365 return dart.as(this[_first][_element], E); | 5557 return dart.as(this[_first][_element], E); |
| 5366 } | 5558 } |
| 5367 get [core.$last]() { | 5559 get last() { |
| 5368 if (this[_last] == null) | 5560 if (this[_last] == null) |
| 5369 throw new core.StateError("No elements"); | 5561 throw new core.StateError("No elements"); |
| 5370 return dart.as(this[_last][_element], E); | 5562 return dart.as(this[_last][_element], E); |
| 5371 } | 5563 } |
| 5372 add(element) { | 5564 add(element) { |
| 5373 dart.as(element, E); | 5565 dart.as(element, E); |
| 5374 if (_LinkedHashSet$()._isStringElement(element)) { | 5566 if (_LinkedHashSet$()._isStringElement(element)) { |
| 5375 let strings = this[_strings]; | 5567 let strings = this[_strings]; |
| 5376 if (strings == null) | 5568 if (strings == null) |
| 5377 this[_strings] = strings = _LinkedHashSet$()._newHashTable(); | 5569 this[_strings] = strings = _LinkedHashSet$()._newHashTable(); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5545 } | 5737 } |
| 5546 static _newHashTable() { | 5738 static _newHashTable() { |
| 5547 let table = Object.create(null); | 5739 let table = Object.create(null); |
| 5548 let temporaryKey = '<non-identifier-key>'; | 5740 let temporaryKey = '<non-identifier-key>'; |
| 5549 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); | 5741 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); |
| 5550 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); | 5742 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); |
| 5551 return table; | 5743 return table; |
| 5552 } | 5744 } |
| 5553 } | 5745 } |
| 5554 _LinkedHashSet[dart.implements] = () => [LinkedHashSet$(E)]; | 5746 _LinkedHashSet[dart.implements] = () => [LinkedHashSet$(E)]; |
| 5747 dart.defineExtensionMembers(_LinkedHashSet, [ |
| 5748 'contains', |
| 5749 'forEach', |
| 5750 'iterator', |
| 5751 'length', |
| 5752 'isEmpty', |
| 5753 'isNotEmpty', |
| 5754 'first', |
| 5755 'last' |
| 5756 ]); |
| 5555 dart.setSignature(_LinkedHashSet, { | 5757 dart.setSignature(_LinkedHashSet, { |
| 5556 constructors: () => ({_LinkedHashSet: [_LinkedHashSet$(E), []]}), | 5758 constructors: () => ({_LinkedHashSet: [_LinkedHashSet$(E), []]}), |
| 5557 methods: () => ({ | 5759 methods: () => ({ |
| 5558 [_newSet]: [core.Set$(E), []], | 5760 [_newSet]: [core.Set$(E), []], |
| 5559 [_unsupported]: [dart.void, [core.String]], | 5761 [_unsupported]: [dart.void, [core.String]], |
| 5560 [core.$contains]: [core.bool, [core.Object]], | 5762 contains: [core.bool, [core.Object]], |
| 5561 [_contains]: [core.bool, [core.Object]], | 5763 [_contains]: [core.bool, [core.Object]], |
| 5562 lookup: [E, [core.Object]], | 5764 lookup: [E, [core.Object]], |
| 5563 [_lookup]: [E, [core.Object]], | 5765 [_lookup]: [E, [core.Object]], |
| 5564 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 5766 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 5565 add: [core.bool, [E]], | 5767 add: [core.bool, [E]], |
| 5566 [_add]: [core.bool, [E]], | 5768 [_add]: [core.bool, [E]], |
| 5567 remove: [core.bool, [core.Object]], | 5769 remove: [core.bool, [core.Object]], |
| 5568 [_remove]: [core.bool, [core.Object]], | 5770 [_remove]: [core.bool, [core.Object]], |
| 5569 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 5771 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| 5570 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 5772 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| 5571 [_filterWhere]: [dart.void, [dart.functionType(core.bool, [E]), core.boo
l]], | 5773 [_filterWhere]: [dart.void, [dart.functionType(core.bool, [E]), core.boo
l]], |
| 5572 [_addHashTableEntry]: [core.bool, [core.Object, E]], | 5774 [_addHashTableEntry]: [core.bool, [core.Object, E]], |
| 5573 [_removeHashTableEntry]: [core.bool, [core.Object, core.Object]], | 5775 [_removeHashTableEntry]: [core.bool, [core.Object, core.Object]], |
| 5574 [_modified]: [dart.void, []], | 5776 [_modified]: [dart.void, []], |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5642 } | 5844 } |
| 5643 return -1; | 5845 return -1; |
| 5644 } | 5846 } |
| 5645 [_computeHashCode](element) { | 5847 [_computeHashCode](element) { |
| 5646 return this[_hasher](dart.as(element, E)) & 0x3ffffff; | 5848 return this[_hasher](dart.as(element, E)) & 0x3ffffff; |
| 5647 } | 5849 } |
| 5648 add(element) { | 5850 add(element) { |
| 5649 dart.as(element, E); | 5851 dart.as(element, E); |
| 5650 return super[_add](element); | 5852 return super[_add](element); |
| 5651 } | 5853 } |
| 5652 [core.$contains](object) { | 5854 contains(object) { |
| 5653 if (!dart.notNull(this[_validKey](object))) | 5855 if (!dart.notNull(this[_validKey](object))) |
| 5654 return false; | 5856 return false; |
| 5655 return super[_contains](object); | 5857 return super[_contains](object); |
| 5656 } | 5858 } |
| 5657 lookup(object) { | 5859 lookup(object) { |
| 5658 if (!dart.notNull(this[_validKey](object))) | 5860 if (!dart.notNull(this[_validKey](object))) |
| 5659 return null; | 5861 return null; |
| 5660 return super[_lookup](object); | 5862 return super[_lookup](object); |
| 5661 } | 5863 } |
| 5662 remove(object) { | 5864 remove(object) { |
| 5663 if (!dart.notNull(this[_validKey](object))) | 5865 if (!dart.notNull(this[_validKey](object))) |
| 5664 return false; | 5866 return false; |
| 5665 return super[_remove](object); | 5867 return super[_remove](object); |
| 5666 } | 5868 } |
| 5667 containsAll(elements) { | 5869 containsAll(elements) { |
| 5668 for (let element of elements) { | 5870 for (let element of elements) { |
| 5669 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this[core
.$contains](element))) | 5871 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this.cont
ains(element))) |
| 5670 return false; | 5872 return false; |
| 5671 } | 5873 } |
| 5672 return true; | 5874 return true; |
| 5673 } | 5875 } |
| 5674 removeAll(elements) { | 5876 removeAll(elements) { |
| 5675 for (let element of elements) { | 5877 for (let element of elements) { |
| 5676 if (this[_validKey](element)) { | 5878 if (this[_validKey](element)) { |
| 5677 super[_remove](element); | 5879 super[_remove](element); |
| 5678 } | 5880 } |
| 5679 } | 5881 } |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5792 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 5994 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
| 5793 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 5995 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
| 5794 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 5996 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
| 5795 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 5997 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
| 5796 exports.HashSetIterator$ = HashSetIterator$; | 5998 exports.HashSetIterator$ = HashSetIterator$; |
| 5797 exports.HashSetIterator = HashSetIterator; | 5999 exports.HashSetIterator = HashSetIterator; |
| 5798 exports.LinkedHashSetCell = LinkedHashSetCell; | 6000 exports.LinkedHashSetCell = LinkedHashSetCell; |
| 5799 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 6001 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
| 5800 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 6002 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
| 5801 })(collection, _internal, core, _js_helper, math); | 6003 })(collection, _internal, core, _js_helper, math); |
| OLD | NEW |