| OLD | NEW |
| 1 var _internal; | 1 var _internal; |
| 2 (function(_internal) { | 2 (function(_internal) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 let _iterable = Symbol('_iterable'); |
| 5 let _start = Symbol('_start'); |
| 6 let _endOrLength = Symbol('_endOrLength'); |
| 7 let _endIndex = Symbol('_endIndex'); |
| 8 let _startIndex = Symbol('_startIndex'); |
| 9 let _length = Symbol('_length'); |
| 10 let _index = Symbol('_index'); |
| 11 let _current = Symbol('_current'); |
| 12 let _f = Symbol('_f'); |
| 13 let _iterator = Symbol('_iterator'); |
| 14 let _source = Symbol('_source'); |
| 15 let _currentExpansion = Symbol('_currentExpansion'); |
| 16 let _nextExpansion = Symbol('_nextExpansion'); |
| 17 let _takeCount = Symbol('_takeCount'); |
| 18 let _remaining = Symbol('_remaining'); |
| 19 let _isFinished = Symbol('_isFinished'); |
| 20 let _skipCount = Symbol('_skipCount'); |
| 21 let _hasSkipped = Symbol('_hasSkipped'); |
| 22 let _rangeCheck = Symbol('_rangeCheck'); |
| 23 let _backedList = Symbol('_backedList'); |
| 24 let _values = Symbol('_values'); |
| 25 let _doSort = Symbol('_doSort'); |
| 26 let _insertionSort = Symbol('_insertionSort'); |
| 27 let _dualPivotQuicksort = Symbol('_dualPivotQuicksort'); |
| 28 let _name = Symbol('_name'); |
| 4 let POWERS_OF_TEN = /* Unimplemented const */new List.from([1.0, 10.0, 100.0,
1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0, 100
00000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0, 100000000000000.0
, 1000000000000000.0, 10000000000000000.0, 100000000000000000.0, 100000000000000
0000.0, 10000000000000000000.0, 100000000000000000000.0, 1e+21, 1e+22]); | 29 let POWERS_OF_TEN = /* Unimplemented const */new List.from([1.0, 10.0, 100.0,
1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0, 100
00000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0, 100000000000000.0
, 1000000000000000.0, 10000000000000000.0, 100000000000000000.0, 100000000000000
0000.0, 10000000000000000000.0, 100000000000000000000.0, 1e+21, 1e+22]); |
| 5 class EfficientLength extends dart.Object { | 30 class EfficientLength extends dart.Object { |
| 6 } | 31 } |
| 7 let ListIterable$ = dart.generic(function(E) { | 32 let ListIterable$ = dart.generic(function(E) { |
| 8 class ListIterable extends collection.IterableBase$(E) { | 33 class ListIterable extends collection.IterableBase$(E) { |
| 9 ListIterable() { | 34 ListIterable() { |
| 10 super.IterableBase(); | 35 super.IterableBase(); |
| 11 } | 36 } |
| 12 get iterator() { | 37 get iterator() { |
| 13 return new ListIterator(this); | 38 return new ListIterator(this); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 result.add(this.elementAt(i)); | 245 result.add(this.elementAt(i)); |
| 221 } | 246 } |
| 222 return result; | 247 return result; |
| 223 } | 248 } |
| 224 } | 249 } |
| 225 return ListIterable; | 250 return ListIterable; |
| 226 }); | 251 }); |
| 227 let ListIterable = ListIterable$(dynamic); | 252 let ListIterable = ListIterable$(dynamic); |
| 228 let SubListIterable$ = dart.generic(function(E) { | 253 let SubListIterable$ = dart.generic(function(E) { |
| 229 class SubListIterable extends ListIterable$(E) { | 254 class SubListIterable extends ListIterable$(E) { |
| 230 SubListIterable(_iterable, _start, _endOrLength) { | 255 SubListIterable($_iterable, $_start, $_endOrLength) { |
| 231 this._iterable = _iterable; | 256 this[_iterable] = $_iterable; |
| 232 this._start = _start; | 257 this[_start] = $_start; |
| 233 this._endOrLength = _endOrLength; | 258 this[_endOrLength] = $_endOrLength; |
| 234 super.ListIterable(); | 259 super.ListIterable(); |
| 235 core.RangeError.checkNotNegative(this._start, "start"); | 260 core.RangeError.checkNotNegative(this[_start], "start"); |
| 236 if (this._endOrLength !== null) { | 261 if (this[_endOrLength] !== null) { |
| 237 core.RangeError.checkNotNegative(this._endOrLength, "end"); | 262 core.RangeError.checkNotNegative(this[_endOrLength], "end"); |
| 238 if (this._start > this._endOrLength) { | 263 if (this[_start] > this[_endOrLength]) { |
| 239 throw new core.RangeError.range(this._start, 0, this._endOrLength, "
start"); | 264 throw new core.RangeError.range(this[_start], 0, this[_endOrLength],
"start"); |
| 240 } | 265 } |
| 241 } | 266 } |
| 242 } | 267 } |
| 243 get _endIndex() { | 268 get [_endIndex]() { |
| 244 let length = this._iterable.length; | 269 let length = this[_iterable].length; |
| 245 if (dart.notNull(this._endOrLength === null) || dart.notNull(this._endOr
Length > length)) | 270 if (dart.notNull(this[_endOrLength] === null) || dart.notNull(this[_endO
rLength] > length)) |
| 246 return length; | 271 return length; |
| 247 return this._endOrLength; | 272 return this[_endOrLength]; |
| 248 } | 273 } |
| 249 get _startIndex() { | 274 get [_startIndex]() { |
| 250 let length = this._iterable.length; | 275 let length = this[_iterable].length; |
| 251 if (this._start > length) | 276 if (this[_start] > length) |
| 252 return length; | 277 return length; |
| 253 return this._start; | 278 return this[_start]; |
| 254 } | 279 } |
| 255 get length() { | 280 get length() { |
| 256 let length = this._iterable.length; | 281 let length = this[_iterable].length; |
| 257 if (this._start >= length) | 282 if (this[_start] >= length) |
| 258 return 0; | 283 return 0; |
| 259 if (dart.notNull(this._endOrLength === null) || dart.notNull(this._endOr
Length >= length)) { | 284 if (dart.notNull(this[_endOrLength] === null) || dart.notNull(this[_endO
rLength] >= length)) { |
| 260 return length - this._start; | 285 return length - this[_start]; |
| 261 } | 286 } |
| 262 return this._endOrLength - this._start; | 287 return this[_endOrLength] - this[_start]; |
| 263 } | 288 } |
| 264 elementAt(index) { | 289 elementAt(index) { |
| 265 let realIndex = this._startIndex + index; | 290 let realIndex = this[_startIndex] + index; |
| 266 if (dart.notNull(index < 0) || dart.notNull(realIndex >= this._endIndex)
) { | 291 if (dart.notNull(index < 0) || dart.notNull(realIndex >= this[_endIndex]
)) { |
| 267 throw new core.RangeError.index(index, this, "index"); | 292 throw new core.RangeError.index(index, this, "index"); |
| 268 } | 293 } |
| 269 return this._iterable.elementAt(realIndex); | 294 return this[_iterable].elementAt(realIndex); |
| 270 } | 295 } |
| 271 skip(count) { | 296 skip(count) { |
| 272 core.RangeError.checkNotNegative(count, "count"); | 297 core.RangeError.checkNotNegative(count, "count"); |
| 273 let newStart = this._start + count; | 298 let newStart = this[_start] + count; |
| 274 if (dart.notNull(this._endOrLength !== null) && dart.notNull(newStart >=
this._endOrLength)) { | 299 if (dart.notNull(this[_endOrLength] !== null) && dart.notNull(newStart >
= this[_endOrLength])) { |
| 275 return new EmptyIterable(); | 300 return new EmptyIterable(); |
| 276 } | 301 } |
| 277 return new SubListIterable(this._iterable, newStart, this._endOrLength); | 302 return new SubListIterable(this[_iterable], newStart, this[_endOrLength]
); |
| 278 } | 303 } |
| 279 take(count) { | 304 take(count) { |
| 280 core.RangeError.checkNotNegative(count, "count"); | 305 core.RangeError.checkNotNegative(count, "count"); |
| 281 if (this._endOrLength === null) { | 306 if (this[_endOrLength] === null) { |
| 282 return new SubListIterable(this._iterable, this._start, this._start +
count); | 307 return new SubListIterable(this[_iterable], this[_start], this[_start]
+ count); |
| 283 } else { | 308 } else { |
| 284 let newEnd = this._start + count; | 309 let newEnd = this[_start] + count; |
| 285 if (this._endOrLength < newEnd) | 310 if (this[_endOrLength] < newEnd) |
| 286 return this; | 311 return this; |
| 287 return new SubListIterable(this._iterable, this._start, newEnd); | 312 return new SubListIterable(this[_iterable], this[_start], newEnd); |
| 288 } | 313 } |
| 289 } | 314 } |
| 290 toList(opt$) { | 315 toList(opt$) { |
| 291 let growable = opt$.growable === void 0 ? true : opt$.growable; | 316 let growable = opt$.growable === void 0 ? true : opt$.growable; |
| 292 let start = this._start; | 317 let start = this[_start]; |
| 293 let end = this._iterable.length; | 318 let end = this[_iterable].length; |
| 294 if (dart.notNull(this._endOrLength !== null) && dart.notNull(this._endOr
Length < end)) | 319 if (dart.notNull(this[_endOrLength] !== null) && dart.notNull(this[_endO
rLength] < end)) |
| 295 end = this._endOrLength; | 320 end = this[_endOrLength]; |
| 296 let length = end - start; | 321 let length = end - start; |
| 297 if (length < 0) | 322 if (length < 0) |
| 298 length = 0; | 323 length = 0; |
| 299 let result = growable ? ((_) => { | 324 let result = growable ? ((_) => { |
| 300 _.length = length; | 325 _.length = length; |
| 301 return _; | 326 return _; |
| 302 }).bind(this)(new core.List()) : new core.List(length); | 327 }).bind(this)(new core.List()) : new core.List(length); |
| 303 for (let i = 0; i < length; i++) { | 328 for (let i = 0; i < length; i++) { |
| 304 result.set(i, this._iterable.elementAt(start + i)); | 329 result.set(i, this[_iterable].elementAt(start + i)); |
| 305 if (this._iterable.length < end) | 330 if (this[_iterable].length < end) |
| 306 throw new core.ConcurrentModificationError(this); | 331 throw new core.ConcurrentModificationError(this); |
| 307 } | 332 } |
| 308 return dart.as(result, core.List$(E)); | 333 return dart.as(result, core.List$(E)); |
| 309 } | 334 } |
| 310 } | 335 } |
| 311 return SubListIterable; | 336 return SubListIterable; |
| 312 }); | 337 }); |
| 313 let SubListIterable = SubListIterable$(dynamic); | 338 let SubListIterable = SubListIterable$(dynamic); |
| 314 let ListIterator$ = dart.generic(function(E) { | 339 let ListIterator$ = dart.generic(function(E) { |
| 315 class ListIterator extends dart.Object { | 340 class ListIterator extends dart.Object { |
| 316 ListIterator(iterable) { | 341 ListIterator(iterable) { |
| 317 this._iterable = iterable; | 342 this[_iterable] = iterable; |
| 318 this._length = iterable.length; | 343 this[_length] = iterable.length; |
| 319 this._index = 0; | 344 this[_index] = 0; |
| 320 this._current = dart.as(null, E); | 345 this[_current] = dart.as(null, E); |
| 321 } | 346 } |
| 322 get current() { | 347 get current() { |
| 323 return this._current; | 348 return this[_current]; |
| 324 } | 349 } |
| 325 moveNext() { | 350 moveNext() { |
| 326 let length = this._iterable.length; | 351 let length = this[_iterable].length; |
| 327 if (this._length !== length) { | 352 if (this[_length] !== length) { |
| 328 throw new core.ConcurrentModificationError(this._iterable); | 353 throw new core.ConcurrentModificationError(this[_iterable]); |
| 329 } | 354 } |
| 330 if (this._index >= length) { | 355 if (this[_index] >= length) { |
| 331 this._current = dart.as(null, E); | 356 this[_current] = dart.as(null, E); |
| 332 return false; | 357 return false; |
| 333 } | 358 } |
| 334 this._current = this._iterable.elementAt(this._index); | 359 this[_current] = this[_iterable].elementAt(this[_index]); |
| 335 this._index++; | 360 this[_index]++; |
| 336 return true; | 361 return true; |
| 337 } | 362 } |
| 338 } | 363 } |
| 339 return ListIterator; | 364 return ListIterator; |
| 340 }); | 365 }); |
| 341 let ListIterator = ListIterator$(dynamic); | 366 let ListIterator = ListIterator$(dynamic); |
| 342 let MappedIterable$ = dart.generic(function(S, T) { | 367 let MappedIterable$ = dart.generic(function(S, T) { |
| 343 class MappedIterable extends collection.IterableBase$(T) { | 368 class MappedIterable extends collection.IterableBase$(T) { |
| 344 MappedIterable(iterable, function) { | 369 MappedIterable(iterable, function) { |
| 345 if (dart.is(iterable, EfficientLength)) { | 370 if (dart.is(iterable, EfficientLength)) { |
| 346 return new EfficientLengthMappedIterable(iterable, function); | 371 return new EfficientLengthMappedIterable(iterable, function); |
| 347 } | 372 } |
| 348 return new MappedIterable._(dart.as(iterable, core.Iterable$(S)), functi
on); | 373 return new MappedIterable._(dart.as(iterable, core.Iterable$(S)), functi
on); |
| 349 } | 374 } |
| 350 MappedIterable$_(_iterable, _f) { | 375 MappedIterable$_($_iterable, $_f) { |
| 351 this._iterable = _iterable; | 376 this[_iterable] = $_iterable; |
| 352 this._f = _f; | 377 this[_f] = $_f; |
| 353 super.IterableBase(); | 378 super.IterableBase(); |
| 354 } | 379 } |
| 355 get iterator() { | 380 get iterator() { |
| 356 return new MappedIterator(this._iterable.iterator, this._f); | 381 return new MappedIterator(this[_iterable].iterator, this[_f]); |
| 357 } | 382 } |
| 358 get length() { | 383 get length() { |
| 359 return this._iterable.length; | 384 return this[_iterable].length; |
| 360 } | 385 } |
| 361 get isEmpty() { | 386 get isEmpty() { |
| 362 return this._iterable.isEmpty; | 387 return this[_iterable].isEmpty; |
| 363 } | 388 } |
| 364 get first() { | 389 get first() { |
| 365 return this._f(this._iterable.first); | 390 return this[_f](this[_iterable].first); |
| 366 } | 391 } |
| 367 get last() { | 392 get last() { |
| 368 return this._f(this._iterable.last); | 393 return this[_f](this[_iterable].last); |
| 369 } | 394 } |
| 370 get single() { | 395 get single() { |
| 371 return this._f(this._iterable.single); | 396 return this[_f](this[_iterable].single); |
| 372 } | 397 } |
| 373 elementAt(index) { | 398 elementAt(index) { |
| 374 return this._f(this._iterable.elementAt(index)); | 399 return this[_f](this[_iterable].elementAt(index)); |
| 375 } | 400 } |
| 376 } | 401 } |
| 377 dart.defineNamedConstructor(MappedIterable, '_'); | 402 dart.defineNamedConstructor(MappedIterable, '_'); |
| 378 return MappedIterable; | 403 return MappedIterable; |
| 379 }); | 404 }); |
| 380 let MappedIterable = MappedIterable$(dynamic, dynamic); | 405 let MappedIterable = MappedIterable$(dynamic, dynamic); |
| 381 let EfficientLengthMappedIterable$ = dart.generic(function(S, T) { | 406 let EfficientLengthMappedIterable$ = dart.generic(function(S, T) { |
| 382 class EfficientLengthMappedIterable extends MappedIterable$(S, T) { | 407 class EfficientLengthMappedIterable extends MappedIterable$(S, T) { |
| 383 EfficientLengthMappedIterable(iterable, function) { | 408 EfficientLengthMappedIterable(iterable, function) { |
| 384 super.MappedIterable$_(dart.as(iterable, core.Iterable$(S)), function); | 409 super.MappedIterable$_(dart.as(iterable, core.Iterable$(S)), function); |
| 385 } | 410 } |
| 386 } | 411 } |
| 387 return EfficientLengthMappedIterable; | 412 return EfficientLengthMappedIterable; |
| 388 }); | 413 }); |
| 389 let EfficientLengthMappedIterable = EfficientLengthMappedIterable$(dynamic, dy
namic); | 414 let EfficientLengthMappedIterable = EfficientLengthMappedIterable$(dynamic, dy
namic); |
| 390 let MappedIterator$ = dart.generic(function(S, T) { | 415 let MappedIterator$ = dart.generic(function(S, T) { |
| 391 class MappedIterator extends core.Iterator$(T) { | 416 class MappedIterator extends core.Iterator$(T) { |
| 392 MappedIterator(_iterator, _f) { | 417 MappedIterator($_iterator, $_f) { |
| 393 this._iterator = _iterator; | 418 this[_iterator] = $_iterator; |
| 394 this._f = _f; | 419 this[_f] = $_f; |
| 395 this._current = dart.as(null, T); | 420 this[_current] = dart.as(null, T); |
| 396 super.Iterator(); | 421 super.Iterator(); |
| 397 } | 422 } |
| 398 moveNext() { | 423 moveNext() { |
| 399 if (this._iterator.moveNext()) { | 424 if (this[_iterator].moveNext()) { |
| 400 this._current = this._f(this._iterator.current); | 425 this[_current] = this[_f](this[_iterator].current); |
| 401 return true; | 426 return true; |
| 402 } | 427 } |
| 403 this._current = dart.as(null, T); | 428 this[_current] = dart.as(null, T); |
| 404 return false; | 429 return false; |
| 405 } | 430 } |
| 406 get current() { | 431 get current() { |
| 407 return this._current; | 432 return this[_current]; |
| 408 } | 433 } |
| 409 } | 434 } |
| 410 return MappedIterator; | 435 return MappedIterator; |
| 411 }); | 436 }); |
| 412 let MappedIterator = MappedIterator$(dynamic, dynamic); | 437 let MappedIterator = MappedIterator$(dynamic, dynamic); |
| 413 let MappedListIterable$ = dart.generic(function(S, T) { | 438 let MappedListIterable$ = dart.generic(function(S, T) { |
| 414 class MappedListIterable extends ListIterable$(T) { | 439 class MappedListIterable extends ListIterable$(T) { |
| 415 MappedListIterable(_source, _f) { | 440 MappedListIterable($_source, $_f) { |
| 416 this._source = _source; | 441 this[_source] = $_source; |
| 417 this._f = _f; | 442 this[_f] = $_f; |
| 418 super.ListIterable(); | 443 super.ListIterable(); |
| 419 } | 444 } |
| 420 get length() { | 445 get length() { |
| 421 return this._source.length; | 446 return this[_source].length; |
| 422 } | 447 } |
| 423 elementAt(index) { | 448 elementAt(index) { |
| 424 return this._f(this._source.elementAt(index)); | 449 return this[_f](this[_source].elementAt(index)); |
| 425 } | 450 } |
| 426 } | 451 } |
| 427 return MappedListIterable; | 452 return MappedListIterable; |
| 428 }); | 453 }); |
| 429 let MappedListIterable = MappedListIterable$(dynamic, dynamic); | 454 let MappedListIterable = MappedListIterable$(dynamic, dynamic); |
| 430 let WhereIterable$ = dart.generic(function(E) { | 455 let WhereIterable$ = dart.generic(function(E) { |
| 431 class WhereIterable extends collection.IterableBase$(E) { | 456 class WhereIterable extends collection.IterableBase$(E) { |
| 432 WhereIterable(_iterable, _f) { | 457 WhereIterable($_iterable, $_f) { |
| 433 this._iterable = _iterable; | 458 this[_iterable] = $_iterable; |
| 434 this._f = _f; | 459 this[_f] = $_f; |
| 435 super.IterableBase(); | 460 super.IterableBase(); |
| 436 } | 461 } |
| 437 get iterator() { | 462 get iterator() { |
| 438 return new WhereIterator(this._iterable.iterator, this._f); | 463 return new WhereIterator(this[_iterable].iterator, this[_f]); |
| 439 } | 464 } |
| 440 } | 465 } |
| 441 return WhereIterable; | 466 return WhereIterable; |
| 442 }); | 467 }); |
| 443 let WhereIterable = WhereIterable$(dynamic); | 468 let WhereIterable = WhereIterable$(dynamic); |
| 444 let WhereIterator$ = dart.generic(function(E) { | 469 let WhereIterator$ = dart.generic(function(E) { |
| 445 class WhereIterator extends core.Iterator$(E) { | 470 class WhereIterator extends core.Iterator$(E) { |
| 446 WhereIterator(_iterator, _f) { | 471 WhereIterator($_iterator, $_f) { |
| 447 this._iterator = _iterator; | 472 this[_iterator] = $_iterator; |
| 448 this._f = _f; | 473 this[_f] = $_f; |
| 449 super.Iterator(); | 474 super.Iterator(); |
| 450 } | 475 } |
| 451 moveNext() { | 476 moveNext() { |
| 452 while (this._iterator.moveNext()) { | 477 while (this[_iterator].moveNext()) { |
| 453 if (this._f(this._iterator.current)) { | 478 if (this[_f](this[_iterator].current)) { |
| 454 return true; | 479 return true; |
| 455 } | 480 } |
| 456 } | 481 } |
| 457 return false; | 482 return false; |
| 458 } | 483 } |
| 459 get current() { | 484 get current() { |
| 460 return this._iterator.current; | 485 return this[_iterator].current; |
| 461 } | 486 } |
| 462 } | 487 } |
| 463 return WhereIterator; | 488 return WhereIterator; |
| 464 }); | 489 }); |
| 465 let WhereIterator = WhereIterator$(dynamic); | 490 let WhereIterator = WhereIterator$(dynamic); |
| 466 let ExpandIterable$ = dart.generic(function(S, T) { | 491 let ExpandIterable$ = dart.generic(function(S, T) { |
| 467 class ExpandIterable extends collection.IterableBase$(T) { | 492 class ExpandIterable extends collection.IterableBase$(T) { |
| 468 ExpandIterable(_iterable, _f) { | 493 ExpandIterable($_iterable, $_f) { |
| 469 this._iterable = _iterable; | 494 this[_iterable] = $_iterable; |
| 470 this._f = _f; | 495 this[_f] = $_f; |
| 471 super.IterableBase(); | 496 super.IterableBase(); |
| 472 } | 497 } |
| 473 get iterator() { | 498 get iterator() { |
| 474 return new ExpandIterator(this._iterable.iterator, dart.as(this._f, dart
.throw_("Unimplemented type (S) → Iterable<T>"))); | 499 return new ExpandIterator(this[_iterable].iterator, dart.as(this[_f], da
rt.throw_("Unimplemented type (S) → Iterable<T>"))); |
| 475 } | 500 } |
| 476 } | 501 } |
| 477 return ExpandIterable; | 502 return ExpandIterable; |
| 478 }); | 503 }); |
| 479 let ExpandIterable = ExpandIterable$(dynamic, dynamic); | 504 let ExpandIterable = ExpandIterable$(dynamic, dynamic); |
| 480 let ExpandIterator$ = dart.generic(function(S, T) { | 505 let ExpandIterator$ = dart.generic(function(S, T) { |
| 481 class ExpandIterator extends dart.Object { | 506 class ExpandIterator extends dart.Object { |
| 482 ExpandIterator(_iterator, _f) { | 507 ExpandIterator($_iterator, $_f) { |
| 483 this._iterator = _iterator; | 508 this[_iterator] = $_iterator; |
| 484 this._f = _f; | 509 this[_f] = $_f; |
| 485 this._currentExpansion = dart.as(new EmptyIterator(), core.Iterator$(T))
; | 510 this[_currentExpansion] = dart.as(new EmptyIterator(), core.Iterator$(T)
); |
| 486 this._current = dart.as(null, T); | 511 this[_current] = dart.as(null, T); |
| 487 } | 512 } |
| 488 _nextExpansion() {} | 513 [_nextExpansion]() {} |
| 489 get current() { | 514 get current() { |
| 490 return this._current; | 515 return this[_current]; |
| 491 } | 516 } |
| 492 moveNext() { | 517 moveNext() { |
| 493 if (this._currentExpansion === null) | 518 if (this[_currentExpansion] === null) |
| 494 return false; | 519 return false; |
| 495 while (!dart.notNull(this._currentExpansion.moveNext())) { | 520 while (!dart.notNull(this[_currentExpansion].moveNext())) { |
| 496 this._current = dart.as(null, T); | 521 this[_current] = dart.as(null, T); |
| 497 if (this._iterator.moveNext()) { | 522 if (this[_iterator].moveNext()) { |
| 498 this._currentExpansion = null; | 523 this[_currentExpansion] = null; |
| 499 this._currentExpansion = dart.as(this._f(this._iterator.current).ite
rator, core.Iterator$(T)); | 524 this[_currentExpansion] = dart.as(this[_f](this[_iterator].current).
iterator, core.Iterator$(T)); |
| 500 } else { | 525 } else { |
| 501 return false; | 526 return false; |
| 502 } | 527 } |
| 503 } | 528 } |
| 504 this._current = this._currentExpansion.current; | 529 this[_current] = this[_currentExpansion].current; |
| 505 return true; | 530 return true; |
| 506 } | 531 } |
| 507 } | 532 } |
| 508 return ExpandIterator; | 533 return ExpandIterator; |
| 509 }); | 534 }); |
| 510 let ExpandIterator = ExpandIterator$(dynamic, dynamic); | 535 let ExpandIterator = ExpandIterator$(dynamic, dynamic); |
| 511 let TakeIterable$ = dart.generic(function(E) { | 536 let TakeIterable$ = dart.generic(function(E) { |
| 512 class TakeIterable extends collection.IterableBase$(E) { | 537 class TakeIterable extends collection.IterableBase$(E) { |
| 513 TakeIterable(iterable, takeCount) { | 538 TakeIterable(iterable, takeCount) { |
| 514 if (dart.notNull(!(typeof takeCount == number)) || dart.notNull(takeCoun
t < 0)) { | 539 if (dart.notNull(!(typeof takeCount == number)) || dart.notNull(takeCoun
t < 0)) { |
| 515 throw new core.ArgumentError(takeCount); | 540 throw new core.ArgumentError(takeCount); |
| 516 } | 541 } |
| 517 if (dart.is(iterable, EfficientLength)) { | 542 if (dart.is(iterable, EfficientLength)) { |
| 518 return new EfficientLengthTakeIterable(iterable, takeCount); | 543 return new EfficientLengthTakeIterable(iterable, takeCount); |
| 519 } | 544 } |
| 520 return new TakeIterable._(iterable, takeCount); | 545 return new TakeIterable._(iterable, takeCount); |
| 521 } | 546 } |
| 522 TakeIterable$_(_iterable, _takeCount) { | 547 TakeIterable$_($_iterable, $_takeCount) { |
| 523 this._iterable = _iterable; | 548 this[_iterable] = $_iterable; |
| 524 this._takeCount = _takeCount; | 549 this[_takeCount] = $_takeCount; |
| 525 super.IterableBase(); | 550 super.IterableBase(); |
| 526 } | 551 } |
| 527 get iterator() { | 552 get iterator() { |
| 528 return new TakeIterator(this._iterable.iterator, this._takeCount); | 553 return new TakeIterator(this[_iterable].iterator, this[_takeCount]); |
| 529 } | 554 } |
| 530 } | 555 } |
| 531 dart.defineNamedConstructor(TakeIterable, '_'); | 556 dart.defineNamedConstructor(TakeIterable, '_'); |
| 532 return TakeIterable; | 557 return TakeIterable; |
| 533 }); | 558 }); |
| 534 let TakeIterable = TakeIterable$(dynamic); | 559 let TakeIterable = TakeIterable$(dynamic); |
| 535 let EfficientLengthTakeIterable$ = dart.generic(function(E) { | 560 let EfficientLengthTakeIterable$ = dart.generic(function(E) { |
| 536 class EfficientLengthTakeIterable extends TakeIterable$(E) { | 561 class EfficientLengthTakeIterable extends TakeIterable$(E) { |
| 537 EfficientLengthTakeIterable(iterable, takeCount) { | 562 EfficientLengthTakeIterable(iterable, takeCount) { |
| 538 super.TakeIterable$_(iterable, takeCount); | 563 super.TakeIterable$_(iterable, takeCount); |
| 539 } | 564 } |
| 540 get length() { | 565 get length() { |
| 541 let iterableLength = this._iterable.length; | 566 let iterableLength = this[_iterable].length; |
| 542 if (iterableLength > this._takeCount) | 567 if (iterableLength > this[_takeCount]) |
| 543 return this._takeCount; | 568 return this[_takeCount]; |
| 544 return iterableLength; | 569 return iterableLength; |
| 545 } | 570 } |
| 546 } | 571 } |
| 547 return EfficientLengthTakeIterable; | 572 return EfficientLengthTakeIterable; |
| 548 }); | 573 }); |
| 549 let EfficientLengthTakeIterable = EfficientLengthTakeIterable$(dynamic); | 574 let EfficientLengthTakeIterable = EfficientLengthTakeIterable$(dynamic); |
| 550 let TakeIterator$ = dart.generic(function(E) { | 575 let TakeIterator$ = dart.generic(function(E) { |
| 551 class TakeIterator extends core.Iterator$(E) { | 576 class TakeIterator extends core.Iterator$(E) { |
| 552 TakeIterator(_iterator, _remaining) { | 577 TakeIterator($_iterator, $_remaining) { |
| 553 this._iterator = _iterator; | 578 this[_iterator] = $_iterator; |
| 554 this._remaining = _remaining; | 579 this[_remaining] = $_remaining; |
| 555 super.Iterator(); | 580 super.Iterator(); |
| 556 dart.assert(dart.notNull(typeof this._remaining == number) && dart.notNu
ll(this._remaining >= 0)); | 581 dart.assert(dart.notNull(typeof this[_remaining] == number) && dart.notN
ull(this[_remaining] >= 0)); |
| 557 } | 582 } |
| 558 moveNext() { | 583 moveNext() { |
| 559 this._remaining--; | 584 this[_remaining]--; |
| 560 if (this._remaining >= 0) { | 585 if (this[_remaining] >= 0) { |
| 561 return this._iterator.moveNext(); | 586 return this[_iterator].moveNext(); |
| 562 } | 587 } |
| 563 this._remaining = -1; | 588 this[_remaining] = -1; |
| 564 return false; | 589 return false; |
| 565 } | 590 } |
| 566 get current() { | 591 get current() { |
| 567 if (this._remaining < 0) | 592 if (this[_remaining] < 0) |
| 568 return dart.as(null, E); | 593 return dart.as(null, E); |
| 569 return this._iterator.current; | 594 return this[_iterator].current; |
| 570 } | 595 } |
| 571 } | 596 } |
| 572 return TakeIterator; | 597 return TakeIterator; |
| 573 }); | 598 }); |
| 574 let TakeIterator = TakeIterator$(dynamic); | 599 let TakeIterator = TakeIterator$(dynamic); |
| 575 let TakeWhileIterable$ = dart.generic(function(E) { | 600 let TakeWhileIterable$ = dart.generic(function(E) { |
| 576 class TakeWhileIterable extends collection.IterableBase$(E) { | 601 class TakeWhileIterable extends collection.IterableBase$(E) { |
| 577 TakeWhileIterable(_iterable, _f) { | 602 TakeWhileIterable($_iterable, $_f) { |
| 578 this._iterable = _iterable; | 603 this[_iterable] = $_iterable; |
| 579 this._f = _f; | 604 this[_f] = $_f; |
| 580 super.IterableBase(); | 605 super.IterableBase(); |
| 581 } | 606 } |
| 582 get iterator() { | 607 get iterator() { |
| 583 return new TakeWhileIterator(this._iterable.iterator, this._f); | 608 return new TakeWhileIterator(this[_iterable].iterator, this[_f]); |
| 584 } | 609 } |
| 585 } | 610 } |
| 586 return TakeWhileIterable; | 611 return TakeWhileIterable; |
| 587 }); | 612 }); |
| 588 let TakeWhileIterable = TakeWhileIterable$(dynamic); | 613 let TakeWhileIterable = TakeWhileIterable$(dynamic); |
| 589 let TakeWhileIterator$ = dart.generic(function(E) { | 614 let TakeWhileIterator$ = dart.generic(function(E) { |
| 590 class TakeWhileIterator extends core.Iterator$(E) { | 615 class TakeWhileIterator extends core.Iterator$(E) { |
| 591 TakeWhileIterator(_iterator, _f) { | 616 TakeWhileIterator($_iterator, $_f) { |
| 592 this._iterator = _iterator; | 617 this[_iterator] = $_iterator; |
| 593 this._f = _f; | 618 this[_f] = $_f; |
| 594 this._isFinished = false; | 619 this[_isFinished] = false; |
| 595 super.Iterator(); | 620 super.Iterator(); |
| 596 } | 621 } |
| 597 moveNext() { | 622 moveNext() { |
| 598 if (this._isFinished) | 623 if (this[_isFinished]) |
| 599 return false; | 624 return false; |
| 600 if (dart.notNull(!dart.notNull(this._iterator.moveNext())) || dart.notNu
ll(!dart.notNull(this._f(this._iterator.current)))) { | 625 if (dart.notNull(!dart.notNull(this[_iterator].moveNext())) || dart.notN
ull(!dart.notNull(this[_f](this[_iterator].current)))) { |
| 601 this._isFinished = true; | 626 this[_isFinished] = true; |
| 602 return false; | 627 return false; |
| 603 } | 628 } |
| 604 return true; | 629 return true; |
| 605 } | 630 } |
| 606 get current() { | 631 get current() { |
| 607 if (this._isFinished) | 632 if (this[_isFinished]) |
| 608 return dart.as(null, E); | 633 return dart.as(null, E); |
| 609 return this._iterator.current; | 634 return this[_iterator].current; |
| 610 } | 635 } |
| 611 } | 636 } |
| 612 return TakeWhileIterator; | 637 return TakeWhileIterator; |
| 613 }); | 638 }); |
| 614 let TakeWhileIterator = TakeWhileIterator$(dynamic); | 639 let TakeWhileIterator = TakeWhileIterator$(dynamic); |
| 615 let SkipIterable$ = dart.generic(function(E) { | 640 let SkipIterable$ = dart.generic(function(E) { |
| 616 class SkipIterable extends collection.IterableBase$(E) { | 641 class SkipIterable extends collection.IterableBase$(E) { |
| 617 SkipIterable(iterable, count) { | 642 SkipIterable(iterable, count) { |
| 618 if (dart.is(iterable, EfficientLength)) { | 643 if (dart.is(iterable, EfficientLength)) { |
| 619 return new EfficientLengthSkipIterable(iterable, count); | 644 return new EfficientLengthSkipIterable(iterable, count); |
| 620 } | 645 } |
| 621 return new SkipIterable._(iterable, count); | 646 return new SkipIterable._(iterable, count); |
| 622 } | 647 } |
| 623 SkipIterable$_(_iterable, _skipCount) { | 648 SkipIterable$_($_iterable, $_skipCount) { |
| 624 this._iterable = _iterable; | 649 this[_iterable] = $_iterable; |
| 625 this._skipCount = _skipCount; | 650 this[_skipCount] = $_skipCount; |
| 626 super.IterableBase(); | 651 super.IterableBase(); |
| 627 if (!(typeof this._skipCount == number)) { | 652 if (!(typeof this[_skipCount] == number)) { |
| 628 throw new core.ArgumentError.value(this._skipCount, "count is not an i
nteger"); | 653 throw new core.ArgumentError.value(this[_skipCount], "count is not an
integer"); |
| 629 } | 654 } |
| 630 core.RangeError.checkNotNegative(this._skipCount, "count"); | 655 core.RangeError.checkNotNegative(this[_skipCount], "count"); |
| 631 } | 656 } |
| 632 skip(count) { | 657 skip(count) { |
| 633 if (!(typeof this._skipCount == number)) { | 658 if (!(typeof this[_skipCount] == number)) { |
| 634 throw new core.ArgumentError.value(this._skipCount, "count is not an i
nteger"); | 659 throw new core.ArgumentError.value(this[_skipCount], "count is not an
integer"); |
| 635 } | 660 } |
| 636 core.RangeError.checkNotNegative(this._skipCount, "count"); | 661 core.RangeError.checkNotNegative(this[_skipCount], "count"); |
| 637 return new SkipIterable._(this._iterable, this._skipCount + count); | 662 return new SkipIterable._(this[_iterable], this[_skipCount] + count); |
| 638 } | 663 } |
| 639 get iterator() { | 664 get iterator() { |
| 640 return new SkipIterator(this._iterable.iterator, this._skipCount); | 665 return new SkipIterator(this[_iterable].iterator, this[_skipCount]); |
| 641 } | 666 } |
| 642 } | 667 } |
| 643 dart.defineNamedConstructor(SkipIterable, '_'); | 668 dart.defineNamedConstructor(SkipIterable, '_'); |
| 644 return SkipIterable; | 669 return SkipIterable; |
| 645 }); | 670 }); |
| 646 let SkipIterable = SkipIterable$(dynamic); | 671 let SkipIterable = SkipIterable$(dynamic); |
| 647 let EfficientLengthSkipIterable$ = dart.generic(function(E) { | 672 let EfficientLengthSkipIterable$ = dart.generic(function(E) { |
| 648 class EfficientLengthSkipIterable extends SkipIterable$(E) { | 673 class EfficientLengthSkipIterable extends SkipIterable$(E) { |
| 649 EfficientLengthSkipIterable(iterable, skipCount) { | 674 EfficientLengthSkipIterable(iterable, skipCount) { |
| 650 super.SkipIterable$_(iterable, skipCount); | 675 super.SkipIterable$_(iterable, skipCount); |
| 651 } | 676 } |
| 652 get length() { | 677 get length() { |
| 653 let length = this._iterable.length - this._skipCount; | 678 let length = this[_iterable].length - this[_skipCount]; |
| 654 if (length >= 0) | 679 if (length >= 0) |
| 655 return length; | 680 return length; |
| 656 return 0; | 681 return 0; |
| 657 } | 682 } |
| 658 } | 683 } |
| 659 return EfficientLengthSkipIterable; | 684 return EfficientLengthSkipIterable; |
| 660 }); | 685 }); |
| 661 let EfficientLengthSkipIterable = EfficientLengthSkipIterable$(dynamic); | 686 let EfficientLengthSkipIterable = EfficientLengthSkipIterable$(dynamic); |
| 662 let SkipIterator$ = dart.generic(function(E) { | 687 let SkipIterator$ = dart.generic(function(E) { |
| 663 class SkipIterator extends core.Iterator$(E) { | 688 class SkipIterator extends core.Iterator$(E) { |
| 664 SkipIterator(_iterator, _skipCount) { | 689 SkipIterator($_iterator, $_skipCount) { |
| 665 this._iterator = _iterator; | 690 this[_iterator] = $_iterator; |
| 666 this._skipCount = _skipCount; | 691 this[_skipCount] = $_skipCount; |
| 667 super.Iterator(); | 692 super.Iterator(); |
| 668 dart.assert(dart.notNull(typeof this._skipCount == number) && dart.notNu
ll(this._skipCount >= 0)); | 693 dart.assert(dart.notNull(typeof this[_skipCount] == number) && dart.notN
ull(this[_skipCount] >= 0)); |
| 669 } | 694 } |
| 670 moveNext() { | 695 moveNext() { |
| 671 for (let i = 0; i < this._skipCount; i++) | 696 for (let i = 0; i < this[_skipCount]; i++) |
| 672 this._iterator.moveNext(); | 697 this[_iterator].moveNext(); |
| 673 this._skipCount = 0; | 698 this[_skipCount] = 0; |
| 674 return this._iterator.moveNext(); | 699 return this[_iterator].moveNext(); |
| 675 } | 700 } |
| 676 get current() { | 701 get current() { |
| 677 return this._iterator.current; | 702 return this[_iterator].current; |
| 678 } | 703 } |
| 679 } | 704 } |
| 680 return SkipIterator; | 705 return SkipIterator; |
| 681 }); | 706 }); |
| 682 let SkipIterator = SkipIterator$(dynamic); | 707 let SkipIterator = SkipIterator$(dynamic); |
| 683 let SkipWhileIterable$ = dart.generic(function(E) { | 708 let SkipWhileIterable$ = dart.generic(function(E) { |
| 684 class SkipWhileIterable extends collection.IterableBase$(E) { | 709 class SkipWhileIterable extends collection.IterableBase$(E) { |
| 685 SkipWhileIterable(_iterable, _f) { | 710 SkipWhileIterable($_iterable, $_f) { |
| 686 this._iterable = _iterable; | 711 this[_iterable] = $_iterable; |
| 687 this._f = _f; | 712 this[_f] = $_f; |
| 688 super.IterableBase(); | 713 super.IterableBase(); |
| 689 } | 714 } |
| 690 get iterator() { | 715 get iterator() { |
| 691 return new SkipWhileIterator(this._iterable.iterator, this._f); | 716 return new SkipWhileIterator(this[_iterable].iterator, this[_f]); |
| 692 } | 717 } |
| 693 } | 718 } |
| 694 return SkipWhileIterable; | 719 return SkipWhileIterable; |
| 695 }); | 720 }); |
| 696 let SkipWhileIterable = SkipWhileIterable$(dynamic); | 721 let SkipWhileIterable = SkipWhileIterable$(dynamic); |
| 697 let SkipWhileIterator$ = dart.generic(function(E) { | 722 let SkipWhileIterator$ = dart.generic(function(E) { |
| 698 class SkipWhileIterator extends core.Iterator$(E) { | 723 class SkipWhileIterator extends core.Iterator$(E) { |
| 699 SkipWhileIterator(_iterator, _f) { | 724 SkipWhileIterator($_iterator, $_f) { |
| 700 this._iterator = _iterator; | 725 this[_iterator] = $_iterator; |
| 701 this._f = _f; | 726 this[_f] = $_f; |
| 702 this._hasSkipped = false; | 727 this[_hasSkipped] = false; |
| 703 super.Iterator(); | 728 super.Iterator(); |
| 704 } | 729 } |
| 705 moveNext() { | 730 moveNext() { |
| 706 if (!dart.notNull(this._hasSkipped)) { | 731 if (!dart.notNull(this[_hasSkipped])) { |
| 707 this._hasSkipped = true; | 732 this[_hasSkipped] = true; |
| 708 while (this._iterator.moveNext()) { | 733 while (this[_iterator].moveNext()) { |
| 709 if (!dart.notNull(this._f(this._iterator.current))) | 734 if (!dart.notNull(this[_f](this[_iterator].current))) |
| 710 return true; | 735 return true; |
| 711 } | 736 } |
| 712 } | 737 } |
| 713 return this._iterator.moveNext(); | 738 return this[_iterator].moveNext(); |
| 714 } | 739 } |
| 715 get current() { | 740 get current() { |
| 716 return this._iterator.current; | 741 return this[_iterator].current; |
| 717 } | 742 } |
| 718 } | 743 } |
| 719 return SkipWhileIterator; | 744 return SkipWhileIterator; |
| 720 }); | 745 }); |
| 721 let SkipWhileIterator = SkipWhileIterator$(dynamic); | 746 let SkipWhileIterator = SkipWhileIterator$(dynamic); |
| 722 let EmptyIterable$ = dart.generic(function(E) { | 747 let EmptyIterable$ = dart.generic(function(E) { |
| 723 class EmptyIterable extends collection.IterableBase$(E) { | 748 class EmptyIterable extends collection.IterableBase$(E) { |
| 724 EmptyIterable() { | 749 EmptyIterable() { |
| 725 super.IterableBase(); | 750 super.IterableBase(); |
| 726 } | 751 } |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 } | 1088 } |
| 1064 } | 1089 } |
| 1065 static indexOfList(list, element, start) { | 1090 static indexOfList(list, element, start) { |
| 1066 return Lists.indexOf(list, element, start, list.length); | 1091 return Lists.indexOf(list, element, start, list.length); |
| 1067 } | 1092 } |
| 1068 static lastIndexOfList(list, element, start) { | 1093 static lastIndexOfList(list, element, start) { |
| 1069 if (start === null) | 1094 if (start === null) |
| 1070 start = list.length - 1; | 1095 start = list.length - 1; |
| 1071 return Lists.lastIndexOf(list, element, start); | 1096 return Lists.lastIndexOf(list, element, start); |
| 1072 } | 1097 } |
| 1073 static _rangeCheck(list, start, end) { | 1098 static [_rangeCheck](list, start, end) { |
| 1074 core.RangeError.checkValidRange(start, end, list.length); | 1099 core.RangeError.checkValidRange(start, end, list.length); |
| 1075 } | 1100 } |
| 1076 getRangeList(list, start, end) { | 1101 getRangeList(list, start, end) { |
| 1077 _rangeCheck(list, start, end); | 1102 _rangeCheck(list, start, end); |
| 1078 return new SubListIterable(dart.as(list, core.Iterable$(T)), start, end)
; | 1103 return new SubListIterable(dart.as(list, core.Iterable$(T)), start, end)
; |
| 1079 } | 1104 } |
| 1080 static setRangeList(list, start, end, from, skipCount) { | 1105 static setRangeList(list, start, end, from, skipCount) { |
| 1081 _rangeCheck(list, start, end); | 1106 _rangeCheck(list, start, end); |
| 1082 let length = end - start; | 1107 let length = end - start; |
| 1083 if (length === 0) | 1108 if (length === 0) |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 return FixedLengthListBase; | 1349 return FixedLengthListBase; |
| 1325 }); | 1350 }); |
| 1326 let FixedLengthListBase = FixedLengthListBase$(dynamic); | 1351 let FixedLengthListBase = FixedLengthListBase$(dynamic); |
| 1327 let UnmodifiableListBase$ = dart.generic(function(E) { | 1352 let UnmodifiableListBase$ = dart.generic(function(E) { |
| 1328 class UnmodifiableListBase extends dart.mixin(UnmodifiableListMixin$(E)) { | 1353 class UnmodifiableListBase extends dart.mixin(UnmodifiableListMixin$(E)) { |
| 1329 } | 1354 } |
| 1330 return UnmodifiableListBase; | 1355 return UnmodifiableListBase; |
| 1331 }); | 1356 }); |
| 1332 let UnmodifiableListBase = UnmodifiableListBase$(dynamic); | 1357 let UnmodifiableListBase = UnmodifiableListBase$(dynamic); |
| 1333 class _ListIndicesIterable extends ListIterable$(core.int) { | 1358 class _ListIndicesIterable extends ListIterable$(core.int) { |
| 1334 _ListIndicesIterable(_backedList) { | 1359 _ListIndicesIterable($_backedList) { |
| 1335 this._backedList = _backedList; | 1360 this[_backedList] = $_backedList; |
| 1336 super.ListIterable(); | 1361 super.ListIterable(); |
| 1337 } | 1362 } |
| 1338 get length() { | 1363 get length() { |
| 1339 return this._backedList.length; | 1364 return this[_backedList].length; |
| 1340 } | 1365 } |
| 1341 elementAt(index) { | 1366 elementAt(index) { |
| 1342 core.RangeError.checkValidIndex(index, this); | 1367 core.RangeError.checkValidIndex(index, this); |
| 1343 return index; | 1368 return index; |
| 1344 } | 1369 } |
| 1345 } | 1370 } |
| 1346 let ListMapView$ = dart.generic(function(E) { | 1371 let ListMapView$ = dart.generic(function(E) { |
| 1347 class ListMapView extends dart.Object { | 1372 class ListMapView extends dart.Object { |
| 1348 ListMapView(_values) { | 1373 ListMapView($_values) { |
| 1349 this._values = _values; | 1374 this[_values] = $_values; |
| 1350 } | 1375 } |
| 1351 get(key) { | 1376 get(key) { |
| 1352 return dart.as(this.containsKey(key) ? this._values.get(key) : null, E); | 1377 return dart.as(this.containsKey(key) ? this[_values].get(key) : null, E)
; |
| 1353 } | 1378 } |
| 1354 get length() { | 1379 get length() { |
| 1355 return this._values.length; | 1380 return this[_values].length; |
| 1356 } | 1381 } |
| 1357 get values() { | 1382 get values() { |
| 1358 return new SubListIterable(this._values, 0, dart.as(null, core.int)); | 1383 return new SubListIterable(this[_values], 0, dart.as(null, core.int)); |
| 1359 } | 1384 } |
| 1360 get keys() { | 1385 get keys() { |
| 1361 return new _ListIndicesIterable(this._values); | 1386 return new _ListIndicesIterable(this[_values]); |
| 1362 } | 1387 } |
| 1363 get isEmpty() { | 1388 get isEmpty() { |
| 1364 return this._values.isEmpty; | 1389 return this[_values].isEmpty; |
| 1365 } | 1390 } |
| 1366 get isNotEmpty() { | 1391 get isNotEmpty() { |
| 1367 return this._values.isNotEmpty; | 1392 return this[_values].isNotEmpty; |
| 1368 } | 1393 } |
| 1369 containsValue(value) { | 1394 containsValue(value) { |
| 1370 return this._values.contains(value); | 1395 return this[_values].contains(value); |
| 1371 } | 1396 } |
| 1372 containsKey(key) { | 1397 containsKey(key) { |
| 1373 return dart.notNull(dart.notNull(typeof key == number) && dart.notNull(k
ey >= 0)) && dart.notNull(key < this.length); | 1398 return dart.notNull(dart.notNull(typeof key == number) && dart.notNull(k
ey >= 0)) && dart.notNull(key < this.length); |
| 1374 } | 1399 } |
| 1375 forEach(f) { | 1400 forEach(f) { |
| 1376 let length = this._values.length; | 1401 let length = this[_values].length; |
| 1377 for (let i = 0; i < length; i++) { | 1402 for (let i = 0; i < length; i++) { |
| 1378 f(i, this._values.get(i)); | 1403 f(i, this[_values].get(i)); |
| 1379 if (length !== this._values.length) { | 1404 if (length !== this[_values].length) { |
| 1380 throw new core.ConcurrentModificationError(this._values); | 1405 throw new core.ConcurrentModificationError(this[_values]); |
| 1381 } | 1406 } |
| 1382 } | 1407 } |
| 1383 } | 1408 } |
| 1384 set(key, value) { | 1409 set(key, value) { |
| 1385 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); | 1410 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); |
| 1386 } | 1411 } |
| 1387 putIfAbsent(key, ifAbsent) { | 1412 putIfAbsent(key, ifAbsent) { |
| 1388 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); | 1413 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); |
| 1389 } | 1414 } |
| 1390 remove(key) { | 1415 remove(key) { |
| 1391 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); | 1416 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); |
| 1392 } | 1417 } |
| 1393 clear() { | 1418 clear() { |
| 1394 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); | 1419 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); |
| 1395 } | 1420 } |
| 1396 addAll(other) { | 1421 addAll(other) { |
| 1397 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); | 1422 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); |
| 1398 } | 1423 } |
| 1399 toString() { | 1424 toString() { |
| 1400 return collection.Maps.mapToString(this); | 1425 return collection.Maps.mapToString(this); |
| 1401 } | 1426 } |
| 1402 } | 1427 } |
| 1403 return ListMapView; | 1428 return ListMapView; |
| 1404 }); | 1429 }); |
| 1405 let ListMapView = ListMapView$(dynamic); | 1430 let ListMapView = ListMapView$(dynamic); |
| 1406 let ReversedListIterable$ = dart.generic(function(E) { | 1431 let ReversedListIterable$ = dart.generic(function(E) { |
| 1407 class ReversedListIterable extends ListIterable$(E) { | 1432 class ReversedListIterable extends ListIterable$(E) { |
| 1408 ReversedListIterable(_source) { | 1433 ReversedListIterable($_source) { |
| 1409 this._source = _source; | 1434 this[_source] = $_source; |
| 1410 super.ListIterable(); | 1435 super.ListIterable(); |
| 1411 } | 1436 } |
| 1412 get length() { | 1437 get length() { |
| 1413 return this._source.length; | 1438 return this[_source].length; |
| 1414 } | 1439 } |
| 1415 elementAt(index) { | 1440 elementAt(index) { |
| 1416 return this._source.elementAt(this._source.length - 1 - index); | 1441 return this[_source].elementAt(this[_source].length - 1 - index); |
| 1417 } | 1442 } |
| 1418 } | 1443 } |
| 1419 return ReversedListIterable; | 1444 return ReversedListIterable; |
| 1420 }); | 1445 }); |
| 1421 let ReversedListIterable = ReversedListIterable$(dynamic); | 1446 let ReversedListIterable = ReversedListIterable$(dynamic); |
| 1422 class UnmodifiableListError extends dart.Object { | 1447 class UnmodifiableListError extends dart.Object { |
| 1423 static add() { | 1448 static add() { |
| 1424 return new core.UnsupportedError("Cannot add to unmodifiable List"); | 1449 return new core.UnsupportedError("Cannot add to unmodifiable List"); |
| 1425 } | 1450 } |
| 1426 static change() { | 1451 static change() { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 class Sort extends dart.Object { | 1548 class Sort extends dart.Object { |
| 1524 static sort(a, compare) { | 1549 static sort(a, compare) { |
| 1525 _doSort(a, 0, a.length - 1, compare); | 1550 _doSort(a, 0, a.length - 1, compare); |
| 1526 } | 1551 } |
| 1527 static sortRange(a, from, to, compare) { | 1552 static sortRange(a, from, to, compare) { |
| 1528 if (dart.notNull(dart.notNull(from < 0) || dart.notNull(to > a.length)) ||
dart.notNull(to < from)) { | 1553 if (dart.notNull(dart.notNull(from < 0) || dart.notNull(to > a.length)) ||
dart.notNull(to < from)) { |
| 1529 throw "OutOfRange"; | 1554 throw "OutOfRange"; |
| 1530 } | 1555 } |
| 1531 _doSort(a, from, to - 1, compare); | 1556 _doSort(a, from, to - 1, compare); |
| 1532 } | 1557 } |
| 1533 static _doSort(a, left, right, compare) { | 1558 static [_doSort](a, left, right, compare) { |
| 1534 if (right - left <= _INSERTION_SORT_THRESHOLD) { | 1559 if (right - left <= _INSERTION_SORT_THRESHOLD) { |
| 1535 _insertionSort(a, left, right, compare); | 1560 _insertionSort(a, left, right, compare); |
| 1536 } else { | 1561 } else { |
| 1537 _dualPivotQuicksort(a, left, right, compare); | 1562 _dualPivotQuicksort(a, left, right, compare); |
| 1538 } | 1563 } |
| 1539 } | 1564 } |
| 1540 static _insertionSort(a, left, right, compare) { | 1565 static [_insertionSort](a, left, right, compare) { |
| 1541 for (let i = left + 1; i <= right; i++) { | 1566 for (let i = left + 1; i <= right; i++) { |
| 1542 let el = a.get(i); | 1567 let el = a.get(i); |
| 1543 let j = i; | 1568 let j = i; |
| 1544 while (dart.notNull(j > left) && dart.notNull(compare(a.get(j - 1), el)
> 0)) { | 1569 while (dart.notNull(j > left) && dart.notNull(compare(a.get(j - 1), el)
> 0)) { |
| 1545 a.set(j, a.get(j - 1)); | 1570 a.set(j, a.get(j - 1)); |
| 1546 j--; | 1571 j--; |
| 1547 } | 1572 } |
| 1548 a.set(j, el); | 1573 a.set(j, el); |
| 1549 } | 1574 } |
| 1550 } | 1575 } |
| 1551 static _dualPivotQuicksort(a, left, right, compare) { | 1576 static [_dualPivotQuicksort](a, left, right, compare) { |
| 1552 dart.assert(right - left > _INSERTION_SORT_THRESHOLD); | 1577 dart.assert(right - left > _INSERTION_SORT_THRESHOLD); |
| 1553 let sixth = ((right - left + 1) / 6).truncate(); | 1578 let sixth = ((right - left + 1) / 6).truncate(); |
| 1554 let index1 = left + sixth; | 1579 let index1 = left + sixth; |
| 1555 let index5 = right - sixth; | 1580 let index5 = right - sixth; |
| 1556 let index3 = ((left + right) / 2).truncate(); | 1581 let index3 = ((left + right) / 2).truncate(); |
| 1557 let index2 = index3 - sixth; | 1582 let index2 = index3 - sixth; |
| 1558 let index4 = index3 + sixth; | 1583 let index4 = index3 + sixth; |
| 1559 let el1 = a.get(index1); | 1584 let el1 = a.get(index1); |
| 1560 let el2 = a.get(index2); | 1585 let el2 = a.get(index2); |
| 1561 let el3 = a.get(index3); | 1586 let el3 = a.get(index3); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1738 } | 1763 } |
| 1739 _doSort(a, less, great, compare); | 1764 _doSort(a, less, great, compare); |
| 1740 } else { | 1765 } else { |
| 1741 _doSort(a, less, great, compare); | 1766 _doSort(a, less, great, compare); |
| 1742 } | 1767 } |
| 1743 } | 1768 } |
| 1744 } | 1769 } |
| 1745 Sort._INSERTION_SORT_THRESHOLD = 32; | 1770 Sort._INSERTION_SORT_THRESHOLD = 32; |
| 1746 class Symbol extends dart.Object { | 1771 class Symbol extends dart.Object { |
| 1747 Symbol(name) { | 1772 Symbol(name) { |
| 1748 this._name = name; | 1773 this[_name] = name; |
| 1749 } | 1774 } |
| 1750 Symbol$unvalidated(_name) { | 1775 Symbol$unvalidated($_name) { |
| 1751 this._name = _name; | 1776 this[_name] = $_name; |
| 1752 } | 1777 } |
| 1753 Symbol$validated(name) { | 1778 Symbol$validated(name) { |
| 1754 this._name = validatePublicSymbol(name); | 1779 this[_name] = validatePublicSymbol(name); |
| 1755 } | 1780 } |
| 1756 ['=='](other) { | 1781 ['=='](other) { |
| 1757 return dart.notNull(dart.is(other, Symbol)) && dart.notNull(dart.equals(th
is._name, dart.dload(other, '_name'))); | 1782 return dart.notNull(dart.is(other, Symbol)) && dart.notNull(dart.equals(th
is[_name], dart.dload(other, '_name'))); |
| 1758 } | 1783 } |
| 1759 get hashCode() { | 1784 get hashCode() { |
| 1760 let arbitraryPrime = 664597; | 1785 let arbitraryPrime = 664597; |
| 1761 return 536870911 & arbitraryPrime * this._name.hashCode; | 1786 return 536870911 & arbitraryPrime * this[_name].hashCode; |
| 1762 } | 1787 } |
| 1763 toString() { | 1788 toString() { |
| 1764 return `Symbol("${this._name}")`; | 1789 return `Symbol("${this[_name]}")`; |
| 1765 } | 1790 } |
| 1766 static getName(symbol) { | 1791 static getName(symbol) { |
| 1767 return symbol._name; | 1792 return symbol[_name]; |
| 1768 } | 1793 } |
| 1769 static validatePublicSymbol(name) { | 1794 static validatePublicSymbol(name) { |
| 1770 if (dart.notNull(name.isEmpty) || dart.notNull(publicSymbolPattern.hasMatc
h(name))) | 1795 if (dart.notNull(name.isEmpty) || dart.notNull(publicSymbolPattern.hasMatc
h(name))) |
| 1771 return name; | 1796 return name; |
| 1772 if (name.startsWith('_')) { | 1797 if (name.startsWith('_')) { |
| 1773 throw new core.ArgumentError(`"${name}" is a private identifier`); | 1798 throw new core.ArgumentError(`"${name}" is a private identifier`); |
| 1774 } | 1799 } |
| 1775 throw new core.ArgumentError(`"${name}" is not a valid (qualified) symbol
name`); | 1800 throw new core.ArgumentError(`"${name}" is not a valid (qualified) symbol
name`); |
| 1776 } | 1801 } |
| 1777 static isValidSymbol(name) { | 1802 static isValidSymbol(name) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 _internal.ReversedListIterable = ReversedListIterable; | 1884 _internal.ReversedListIterable = ReversedListIterable; |
| 1860 _internal.ReversedListIterable$ = ReversedListIterable$; | 1885 _internal.ReversedListIterable$ = ReversedListIterable$; |
| 1861 _internal.UnmodifiableListError = UnmodifiableListError; | 1886 _internal.UnmodifiableListError = UnmodifiableListError; |
| 1862 _internal.NonGrowableListError = NonGrowableListError; | 1887 _internal.NonGrowableListError = NonGrowableListError; |
| 1863 _internal.makeListFixedLength = makeListFixedLength; | 1888 _internal.makeListFixedLength = makeListFixedLength; |
| 1864 _internal.Lists = Lists; | 1889 _internal.Lists = Lists; |
| 1865 _internal.printToConsole = printToConsole; | 1890 _internal.printToConsole = printToConsole; |
| 1866 _internal.Sort = Sort; | 1891 _internal.Sort = Sort; |
| 1867 _internal.Symbol = Symbol; | 1892 _internal.Symbol = Symbol; |
| 1868 })(_internal || (_internal = {})); | 1893 })(_internal || (_internal = {})); |
| OLD | NEW |