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

Side by Side Diff: test/codegen/expect/_internal/_internal.js

Issue 963343002: implement private members, fixes #74 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 var _internal; 1 var _internal;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
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]); 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]);
5 class EfficientLength extends dart.Object { 5 class EfficientLength extends dart.Object {
6 } 6 }
7 let ListIterable$ = dart.generic(function(E) { 7 let ListIterable$ = dart.generic(function(E) {
8 class ListIterable extends collection.IterableBase$(E) { 8 class ListIterable extends collection.IterableBase$(E) {
9 ListIterable() { 9 ListIterable() {
10 super.IterableBase(); 10 super.IterableBase();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 let result = new core.Set(); 218 let result = new core.Set();
219 for (let i = 0; i < this.length; i++) { 219 for (let i = 0; i < this.length; i++) {
220 result.add(this.elementAt(i)); 220 result.add(this.elementAt(i));
221 } 221 }
222 return result; 222 return result;
223 } 223 }
224 } 224 }
225 return ListIterable; 225 return ListIterable;
226 }); 226 });
227 let ListIterable = ListIterable$(dynamic); 227 let ListIterable = ListIterable$(dynamic);
228 let _iterable = Symbol('_iterable');
229 let _start = Symbol('_start');
230 let _endOrLength = Symbol('_endOrLength');
231 let _endIndex = Symbol('_endIndex');
232 let _startIndex = Symbol('_startIndex');
228 let SubListIterable$ = dart.generic(function(E) { 233 let SubListIterable$ = dart.generic(function(E) {
229 class SubListIterable extends ListIterable$(E) { 234 class SubListIterable extends ListIterable$(E) {
230 SubListIterable(_iterable, _start, _endOrLength) { 235 SubListIterable($_iterable, $_start, $_endOrLength) {
231 this._iterable = _iterable; 236 this[_iterable] = $_iterable;
232 this._start = _start; 237 this[_start] = $_start;
233 this._endOrLength = _endOrLength; 238 this[_endOrLength] = $_endOrLength;
234 super.ListIterable(); 239 super.ListIterable();
235 core.RangeError.checkNotNegative(this._start, "start"); 240 core.RangeError.checkNotNegative(this[_start], "start");
236 if (this._endOrLength !== null) { 241 if (this[_endOrLength] !== null) {
237 core.RangeError.checkNotNegative(this._endOrLength, "end"); 242 core.RangeError.checkNotNegative(this[_endOrLength], "end");
238 if (this._start > this._endOrLength) { 243 if (this[_start] > this[_endOrLength]) {
239 throw new core.RangeError.range(this._start, 0, this._endOrLength, " start"); 244 throw new core.RangeError.range(this[_start], 0, this[_endOrLength], "start");
240 } 245 }
241 } 246 }
242 } 247 }
243 get _endIndex() { 248 get [_endIndex]() {
244 let length = this._iterable.length; 249 let length = this[_iterable].length;
245 if (dart.notNull(this._endOrLength === null) || dart.notNull(this._endOr Length > length)) 250 if (dart.notNull(this[_endOrLength] === null) || dart.notNull(this[_endO rLength] > length))
246 return length; 251 return length;
247 return this._endOrLength; 252 return this[_endOrLength];
248 } 253 }
249 get _startIndex() { 254 get [_startIndex]() {
250 let length = this._iterable.length; 255 let length = this[_iterable].length;
251 if (this._start > length) 256 if (this[_start] > length)
252 return length; 257 return length;
253 return this._start; 258 return this[_start];
254 } 259 }
255 get length() { 260 get length() {
256 let length = this._iterable.length; 261 let length = this[_iterable].length;
257 if (this._start >= length) 262 if (this[_start] >= length)
258 return 0; 263 return 0;
259 if (dart.notNull(this._endOrLength === null) || dart.notNull(this._endOr Length >= length)) { 264 if (dart.notNull(this[_endOrLength] === null) || dart.notNull(this[_endO rLength] >= length)) {
260 return length - this._start; 265 return length - this[_start];
261 } 266 }
262 return this._endOrLength - this._start; 267 return this[_endOrLength] - this[_start];
263 } 268 }
264 elementAt(index) { 269 elementAt(index) {
265 let realIndex = this._startIndex + index; 270 let realIndex = this[_startIndex] + index;
266 if (dart.notNull(index < 0) || dart.notNull(realIndex >= this._endIndex) ) { 271 if (dart.notNull(index < 0) || dart.notNull(realIndex >= this[_endIndex] )) {
267 throw new core.RangeError.index(index, this, "index"); 272 throw new core.RangeError.index(index, this, "index");
268 } 273 }
269 return this._iterable.elementAt(realIndex); 274 return this[_iterable].elementAt(realIndex);
270 } 275 }
271 skip(count) { 276 skip(count) {
272 core.RangeError.checkNotNegative(count, "count"); 277 core.RangeError.checkNotNegative(count, "count");
273 let newStart = this._start + count; 278 let newStart = this[_start] + count;
274 if (dart.notNull(this._endOrLength !== null) && dart.notNull(newStart >= this._endOrLength)) { 279 if (dart.notNull(this[_endOrLength] !== null) && dart.notNull(newStart > = this[_endOrLength])) {
275 return new EmptyIterable(); 280 return new EmptyIterable();
276 } 281 }
277 return new SubListIterable(this._iterable, newStart, this._endOrLength); 282 return new SubListIterable(this[_iterable], newStart, this[_endOrLength] );
278 } 283 }
279 take(count) { 284 take(count) {
280 core.RangeError.checkNotNegative(count, "count"); 285 core.RangeError.checkNotNegative(count, "count");
281 if (this._endOrLength === null) { 286 if (this[_endOrLength] === null) {
282 return new SubListIterable(this._iterable, this._start, this._start + count); 287 return new SubListIterable(this[_iterable], this[_start], this[_start] + count);
283 } else { 288 } else {
284 let newEnd = this._start + count; 289 let newEnd = this[_start] + count;
285 if (this._endOrLength < newEnd) 290 if (this[_endOrLength] < newEnd)
286 return this; 291 return this;
287 return new SubListIterable(this._iterable, this._start, newEnd); 292 return new SubListIterable(this[_iterable], this[_start], newEnd);
288 } 293 }
289 } 294 }
290 toList(opt$) { 295 toList(opt$) {
291 let growable = opt$.growable === void 0 ? true : opt$.growable; 296 let growable = opt$.growable === void 0 ? true : opt$.growable;
292 let start = this._start; 297 let start = this[_start];
293 let end = this._iterable.length; 298 let end = this[_iterable].length;
294 if (dart.notNull(this._endOrLength !== null) && dart.notNull(this._endOr Length < end)) 299 if (dart.notNull(this[_endOrLength] !== null) && dart.notNull(this[_endO rLength] < end))
295 end = this._endOrLength; 300 end = this[_endOrLength];
296 let length = end - start; 301 let length = end - start;
297 if (length < 0) 302 if (length < 0)
298 length = 0; 303 length = 0;
299 let result = growable ? ((_) => { 304 let result = growable ? ((_) => {
300 _.length = length; 305 _.length = length;
301 return _; 306 return _;
302 }).bind(this)(new core.List()) : new core.List(length); 307 }).bind(this)(new core.List()) : new core.List(length);
303 for (let i = 0; i < length; i++) { 308 for (let i = 0; i < length; i++) {
304 result.set(i, this._iterable.elementAt(start + i)); 309 result.set(i, this[_iterable].elementAt(start + i));
305 if (this._iterable.length < end) 310 if (this[_iterable].length < end)
306 throw new core.ConcurrentModificationError(this); 311 throw new core.ConcurrentModificationError(this);
307 } 312 }
308 return dart.as(result, core.List$(E)); 313 return dart.as(result, core.List$(E));
309 } 314 }
310 } 315 }
311 return SubListIterable; 316 return SubListIterable;
312 }); 317 });
313 let SubListIterable = SubListIterable$(dynamic); 318 let SubListIterable = SubListIterable$(dynamic);
319 let _length = Symbol('_length');
320 let _index = Symbol('_index');
321 let _current = Symbol('_current');
314 let ListIterator$ = dart.generic(function(E) { 322 let ListIterator$ = dart.generic(function(E) {
315 class ListIterator extends dart.Object { 323 class ListIterator extends dart.Object {
316 ListIterator(iterable) { 324 ListIterator(iterable) {
317 this._iterable = iterable; 325 this[_iterable] = iterable;
318 this._length = iterable.length; 326 this[_length] = iterable.length;
319 this._index = 0; 327 this[_index] = 0;
320 this._current = dart.as(null, E); 328 this[_current] = dart.as(null, E);
321 } 329 }
322 get current() { 330 get current() {
323 return this._current; 331 return this[_current];
324 } 332 }
325 moveNext() { 333 moveNext() {
326 let length = this._iterable.length; 334 let length = this[_iterable].length;
327 if (this._length !== length) { 335 if (this[_length] !== length) {
328 throw new core.ConcurrentModificationError(this._iterable); 336 throw new core.ConcurrentModificationError(this[_iterable]);
329 } 337 }
330 if (this._index >= length) { 338 if (this[_index] >= length) {
331 this._current = dart.as(null, E); 339 this[_current] = dart.as(null, E);
332 return false; 340 return false;
333 } 341 }
334 this._current = this._iterable.elementAt(this._index); 342 this[_current] = this[_iterable].elementAt(this[_index]);
335 this._index++; 343 this[_index]++;
336 return true; 344 return true;
337 } 345 }
338 } 346 }
339 return ListIterator; 347 return ListIterator;
340 }); 348 });
341 let ListIterator = ListIterator$(dynamic); 349 let ListIterator = ListIterator$(dynamic);
350 let _f = Symbol('_f');
342 let MappedIterable$ = dart.generic(function(S, T) { 351 let MappedIterable$ = dart.generic(function(S, T) {
343 class MappedIterable extends collection.IterableBase$(T) { 352 class MappedIterable extends collection.IterableBase$(T) {
344 MappedIterable(iterable, function) { 353 MappedIterable(iterable, function) {
345 if (dart.is(iterable, EfficientLength)) { 354 if (dart.is(iterable, EfficientLength)) {
346 return new EfficientLengthMappedIterable(iterable, function); 355 return new EfficientLengthMappedIterable(iterable, function);
347 } 356 }
348 return new MappedIterable._(dart.as(iterable, core.Iterable$(S)), functi on); 357 return new MappedIterable._(dart.as(iterable, core.Iterable$(S)), functi on);
349 } 358 }
350 MappedIterable$_(_iterable, _f) { 359 MappedIterable$_($_iterable, $_f) {
351 this._iterable = _iterable; 360 this[_iterable] = $_iterable;
352 this._f = _f; 361 this[_f] = $_f;
353 super.IterableBase(); 362 super.IterableBase();
354 } 363 }
355 get iterator() { 364 get iterator() {
356 return new MappedIterator(this._iterable.iterator, this._f); 365 return new MappedIterator(this[_iterable].iterator, this[_f]);
357 } 366 }
358 get length() { 367 get length() {
359 return this._iterable.length; 368 return this[_iterable].length;
360 } 369 }
361 get isEmpty() { 370 get isEmpty() {
362 return this._iterable.isEmpty; 371 return this[_iterable].isEmpty;
363 } 372 }
364 get first() { 373 get first() {
365 return this._f(this._iterable.first); 374 return this[_f](this[_iterable].first);
366 } 375 }
367 get last() { 376 get last() {
368 return this._f(this._iterable.last); 377 return this[_f](this[_iterable].last);
369 } 378 }
370 get single() { 379 get single() {
371 return this._f(this._iterable.single); 380 return this[_f](this[_iterable].single);
372 } 381 }
373 elementAt(index) { 382 elementAt(index) {
374 return this._f(this._iterable.elementAt(index)); 383 return this[_f](this[_iterable].elementAt(index));
375 } 384 }
376 } 385 }
377 dart.defineNamedConstructor(MappedIterable, '_'); 386 dart.defineNamedConstructor(MappedIterable, '_');
378 return MappedIterable; 387 return MappedIterable;
379 }); 388 });
380 let MappedIterable = MappedIterable$(dynamic, dynamic); 389 let MappedIterable = MappedIterable$(dynamic, dynamic);
381 let EfficientLengthMappedIterable$ = dart.generic(function(S, T) { 390 let EfficientLengthMappedIterable$ = dart.generic(function(S, T) {
382 class EfficientLengthMappedIterable extends MappedIterable$(S, T) { 391 class EfficientLengthMappedIterable extends MappedIterable$(S, T) {
383 EfficientLengthMappedIterable(iterable, function) { 392 EfficientLengthMappedIterable(iterable, function) {
384 super.MappedIterable$_(dart.as(iterable, core.Iterable$(S)), function); 393 super.MappedIterable$_(dart.as(iterable, core.Iterable$(S)), function);
385 } 394 }
386 } 395 }
387 return EfficientLengthMappedIterable; 396 return EfficientLengthMappedIterable;
388 }); 397 });
389 let EfficientLengthMappedIterable = EfficientLengthMappedIterable$(dynamic, dy namic); 398 let EfficientLengthMappedIterable = EfficientLengthMappedIterable$(dynamic, dy namic);
399 let _iterator = Symbol('_iterator');
390 let MappedIterator$ = dart.generic(function(S, T) { 400 let MappedIterator$ = dart.generic(function(S, T) {
391 class MappedIterator extends core.Iterator$(T) { 401 class MappedIterator extends core.Iterator$(T) {
392 MappedIterator(_iterator, _f) { 402 MappedIterator($_iterator, $_f) {
393 this._iterator = _iterator; 403 this[_iterator] = $_iterator;
394 this._f = _f; 404 this[_f] = $_f;
395 this._current = dart.as(null, T); 405 this[_current] = dart.as(null, T);
396 super.Iterator(); 406 super.Iterator();
397 } 407 }
398 moveNext() { 408 moveNext() {
399 if (this._iterator.moveNext()) { 409 if (this[_iterator].moveNext()) {
400 this._current = this._f(this._iterator.current); 410 this[_current] = this[_f](this[_iterator].current);
401 return true; 411 return true;
402 } 412 }
403 this._current = dart.as(null, T); 413 this[_current] = dart.as(null, T);
404 return false; 414 return false;
405 } 415 }
406 get current() { 416 get current() {
407 return this._current; 417 return this[_current];
408 } 418 }
409 } 419 }
410 return MappedIterator; 420 return MappedIterator;
411 }); 421 });
412 let MappedIterator = MappedIterator$(dynamic, dynamic); 422 let MappedIterator = MappedIterator$(dynamic, dynamic);
423 let _source = Symbol('_source');
413 let MappedListIterable$ = dart.generic(function(S, T) { 424 let MappedListIterable$ = dart.generic(function(S, T) {
414 class MappedListIterable extends ListIterable$(T) { 425 class MappedListIterable extends ListIterable$(T) {
415 MappedListIterable(_source, _f) { 426 MappedListIterable($_source, $_f) {
416 this._source = _source; 427 this[_source] = $_source;
417 this._f = _f; 428 this[_f] = $_f;
418 super.ListIterable(); 429 super.ListIterable();
419 } 430 }
420 get length() { 431 get length() {
421 return this._source.length; 432 return this[_source].length;
422 } 433 }
423 elementAt(index) { 434 elementAt(index) {
424 return this._f(this._source.elementAt(index)); 435 return this[_f](this[_source].elementAt(index));
425 } 436 }
426 } 437 }
427 return MappedListIterable; 438 return MappedListIterable;
428 }); 439 });
429 let MappedListIterable = MappedListIterable$(dynamic, dynamic); 440 let MappedListIterable = MappedListIterable$(dynamic, dynamic);
430 let WhereIterable$ = dart.generic(function(E) { 441 let WhereIterable$ = dart.generic(function(E) {
431 class WhereIterable extends collection.IterableBase$(E) { 442 class WhereIterable extends collection.IterableBase$(E) {
432 WhereIterable(_iterable, _f) { 443 WhereIterable($_iterable, $_f) {
433 this._iterable = _iterable; 444 this[_iterable] = $_iterable;
434 this._f = _f; 445 this[_f] = $_f;
435 super.IterableBase(); 446 super.IterableBase();
436 } 447 }
437 get iterator() { 448 get iterator() {
438 return new WhereIterator(this._iterable.iterator, this._f); 449 return new WhereIterator(this[_iterable].iterator, this[_f]);
439 } 450 }
440 } 451 }
441 return WhereIterable; 452 return WhereIterable;
442 }); 453 });
443 let WhereIterable = WhereIterable$(dynamic); 454 let WhereIterable = WhereIterable$(dynamic);
444 let WhereIterator$ = dart.generic(function(E) { 455 let WhereIterator$ = dart.generic(function(E) {
445 class WhereIterator extends core.Iterator$(E) { 456 class WhereIterator extends core.Iterator$(E) {
446 WhereIterator(_iterator, _f) { 457 WhereIterator($_iterator, $_f) {
447 this._iterator = _iterator; 458 this[_iterator] = $_iterator;
448 this._f = _f; 459 this[_f] = $_f;
449 super.Iterator(); 460 super.Iterator();
450 } 461 }
451 moveNext() { 462 moveNext() {
452 while (this._iterator.moveNext()) { 463 while (this[_iterator].moveNext()) {
453 if (this._f(this._iterator.current)) { 464 if (this[_f](this[_iterator].current)) {
454 return true; 465 return true;
455 } 466 }
456 } 467 }
457 return false; 468 return false;
458 } 469 }
459 get current() { 470 get current() {
460 return this._iterator.current; 471 return this[_iterator].current;
461 } 472 }
462 } 473 }
463 return WhereIterator; 474 return WhereIterator;
464 }); 475 });
465 let WhereIterator = WhereIterator$(dynamic); 476 let WhereIterator = WhereIterator$(dynamic);
466 let ExpandIterable$ = dart.generic(function(S, T) { 477 let ExpandIterable$ = dart.generic(function(S, T) {
467 class ExpandIterable extends collection.IterableBase$(T) { 478 class ExpandIterable extends collection.IterableBase$(T) {
468 ExpandIterable(_iterable, _f) { 479 ExpandIterable($_iterable, $_f) {
469 this._iterable = _iterable; 480 this[_iterable] = $_iterable;
470 this._f = _f; 481 this[_f] = $_f;
471 super.IterableBase(); 482 super.IterableBase();
472 } 483 }
473 get iterator() { 484 get iterator() {
474 return new ExpandIterator(this._iterable.iterator, dart.as(this._f, dart .throw_("Unimplemented type (S) → Iterable<T>"))); 485 return new ExpandIterator(this[_iterable].iterator, dart.as(this[_f], da rt.throw_("Unimplemented type (S) → Iterable<T>")));
475 } 486 }
476 } 487 }
477 return ExpandIterable; 488 return ExpandIterable;
478 }); 489 });
479 let ExpandIterable = ExpandIterable$(dynamic, dynamic); 490 let ExpandIterable = ExpandIterable$(dynamic, dynamic);
491 let _currentExpansion = Symbol('_currentExpansion');
492 let _nextExpansion = Symbol('_nextExpansion');
480 let ExpandIterator$ = dart.generic(function(S, T) { 493 let ExpandIterator$ = dart.generic(function(S, T) {
481 class ExpandIterator extends dart.Object { 494 class ExpandIterator extends dart.Object {
482 ExpandIterator(_iterator, _f) { 495 ExpandIterator($_iterator, $_f) {
483 this._iterator = _iterator; 496 this[_iterator] = $_iterator;
484 this._f = _f; 497 this[_f] = $_f;
485 this._currentExpansion = dart.as(new EmptyIterator(), core.Iterator$(T)) ; 498 this[_currentExpansion] = dart.as(new EmptyIterator(), core.Iterator$(T) );
486 this._current = dart.as(null, T); 499 this[_current] = dart.as(null, T);
487 } 500 }
488 _nextExpansion() {} 501 [_nextExpansion]() {}
489 get current() { 502 get current() {
490 return this._current; 503 return this[_current];
491 } 504 }
492 moveNext() { 505 moveNext() {
493 if (this._currentExpansion === null) 506 if (this[_currentExpansion] === null)
494 return false; 507 return false;
495 while (!dart.notNull(this._currentExpansion.moveNext())) { 508 while (!dart.notNull(this[_currentExpansion].moveNext())) {
496 this._current = dart.as(null, T); 509 this[_current] = dart.as(null, T);
497 if (this._iterator.moveNext()) { 510 if (this[_iterator].moveNext()) {
498 this._currentExpansion = null; 511 this[_currentExpansion] = null;
499 this._currentExpansion = dart.as(this._f(this._iterator.current).ite rator, core.Iterator$(T)); 512 this[_currentExpansion] = dart.as(this[_f](this[_iterator].current). iterator, core.Iterator$(T));
500 } else { 513 } else {
501 return false; 514 return false;
502 } 515 }
503 } 516 }
504 this._current = this._currentExpansion.current; 517 this[_current] = this[_currentExpansion].current;
505 return true; 518 return true;
506 } 519 }
507 } 520 }
508 return ExpandIterator; 521 return ExpandIterator;
509 }); 522 });
510 let ExpandIterator = ExpandIterator$(dynamic, dynamic); 523 let ExpandIterator = ExpandIterator$(dynamic, dynamic);
524 let _takeCount = Symbol('_takeCount');
511 let TakeIterable$ = dart.generic(function(E) { 525 let TakeIterable$ = dart.generic(function(E) {
512 class TakeIterable extends collection.IterableBase$(E) { 526 class TakeIterable extends collection.IterableBase$(E) {
513 TakeIterable(iterable, takeCount) { 527 TakeIterable(iterable, takeCount) {
514 if (dart.notNull(!(typeof takeCount == number)) || dart.notNull(takeCoun t < 0)) { 528 if (dart.notNull(!(typeof takeCount == number)) || dart.notNull(takeCoun t < 0)) {
515 throw new core.ArgumentError(takeCount); 529 throw new core.ArgumentError(takeCount);
516 } 530 }
517 if (dart.is(iterable, EfficientLength)) { 531 if (dart.is(iterable, EfficientLength)) {
518 return new EfficientLengthTakeIterable(iterable, takeCount); 532 return new EfficientLengthTakeIterable(iterable, takeCount);
519 } 533 }
520 return new TakeIterable._(iterable, takeCount); 534 return new TakeIterable._(iterable, takeCount);
521 } 535 }
522 TakeIterable$_(_iterable, _takeCount) { 536 TakeIterable$_($_iterable, $_takeCount) {
523 this._iterable = _iterable; 537 this[_iterable] = $_iterable;
524 this._takeCount = _takeCount; 538 this[_takeCount] = $_takeCount;
525 super.IterableBase(); 539 super.IterableBase();
526 } 540 }
527 get iterator() { 541 get iterator() {
528 return new TakeIterator(this._iterable.iterator, this._takeCount); 542 return new TakeIterator(this[_iterable].iterator, this[_takeCount]);
529 } 543 }
530 } 544 }
531 dart.defineNamedConstructor(TakeIterable, '_'); 545 dart.defineNamedConstructor(TakeIterable, '_');
532 return TakeIterable; 546 return TakeIterable;
533 }); 547 });
534 let TakeIterable = TakeIterable$(dynamic); 548 let TakeIterable = TakeIterable$(dynamic);
535 let EfficientLengthTakeIterable$ = dart.generic(function(E) { 549 let EfficientLengthTakeIterable$ = dart.generic(function(E) {
536 class EfficientLengthTakeIterable extends TakeIterable$(E) { 550 class EfficientLengthTakeIterable extends TakeIterable$(E) {
537 EfficientLengthTakeIterable(iterable, takeCount) { 551 EfficientLengthTakeIterable(iterable, takeCount) {
538 super.TakeIterable$_(iterable, takeCount); 552 super.TakeIterable$_(iterable, takeCount);
539 } 553 }
540 get length() { 554 get length() {
541 let iterableLength = this._iterable.length; 555 let iterableLength = this[_iterable].length;
542 if (iterableLength > this._takeCount) 556 if (iterableLength > this[_takeCount])
543 return this._takeCount; 557 return this[_takeCount];
544 return iterableLength; 558 return iterableLength;
545 } 559 }
546 } 560 }
547 return EfficientLengthTakeIterable; 561 return EfficientLengthTakeIterable;
548 }); 562 });
549 let EfficientLengthTakeIterable = EfficientLengthTakeIterable$(dynamic); 563 let EfficientLengthTakeIterable = EfficientLengthTakeIterable$(dynamic);
564 let _remaining = Symbol('_remaining');
550 let TakeIterator$ = dart.generic(function(E) { 565 let TakeIterator$ = dart.generic(function(E) {
551 class TakeIterator extends core.Iterator$(E) { 566 class TakeIterator extends core.Iterator$(E) {
552 TakeIterator(_iterator, _remaining) { 567 TakeIterator($_iterator, $_remaining) {
553 this._iterator = _iterator; 568 this[_iterator] = $_iterator;
554 this._remaining = _remaining; 569 this[_remaining] = $_remaining;
555 super.Iterator(); 570 super.Iterator();
556 dart.assert(dart.notNull(typeof this._remaining == number) && dart.notNu ll(this._remaining >= 0)); 571 dart.assert(dart.notNull(typeof this[_remaining] == number) && dart.notN ull(this[_remaining] >= 0));
557 } 572 }
558 moveNext() { 573 moveNext() {
559 this._remaining--; 574 this[_remaining]--;
560 if (this._remaining >= 0) { 575 if (this[_remaining] >= 0) {
561 return this._iterator.moveNext(); 576 return this[_iterator].moveNext();
562 } 577 }
563 this._remaining = -1; 578 this[_remaining] = -1;
564 return false; 579 return false;
565 } 580 }
566 get current() { 581 get current() {
567 if (this._remaining < 0) 582 if (this[_remaining] < 0)
568 return dart.as(null, E); 583 return dart.as(null, E);
569 return this._iterator.current; 584 return this[_iterator].current;
570 } 585 }
571 } 586 }
572 return TakeIterator; 587 return TakeIterator;
573 }); 588 });
574 let TakeIterator = TakeIterator$(dynamic); 589 let TakeIterator = TakeIterator$(dynamic);
575 let TakeWhileIterable$ = dart.generic(function(E) { 590 let TakeWhileIterable$ = dart.generic(function(E) {
576 class TakeWhileIterable extends collection.IterableBase$(E) { 591 class TakeWhileIterable extends collection.IterableBase$(E) {
577 TakeWhileIterable(_iterable, _f) { 592 TakeWhileIterable($_iterable, $_f) {
578 this._iterable = _iterable; 593 this[_iterable] = $_iterable;
579 this._f = _f; 594 this[_f] = $_f;
580 super.IterableBase(); 595 super.IterableBase();
581 } 596 }
582 get iterator() { 597 get iterator() {
583 return new TakeWhileIterator(this._iterable.iterator, this._f); 598 return new TakeWhileIterator(this[_iterable].iterator, this[_f]);
584 } 599 }
585 } 600 }
586 return TakeWhileIterable; 601 return TakeWhileIterable;
587 }); 602 });
588 let TakeWhileIterable = TakeWhileIterable$(dynamic); 603 let TakeWhileIterable = TakeWhileIterable$(dynamic);
604 let _isFinished = Symbol('_isFinished');
589 let TakeWhileIterator$ = dart.generic(function(E) { 605 let TakeWhileIterator$ = dart.generic(function(E) {
590 class TakeWhileIterator extends core.Iterator$(E) { 606 class TakeWhileIterator extends core.Iterator$(E) {
591 TakeWhileIterator(_iterator, _f) { 607 TakeWhileIterator($_iterator, $_f) {
592 this._iterator = _iterator; 608 this[_iterator] = $_iterator;
593 this._f = _f; 609 this[_f] = $_f;
594 this._isFinished = false; 610 this[_isFinished] = false;
595 super.Iterator(); 611 super.Iterator();
596 } 612 }
597 moveNext() { 613 moveNext() {
598 if (this._isFinished) 614 if (this[_isFinished])
599 return false; 615 return false;
600 if (dart.notNull(!dart.notNull(this._iterator.moveNext())) || dart.notNu ll(!dart.notNull(this._f(this._iterator.current)))) { 616 if (dart.notNull(!dart.notNull(this[_iterator].moveNext())) || dart.notN ull(!dart.notNull(this[_f](this[_iterator].current)))) {
601 this._isFinished = true; 617 this[_isFinished] = true;
602 return false; 618 return false;
603 } 619 }
604 return true; 620 return true;
605 } 621 }
606 get current() { 622 get current() {
607 if (this._isFinished) 623 if (this[_isFinished])
608 return dart.as(null, E); 624 return dart.as(null, E);
609 return this._iterator.current; 625 return this[_iterator].current;
610 } 626 }
611 } 627 }
612 return TakeWhileIterator; 628 return TakeWhileIterator;
613 }); 629 });
614 let TakeWhileIterator = TakeWhileIterator$(dynamic); 630 let TakeWhileIterator = TakeWhileIterator$(dynamic);
631 let _skipCount = Symbol('_skipCount');
615 let SkipIterable$ = dart.generic(function(E) { 632 let SkipIterable$ = dart.generic(function(E) {
616 class SkipIterable extends collection.IterableBase$(E) { 633 class SkipIterable extends collection.IterableBase$(E) {
617 SkipIterable(iterable, count) { 634 SkipIterable(iterable, count) {
618 if (dart.is(iterable, EfficientLength)) { 635 if (dart.is(iterable, EfficientLength)) {
619 return new EfficientLengthSkipIterable(iterable, count); 636 return new EfficientLengthSkipIterable(iterable, count);
620 } 637 }
621 return new SkipIterable._(iterable, count); 638 return new SkipIterable._(iterable, count);
622 } 639 }
623 SkipIterable$_(_iterable, _skipCount) { 640 SkipIterable$_($_iterable, $_skipCount) {
624 this._iterable = _iterable; 641 this[_iterable] = $_iterable;
625 this._skipCount = _skipCount; 642 this[_skipCount] = $_skipCount;
626 super.IterableBase(); 643 super.IterableBase();
627 if (!(typeof this._skipCount == number)) { 644 if (!(typeof this[_skipCount] == number)) {
628 throw new core.ArgumentError.value(this._skipCount, "count is not an i nteger"); 645 throw new core.ArgumentError.value(this[_skipCount], "count is not an integer");
629 } 646 }
630 core.RangeError.checkNotNegative(this._skipCount, "count"); 647 core.RangeError.checkNotNegative(this[_skipCount], "count");
631 } 648 }
632 skip(count) { 649 skip(count) {
633 if (!(typeof this._skipCount == number)) { 650 if (!(typeof this[_skipCount] == number)) {
634 throw new core.ArgumentError.value(this._skipCount, "count is not an i nteger"); 651 throw new core.ArgumentError.value(this[_skipCount], "count is not an integer");
635 } 652 }
636 core.RangeError.checkNotNegative(this._skipCount, "count"); 653 core.RangeError.checkNotNegative(this[_skipCount], "count");
637 return new SkipIterable._(this._iterable, this._skipCount + count); 654 return new SkipIterable._(this[_iterable], this[_skipCount] + count);
638 } 655 }
639 get iterator() { 656 get iterator() {
640 return new SkipIterator(this._iterable.iterator, this._skipCount); 657 return new SkipIterator(this[_iterable].iterator, this[_skipCount]);
641 } 658 }
642 } 659 }
643 dart.defineNamedConstructor(SkipIterable, '_'); 660 dart.defineNamedConstructor(SkipIterable, '_');
644 return SkipIterable; 661 return SkipIterable;
645 }); 662 });
646 let SkipIterable = SkipIterable$(dynamic); 663 let SkipIterable = SkipIterable$(dynamic);
647 let EfficientLengthSkipIterable$ = dart.generic(function(E) { 664 let EfficientLengthSkipIterable$ = dart.generic(function(E) {
648 class EfficientLengthSkipIterable extends SkipIterable$(E) { 665 class EfficientLengthSkipIterable extends SkipIterable$(E) {
649 EfficientLengthSkipIterable(iterable, skipCount) { 666 EfficientLengthSkipIterable(iterable, skipCount) {
650 super.SkipIterable$_(iterable, skipCount); 667 super.SkipIterable$_(iterable, skipCount);
651 } 668 }
652 get length() { 669 get length() {
653 let length = this._iterable.length - this._skipCount; 670 let length = this[_iterable].length - this[_skipCount];
654 if (length >= 0) 671 if (length >= 0)
655 return length; 672 return length;
656 return 0; 673 return 0;
657 } 674 }
658 } 675 }
659 return EfficientLengthSkipIterable; 676 return EfficientLengthSkipIterable;
660 }); 677 });
661 let EfficientLengthSkipIterable = EfficientLengthSkipIterable$(dynamic); 678 let EfficientLengthSkipIterable = EfficientLengthSkipIterable$(dynamic);
662 let SkipIterator$ = dart.generic(function(E) { 679 let SkipIterator$ = dart.generic(function(E) {
663 class SkipIterator extends core.Iterator$(E) { 680 class SkipIterator extends core.Iterator$(E) {
664 SkipIterator(_iterator, _skipCount) { 681 SkipIterator($_iterator, $_skipCount) {
665 this._iterator = _iterator; 682 this[_iterator] = $_iterator;
666 this._skipCount = _skipCount; 683 this[_skipCount] = $_skipCount;
667 super.Iterator(); 684 super.Iterator();
668 dart.assert(dart.notNull(typeof this._skipCount == number) && dart.notNu ll(this._skipCount >= 0)); 685 dart.assert(dart.notNull(typeof this[_skipCount] == number) && dart.notN ull(this[_skipCount] >= 0));
669 } 686 }
670 moveNext() { 687 moveNext() {
671 for (let i = 0; i < this._skipCount; i++) 688 for (let i = 0; i < this[_skipCount]; i++)
672 this._iterator.moveNext(); 689 this[_iterator].moveNext();
673 this._skipCount = 0; 690 this[_skipCount] = 0;
674 return this._iterator.moveNext(); 691 return this[_iterator].moveNext();
675 } 692 }
676 get current() { 693 get current() {
677 return this._iterator.current; 694 return this[_iterator].current;
678 } 695 }
679 } 696 }
680 return SkipIterator; 697 return SkipIterator;
681 }); 698 });
682 let SkipIterator = SkipIterator$(dynamic); 699 let SkipIterator = SkipIterator$(dynamic);
683 let SkipWhileIterable$ = dart.generic(function(E) { 700 let SkipWhileIterable$ = dart.generic(function(E) {
684 class SkipWhileIterable extends collection.IterableBase$(E) { 701 class SkipWhileIterable extends collection.IterableBase$(E) {
685 SkipWhileIterable(_iterable, _f) { 702 SkipWhileIterable($_iterable, $_f) {
686 this._iterable = _iterable; 703 this[_iterable] = $_iterable;
687 this._f = _f; 704 this[_f] = $_f;
688 super.IterableBase(); 705 super.IterableBase();
689 } 706 }
690 get iterator() { 707 get iterator() {
691 return new SkipWhileIterator(this._iterable.iterator, this._f); 708 return new SkipWhileIterator(this[_iterable].iterator, this[_f]);
692 } 709 }
693 } 710 }
694 return SkipWhileIterable; 711 return SkipWhileIterable;
695 }); 712 });
696 let SkipWhileIterable = SkipWhileIterable$(dynamic); 713 let SkipWhileIterable = SkipWhileIterable$(dynamic);
714 let _hasSkipped = Symbol('_hasSkipped');
697 let SkipWhileIterator$ = dart.generic(function(E) { 715 let SkipWhileIterator$ = dart.generic(function(E) {
698 class SkipWhileIterator extends core.Iterator$(E) { 716 class SkipWhileIterator extends core.Iterator$(E) {
699 SkipWhileIterator(_iterator, _f) { 717 SkipWhileIterator($_iterator, $_f) {
700 this._iterator = _iterator; 718 this[_iterator] = $_iterator;
701 this._f = _f; 719 this[_f] = $_f;
702 this._hasSkipped = false; 720 this[_hasSkipped] = false;
703 super.Iterator(); 721 super.Iterator();
704 } 722 }
705 moveNext() { 723 moveNext() {
706 if (!dart.notNull(this._hasSkipped)) { 724 if (!dart.notNull(this[_hasSkipped])) {
707 this._hasSkipped = true; 725 this[_hasSkipped] = true;
708 while (this._iterator.moveNext()) { 726 while (this[_iterator].moveNext()) {
709 if (!dart.notNull(this._f(this._iterator.current))) 727 if (!dart.notNull(this[_f](this[_iterator].current)))
710 return true; 728 return true;
711 } 729 }
712 } 730 }
713 return this._iterator.moveNext(); 731 return this[_iterator].moveNext();
714 } 732 }
715 get current() { 733 get current() {
716 return this._iterator.current; 734 return this[_iterator].current;
717 } 735 }
718 } 736 }
719 return SkipWhileIterator; 737 return SkipWhileIterator;
720 }); 738 });
721 let SkipWhileIterator = SkipWhileIterator$(dynamic); 739 let SkipWhileIterator = SkipWhileIterator$(dynamic);
722 let EmptyIterable$ = dart.generic(function(E) { 740 let EmptyIterable$ = dart.generic(function(E) {
723 class EmptyIterable extends collection.IterableBase$(E) { 741 class EmptyIterable extends collection.IterableBase$(E) {
724 EmptyIterable() { 742 EmptyIterable() {
725 super.IterableBase(); 743 super.IterableBase();
726 } 744 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 } 846 }
829 return EmptyIterator; 847 return EmptyIterator;
830 }); 848 });
831 let EmptyIterator = EmptyIterator$(dynamic); 849 let EmptyIterator = EmptyIterator$(dynamic);
832 let BidirectionalIterator$ = dart.generic(function(T) { 850 let BidirectionalIterator$ = dart.generic(function(T) {
833 class BidirectionalIterator extends dart.Object { 851 class BidirectionalIterator extends dart.Object {
834 } 852 }
835 return BidirectionalIterator; 853 return BidirectionalIterator;
836 }); 854 });
837 let BidirectionalIterator = BidirectionalIterator$(dynamic); 855 let BidirectionalIterator = BidirectionalIterator$(dynamic);
856 let _rangeCheck = Symbol('_rangeCheck');
838 let IterableMixinWorkaround$ = dart.generic(function(T) { 857 let IterableMixinWorkaround$ = dart.generic(function(T) {
839 class IterableMixinWorkaround extends dart.Object { 858 class IterableMixinWorkaround extends dart.Object {
840 static contains(iterable, element) { 859 static contains(iterable, element) {
841 for (let e of iterable) { 860 for (let e of iterable) {
842 if (dart.equals(e, element)) 861 if (dart.equals(e, element))
843 return true; 862 return true;
844 } 863 }
845 return false; 864 return false;
846 } 865 }
847 static forEach(iterable, f) { 866 static forEach(iterable, f) {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 } 1082 }
1064 } 1083 }
1065 static indexOfList(list, element, start) { 1084 static indexOfList(list, element, start) {
1066 return Lists.indexOf(list, element, start, list.length); 1085 return Lists.indexOf(list, element, start, list.length);
1067 } 1086 }
1068 static lastIndexOfList(list, element, start) { 1087 static lastIndexOfList(list, element, start) {
1069 if (start === null) 1088 if (start === null)
1070 start = list.length - 1; 1089 start = list.length - 1;
1071 return Lists.lastIndexOf(list, element, start); 1090 return Lists.lastIndexOf(list, element, start);
1072 } 1091 }
1073 static _rangeCheck(list, start, end) { 1092 static [_rangeCheck](list, start, end) {
1074 core.RangeError.checkValidRange(start, end, list.length); 1093 core.RangeError.checkValidRange(start, end, list.length);
1075 } 1094 }
1076 getRangeList(list, start, end) { 1095 getRangeList(list, start, end) {
1077 _rangeCheck(list, start, end); 1096 _rangeCheck(list, start, end);
1078 return new SubListIterable(dart.as(list, core.Iterable$(T)), start, end) ; 1097 return new SubListIterable(dart.as(list, core.Iterable$(T)), start, end) ;
1079 } 1098 }
1080 static setRangeList(list, start, end, from, skipCount) { 1099 static setRangeList(list, start, end, from, skipCount) {
1081 _rangeCheck(list, start, end); 1100 _rangeCheck(list, start, end);
1082 let length = end - start; 1101 let length = end - start;
1083 if (length === 0) 1102 if (length === 0)
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 } 1342 }
1324 return FixedLengthListBase; 1343 return FixedLengthListBase;
1325 }); 1344 });
1326 let FixedLengthListBase = FixedLengthListBase$(dynamic); 1345 let FixedLengthListBase = FixedLengthListBase$(dynamic);
1327 let UnmodifiableListBase$ = dart.generic(function(E) { 1346 let UnmodifiableListBase$ = dart.generic(function(E) {
1328 class UnmodifiableListBase extends dart.mixin(UnmodifiableListMixin$(E)) { 1347 class UnmodifiableListBase extends dart.mixin(UnmodifiableListMixin$(E)) {
1329 } 1348 }
1330 return UnmodifiableListBase; 1349 return UnmodifiableListBase;
1331 }); 1350 });
1332 let UnmodifiableListBase = UnmodifiableListBase$(dynamic); 1351 let UnmodifiableListBase = UnmodifiableListBase$(dynamic);
1352 let _backedList = Symbol('_backedList');
1333 class _ListIndicesIterable extends ListIterable$(core.int) { 1353 class _ListIndicesIterable extends ListIterable$(core.int) {
1334 _ListIndicesIterable(_backedList) { 1354 _ListIndicesIterable($_backedList) {
1335 this._backedList = _backedList; 1355 this[_backedList] = $_backedList;
1336 super.ListIterable(); 1356 super.ListIterable();
1337 } 1357 }
1338 get length() { 1358 get length() {
1339 return this._backedList.length; 1359 return this[_backedList].length;
1340 } 1360 }
1341 elementAt(index) { 1361 elementAt(index) {
1342 core.RangeError.checkValidIndex(index, this); 1362 core.RangeError.checkValidIndex(index, this);
1343 return index; 1363 return index;
1344 } 1364 }
1345 } 1365 }
1366 let _values = Symbol('_values');
1346 let ListMapView$ = dart.generic(function(E) { 1367 let ListMapView$ = dart.generic(function(E) {
1347 class ListMapView extends dart.Object { 1368 class ListMapView extends dart.Object {
1348 ListMapView(_values) { 1369 ListMapView($_values) {
1349 this._values = _values; 1370 this[_values] = $_values;
1350 } 1371 }
1351 get(key) { 1372 get(key) {
1352 return dart.as(this.containsKey(key) ? this._values.get(key) : null, E); 1373 return dart.as(this.containsKey(key) ? this[_values].get(key) : null, E) ;
1353 } 1374 }
1354 get length() { 1375 get length() {
1355 return this._values.length; 1376 return this[_values].length;
1356 } 1377 }
1357 get values() { 1378 get values() {
1358 return new SubListIterable(this._values, 0, dart.as(null, core.int)); 1379 return new SubListIterable(this[_values], 0, dart.as(null, core.int));
1359 } 1380 }
1360 get keys() { 1381 get keys() {
1361 return new _ListIndicesIterable(this._values); 1382 return new _ListIndicesIterable(this[_values]);
1362 } 1383 }
1363 get isEmpty() { 1384 get isEmpty() {
1364 return this._values.isEmpty; 1385 return this[_values].isEmpty;
1365 } 1386 }
1366 get isNotEmpty() { 1387 get isNotEmpty() {
1367 return this._values.isNotEmpty; 1388 return this[_values].isNotEmpty;
1368 } 1389 }
1369 containsValue(value) { 1390 containsValue(value) {
1370 return this._values.contains(value); 1391 return this[_values].contains(value);
1371 } 1392 }
1372 containsKey(key) { 1393 containsKey(key) {
1373 return dart.notNull(dart.notNull(typeof key == number) && dart.notNull(k ey >= 0)) && dart.notNull(key < this.length); 1394 return dart.notNull(dart.notNull(typeof key == number) && dart.notNull(k ey >= 0)) && dart.notNull(key < this.length);
1374 } 1395 }
1375 forEach(f) { 1396 forEach(f) {
1376 let length = this._values.length; 1397 let length = this[_values].length;
1377 for (let i = 0; i < length; i++) { 1398 for (let i = 0; i < length; i++) {
1378 f(i, this._values.get(i)); 1399 f(i, this[_values].get(i));
1379 if (length !== this._values.length) { 1400 if (length !== this[_values].length) {
1380 throw new core.ConcurrentModificationError(this._values); 1401 throw new core.ConcurrentModificationError(this[_values]);
1381 } 1402 }
1382 } 1403 }
1383 } 1404 }
1384 set(key, value) { 1405 set(key, value) {
1385 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); 1406 throw new core.UnsupportedError("Cannot modify an unmodifiable map");
1386 } 1407 }
1387 putIfAbsent(key, ifAbsent) { 1408 putIfAbsent(key, ifAbsent) {
1388 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); 1409 throw new core.UnsupportedError("Cannot modify an unmodifiable map");
1389 } 1410 }
1390 remove(key) { 1411 remove(key) {
1391 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); 1412 throw new core.UnsupportedError("Cannot modify an unmodifiable map");
1392 } 1413 }
1393 clear() { 1414 clear() {
1394 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); 1415 throw new core.UnsupportedError("Cannot modify an unmodifiable map");
1395 } 1416 }
1396 addAll(other) { 1417 addAll(other) {
1397 throw new core.UnsupportedError("Cannot modify an unmodifiable map"); 1418 throw new core.UnsupportedError("Cannot modify an unmodifiable map");
1398 } 1419 }
1399 toString() { 1420 toString() {
1400 return collection.Maps.mapToString(this); 1421 return collection.Maps.mapToString(this);
1401 } 1422 }
1402 } 1423 }
1403 return ListMapView; 1424 return ListMapView;
1404 }); 1425 });
1405 let ListMapView = ListMapView$(dynamic); 1426 let ListMapView = ListMapView$(dynamic);
1406 let ReversedListIterable$ = dart.generic(function(E) { 1427 let ReversedListIterable$ = dart.generic(function(E) {
1407 class ReversedListIterable extends ListIterable$(E) { 1428 class ReversedListIterable extends ListIterable$(E) {
1408 ReversedListIterable(_source) { 1429 ReversedListIterable($_source) {
1409 this._source = _source; 1430 this[_source] = $_source;
1410 super.ListIterable(); 1431 super.ListIterable();
1411 } 1432 }
1412 get length() { 1433 get length() {
1413 return this._source.length; 1434 return this[_source].length;
1414 } 1435 }
1415 elementAt(index) { 1436 elementAt(index) {
1416 return this._source.elementAt(this._source.length - 1 - index); 1437 return this[_source].elementAt(this[_source].length - 1 - index);
1417 } 1438 }
1418 } 1439 }
1419 return ReversedListIterable; 1440 return ReversedListIterable;
1420 }); 1441 });
1421 let ReversedListIterable = ReversedListIterable$(dynamic); 1442 let ReversedListIterable = ReversedListIterable$(dynamic);
1422 class UnmodifiableListError extends dart.Object { 1443 class UnmodifiableListError extends dart.Object {
1423 static add() { 1444 static add() {
1424 return new core.UnsupportedError("Cannot add to unmodifiable List"); 1445 return new core.UnsupportedError("Cannot add to unmodifiable List");
1425 } 1446 }
1426 static change() { 1447 static change() {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 let message = `${start} + ${length} must be in the range [0..${a.length} ]`; 1534 let message = `${start} + ${length} must be in the range [0..${a.length} ]`;
1514 throw new core.RangeError.range(length, 0, a.length - start, "length", m essage); 1535 throw new core.RangeError.range(length, 0, a.length - start, "length", m essage);
1515 } 1536 }
1516 } 1537 }
1517 } 1538 }
1518 exports.printToZone = null; 1539 exports.printToZone = null;
1519 // Function printToConsole: (String) → void 1540 // Function printToConsole: (String) → void
1520 function printToConsole(line) { 1541 function printToConsole(line) {
1521 _js_primitives.printString(`${line}`); 1542 _js_primitives.printString(`${line}`);
1522 } 1543 }
1544 let _doSort = Symbol('_doSort');
1545 let _insertionSort = Symbol('_insertionSort');
1546 let _dualPivotQuicksort = Symbol('_dualPivotQuicksort');
1523 class Sort extends dart.Object { 1547 class Sort extends dart.Object {
1524 static sort(a, compare) { 1548 static sort(a, compare) {
1525 _doSort(a, 0, a.length - 1, compare); 1549 _doSort(a, 0, a.length - 1, compare);
1526 } 1550 }
1527 static sortRange(a, from, to, compare) { 1551 static sortRange(a, from, to, compare) {
1528 if (dart.notNull(dart.notNull(from < 0) || dart.notNull(to > a.length)) || dart.notNull(to < from)) { 1552 if (dart.notNull(dart.notNull(from < 0) || dart.notNull(to > a.length)) || dart.notNull(to < from)) {
1529 throw "OutOfRange"; 1553 throw "OutOfRange";
1530 } 1554 }
1531 _doSort(a, from, to - 1, compare); 1555 _doSort(a, from, to - 1, compare);
1532 } 1556 }
1533 static _doSort(a, left, right, compare) { 1557 static [_doSort](a, left, right, compare) {
1534 if (right - left <= _INSERTION_SORT_THRESHOLD) { 1558 if (right - left <= _INSERTION_SORT_THRESHOLD) {
1535 _insertionSort(a, left, right, compare); 1559 _insertionSort(a, left, right, compare);
1536 } else { 1560 } else {
1537 _dualPivotQuicksort(a, left, right, compare); 1561 _dualPivotQuicksort(a, left, right, compare);
1538 } 1562 }
1539 } 1563 }
1540 static _insertionSort(a, left, right, compare) { 1564 static [_insertionSort](a, left, right, compare) {
1541 for (let i = left + 1; i <= right; i++) { 1565 for (let i = left + 1; i <= right; i++) {
1542 let el = a.get(i); 1566 let el = a.get(i);
1543 let j = i; 1567 let j = i;
1544 while (dart.notNull(j > left) && dart.notNull(compare(a.get(j - 1), el) > 0)) { 1568 while (dart.notNull(j > left) && dart.notNull(compare(a.get(j - 1), el) > 0)) {
1545 a.set(j, a.get(j - 1)); 1569 a.set(j, a.get(j - 1));
1546 j--; 1570 j--;
1547 } 1571 }
1548 a.set(j, el); 1572 a.set(j, el);
1549 } 1573 }
1550 } 1574 }
1551 static _dualPivotQuicksort(a, left, right, compare) { 1575 static [_dualPivotQuicksort](a, left, right, compare) {
1552 dart.assert(right - left > _INSERTION_SORT_THRESHOLD); 1576 dart.assert(right - left > _INSERTION_SORT_THRESHOLD);
1553 let sixth = ((right - left + 1) / 6).truncate(); 1577 let sixth = ((right - left + 1) / 6).truncate();
1554 let index1 = left + sixth; 1578 let index1 = left + sixth;
1555 let index5 = right - sixth; 1579 let index5 = right - sixth;
1556 let index3 = ((left + right) / 2).truncate(); 1580 let index3 = ((left + right) / 2).truncate();
1557 let index2 = index3 - sixth; 1581 let index2 = index3 - sixth;
1558 let index4 = index3 + sixth; 1582 let index4 = index3 + sixth;
1559 let el1 = a.get(index1); 1583 let el1 = a.get(index1);
1560 let el2 = a.get(index2); 1584 let el2 = a.get(index2);
1561 let el3 = a.get(index3); 1585 let el3 = a.get(index3);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 } 1760 }
1737 } 1761 }
1738 } 1762 }
1739 _doSort(a, less, great, compare); 1763 _doSort(a, less, great, compare);
1740 } else { 1764 } else {
1741 _doSort(a, less, great, compare); 1765 _doSort(a, less, great, compare);
1742 } 1766 }
1743 } 1767 }
1744 } 1768 }
1745 Sort._INSERTION_SORT_THRESHOLD = 32; 1769 Sort._INSERTION_SORT_THRESHOLD = 32;
1770 let _name = Symbol('_name');
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
1859 exports.ReversedListIterable = ReversedListIterable; 1884 exports.ReversedListIterable = ReversedListIterable;
1860 exports.ReversedListIterable$ = ReversedListIterable$; 1885 exports.ReversedListIterable$ = ReversedListIterable$;
1861 exports.UnmodifiableListError = UnmodifiableListError; 1886 exports.UnmodifiableListError = UnmodifiableListError;
1862 exports.NonGrowableListError = NonGrowableListError; 1887 exports.NonGrowableListError = NonGrowableListError;
1863 exports.makeListFixedLength = makeListFixedLength; 1888 exports.makeListFixedLength = makeListFixedLength;
1864 exports.Lists = Lists; 1889 exports.Lists = Lists;
1865 exports.printToConsole = printToConsole; 1890 exports.printToConsole = printToConsole;
1866 exports.Sort = Sort; 1891 exports.Sort = Sort;
1867 exports.Symbol = Symbol; 1892 exports.Symbol = Symbol;
1868 })(_internal || (_internal = {})); 1893 })(_internal || (_internal = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/_interceptors/_interceptors.js ('k') | test/codegen/expect/_isolate_helper/_isolate_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698