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

Side by Side Diff: lib/runtime/dart/async.js

Issue 1059583002: Extension method support to move us closer to a valid List implementation. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: done Created 5 years, 8 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
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/collection.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var async; 1 var async;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic 4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic
5 function _invokeErrorHandler(errorHandler, error, stackTrace) { 5 function _invokeErrorHandler(errorHandler, error, stackTrace) {
6 if (dart.is(errorHandler, ZoneBinaryCallback)) { 6 if (dart.is(errorHandler, ZoneBinaryCallback)) {
7 return dart.dinvokef(errorHandler, error, stackTrace); 7 return dart.dinvokef(errorHandler, error, stackTrace);
8 } else { 8 } else {
9 return dart.dinvokef(errorHandler, error); 9 return dart.dinvokef(errorHandler, error);
10 } 10 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 toString() { 43 toString() {
44 let result = `Uncaught Error: ${this.error}`; 44 let result = `Uncaught Error: ${this.error}`;
45 if (this.stackTrace != null) { 45 if (this.stackTrace != null) {
46 result = `\nStack Trace:\n${this.stackTrace}`; 46 result = `\nStack Trace:\n${this.stackTrace}`;
47 } 47 }
48 return result; 48 return result;
49 } 49 }
50 } 50 }
51 let _controller = Symbol('_controller'); 51 let _controller = Symbol('_controller');
52 let _createSubscription = Symbol('_createSubscription'); 52 let _createSubscription = Symbol('_createSubscription');
53 let _subscribe = Symbol('_subscribe');
53 let _onListen = Symbol('_onListen'); 54 let _onListen = Symbol('_onListen');
55 let _add = Symbol('_add');
56 let _closeUnchecked = Symbol('_closeUnchecked');
54 let _addError = Symbol('_addError'); 57 let _addError = Symbol('_addError');
55 let _completeError = Symbol('_completeError'); 58 let _completeError = Symbol('_completeError');
56 let _complete = Symbol('_complete'); 59 let _complete = Symbol('_complete');
57 let _sink = Symbol('_sink'); 60 let _sink = Symbol('_sink');
58 let Stream$ = dart.generic(function(T) { 61 let Stream$ = dart.generic(function(T) {
59 class Stream extends core.Object { 62 class Stream extends core.Object {
60 Stream() { 63 Stream() {
61 } 64 }
62 fromFuture(future) { 65 fromFuture(future) {
63 let controller = new (StreamController$(T))({sync: true}); 66 let controller = new (StreamController$(T))({sync: true});
64 future.then(dart.closureWrap(((value) => { 67 future.then(dart.closureWrap(((value) => {
65 controller._add(dart.as(value, T)); 68 controller[_add](dart.as(value, T));
66 controller._closeUnchecked(); 69 controller[_closeUnchecked]();
67 }).bind(this), "(T) → dynamic"), {onError: ((error, stackTrace) => { 70 }).bind(this), "(T) → dynamic"), {onError: ((error, stackTrace) => {
68 controller._addError(error, dart.as(stackTrace, core.StackTrace)); 71 controller[_addError](error, dart.as(stackTrace, core.StackTrace));
69 controller._closeUnchecked(); 72 controller[_closeUnchecked]();
70 }).bind(this)}); 73 }).bind(this)});
71 return controller.stream; 74 return controller.stream;
72 } 75 }
73 fromIterable(data) { 76 fromIterable(data) {
74 return new (_GeneratedStreamImpl$(T))(() => new (_IterablePendingEvents$ (T))(data)); 77 return new (_GeneratedStreamImpl$(T))(() => new (_IterablePendingEvents$ (T))(data));
75 } 78 }
76 periodic(period, computation) { 79 periodic(period, computation) {
77 if (computation === void 0) 80 if (computation === void 0)
78 computation = null; 81 computation = null;
79 if (computation == null) 82 if (computation == null)
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 }, {onError: result[_completeError], onDone: (() => { 248 }, {onError: result[_completeError], onDone: (() => {
246 if (!dart.notNull(seenFirst)) { 249 if (!dart.notNull(seenFirst)) {
247 try { 250 try {
248 throw _internal.IterableElementError.noElement(); 251 throw _internal.IterableElementError.noElement();
249 } catch (e) { 252 } catch (e) {
250 let s = dart.stackTrace(e); 253 let s = dart.stackTrace(e);
251 _completeWithErrorCallback(result, e, s); 254 _completeWithErrorCallback(result, e, s);
252 } 255 }
253 256
254 } else { 257 } else {
255 result._complete(value); 258 result[_complete](value);
256 } 259 }
257 }).bind(this), cancelOnError: true}); 260 }).bind(this), cancelOnError: true});
258 return result; 261 return result;
259 } 262 }
260 fold(initialValue, combine) { 263 fold(initialValue, combine) {
261 let result = new _Future(); 264 let result = new _Future();
262 let value = initialValue; 265 let value = initialValue;
263 let subscription = null; 266 let subscription = null;
264 subscription = this.listen((element) => { 267 subscription = this.listen((element) => {
265 _runUserCode(() => dart.dinvokef(combine, value, element), (newValue) => { 268 _runUserCode(() => dart.dinvokef(combine, value, element), (newValue) => {
266 value = newValue; 269 value = newValue;
267 }, dart.as(_cancelAndErrorClosure(subscription, result), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic"))); 270 }, dart.as(_cancelAndErrorClosure(subscription, result), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic")));
268 }, {onError: ((e, st) => { 271 }, {onError: ((e, st) => {
269 result._completeError(e, dart.as(st, core.StackTrace)); 272 result[_completeError](e, dart.as(st, core.StackTrace));
270 }).bind(this), onDone: (() => { 273 }).bind(this), onDone: (() => {
271 result._complete(value); 274 result[_complete](value);
272 }).bind(this), cancelOnError: true}); 275 }).bind(this), cancelOnError: true});
273 return result; 276 return result;
274 } 277 }
275 join(separator) { 278 join(separator) {
276 if (separator === void 0) 279 if (separator === void 0)
277 separator = ""; 280 separator = "";
278 let result = new (_Future$(core.String))(); 281 let result = new (_Future$(core.String))();
279 let buffer = new core.StringBuffer(); 282 let buffer = new core.StringBuffer();
280 let subscription = null; 283 let subscription = null;
281 let first = true; 284 let first = true;
282 subscription = this.listen(((element) => { 285 subscription = this.listen(((element) => {
283 if (!dart.notNull(first)) { 286 if (!dart.notNull(first)) {
284 buffer.write(separator); 287 buffer.write(separator);
285 } 288 }
286 first = false; 289 first = false;
287 try { 290 try {
288 buffer.write(element); 291 buffer.write(element);
289 } catch (e) { 292 } catch (e) {
290 let s = dart.stackTrace(e); 293 let s = dart.stackTrace(e);
291 _cancelAndErrorWithReplacement(subscription, result, e, s); 294 _cancelAndErrorWithReplacement(subscription, result, e, s);
292 } 295 }
293 296
294 }).bind(this), {onError: ((e) => { 297 }).bind(this), {onError: ((e) => {
295 result._completeError(e); 298 result[_completeError](e);
296 }).bind(this), onDone: (() => { 299 }).bind(this), onDone: (() => {
297 result._complete(buffer.toString()); 300 result[_complete](buffer.toString());
298 }).bind(this), cancelOnError: true}); 301 }).bind(this), cancelOnError: true});
299 return result; 302 return result;
300 } 303 }
301 contains(needle) { 304 contains(needle) {
302 let future = new (_Future$(core.bool))(); 305 let future = new (_Future$(core.bool))();
303 let subscription = null; 306 let subscription = null;
304 subscription = this.listen((element) => { 307 subscription = this.listen((element) => {
305 _runUserCode(() => dart.equals(element, needle), (isMatch) => { 308 _runUserCode(() => dart.equals(element, needle), (isMatch) => {
306 if (isMatch) { 309 if (isMatch) {
307 _cancelAndValue(subscription, future, true); 310 _cancelAndValue(subscription, future, true);
308 } 311 }
309 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic"))); 312 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic")));
310 }, {onError: future[_completeError], onDone: (() => { 313 }, {onError: future[_completeError], onDone: (() => {
311 future._complete(false); 314 future[_complete](false);
312 }).bind(this), cancelOnError: true}); 315 }).bind(this), cancelOnError: true});
313 return future; 316 return future;
314 } 317 }
315 forEach(action) { 318 forEach(action) {
316 let future = new _Future(); 319 let future = new _Future();
317 let subscription = null; 320 let subscription = null;
318 subscription = this.listen((element) => { 321 subscription = this.listen((element) => {
319 _runUserCode(() => action(element), (_) => { 322 _runUserCode(() => action(element), (_) => {
320 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic"))); 323 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic")));
321 }, {onError: future[_completeError], onDone: (() => { 324 }, {onError: future[_completeError], onDone: (() => {
322 future._complete(null); 325 future[_complete](null);
323 }).bind(this), cancelOnError: true}); 326 }).bind(this), cancelOnError: true});
324 return future; 327 return future;
325 } 328 }
326 every(test) { 329 every(test) {
327 let future = new (_Future$(core.bool))(); 330 let future = new (_Future$(core.bool))();
328 let subscription = null; 331 let subscription = null;
329 subscription = this.listen((element) => { 332 subscription = this.listen((element) => {
330 _runUserCode(() => test(element), (isMatch) => { 333 _runUserCode(() => test(element), (isMatch) => {
331 if (!dart.notNull(isMatch)) { 334 if (!dart.notNull(isMatch)) {
332 _cancelAndValue(subscription, future, false); 335 _cancelAndValue(subscription, future, false);
333 } 336 }
334 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic"))); 337 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic")));
335 }, {onError: future[_completeError], onDone: (() => { 338 }, {onError: future[_completeError], onDone: (() => {
336 future._complete(true); 339 future[_complete](true);
337 }).bind(this), cancelOnError: true}); 340 }).bind(this), cancelOnError: true});
338 return future; 341 return future;
339 } 342 }
340 any(test) { 343 any(test) {
341 let future = new (_Future$(core.bool))(); 344 let future = new (_Future$(core.bool))();
342 let subscription = null; 345 let subscription = null;
343 subscription = this.listen((element) => { 346 subscription = this.listen((element) => {
344 _runUserCode(() => test(element), (isMatch) => { 347 _runUserCode(() => test(element), (isMatch) => {
345 if (isMatch) { 348 if (isMatch) {
346 _cancelAndValue(subscription, future, true); 349 _cancelAndValue(subscription, future, true);
347 } 350 }
348 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic"))); 351 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic")));
349 }, {onError: future[_completeError], onDone: (() => { 352 }, {onError: future[_completeError], onDone: (() => {
350 future._complete(false); 353 future[_complete](false);
351 }).bind(this), cancelOnError: true}); 354 }).bind(this), cancelOnError: true});
352 return future; 355 return future;
353 } 356 }
354 get length() { 357 get length() {
355 let future = new (_Future$(core.int))(); 358 let future = new (_Future$(core.int))();
356 let count = 0; 359 let count = 0;
357 this.listen(dart.closureWrap((_) => { 360 this.listen(dart.closureWrap((_) => {
358 count = dart.notNull(count) + 1; 361 count = dart.notNull(count) + 1;
359 }, "(T) → void"), {onError: future[_completeError], onDone: (() => { 362 }, "(T) → void"), {onError: future[_completeError], onDone: (() => {
360 future._complete(count); 363 future[_complete](count);
361 }).bind(this), cancelOnError: true}); 364 }).bind(this), cancelOnError: true});
362 return future; 365 return future;
363 } 366 }
364 get isEmpty() { 367 get isEmpty() {
365 let future = new (_Future$(core.bool))(); 368 let future = new (_Future$(core.bool))();
366 let subscription = null; 369 let subscription = null;
367 subscription = this.listen(dart.closureWrap((_) => { 370 subscription = this.listen(dart.closureWrap((_) => {
368 _cancelAndValue(subscription, future, false); 371 _cancelAndValue(subscription, future, false);
369 }, "(T) → void"), {onError: future[_completeError], onDone: (() => { 372 }, "(T) → void"), {onError: future[_completeError], onDone: (() => {
370 future._complete(true); 373 future[_complete](true);
371 }).bind(this), cancelOnError: true}); 374 }).bind(this), cancelOnError: true});
372 return future; 375 return future;
373 } 376 }
374 toList() { 377 toList() {
375 let result = new core.List$(T).from([]); 378 let result = new core.List$(T).from([]);
376 let future = new (_Future$(core.List$(T)))(); 379 let future = new (_Future$(core.List$(T)))();
377 this.listen(((data) => { 380 this.listen(((data) => {
378 result.add(data); 381 result[core.$add](data);
379 }).bind(this), {onError: future[_completeError], onDone: (() => { 382 }).bind(this), {onError: future[_completeError], onDone: (() => {
380 future._complete(result); 383 future[_complete](result);
381 }).bind(this), cancelOnError: true}); 384 }).bind(this), cancelOnError: true});
382 return future; 385 return future;
383 } 386 }
384 toSet() { 387 toSet() {
385 let result = new (core.Set$(T))(); 388 let result = new (core.Set$(T))();
386 let future = new (_Future$(core.Set$(T)))(); 389 let future = new (_Future$(core.Set$(T)))();
387 this.listen(((data) => { 390 this.listen(((data) => {
388 result.add(data); 391 result.add(data);
389 }).bind(this), {onError: future[_completeError], onDone: (() => { 392 }).bind(this), {onError: future[_completeError], onDone: (() => {
390 future._complete(result); 393 future[_complete](result);
391 }).bind(this), cancelOnError: true}); 394 }).bind(this), cancelOnError: true});
392 return future; 395 return future;
393 } 396 }
394 drain(futureValue) { 397 drain(futureValue) {
395 if (futureValue === void 0) 398 if (futureValue === void 0)
396 futureValue = null; 399 futureValue = null;
397 return this.listen(null, {cancelOnError: true}).asFuture(futureValue); 400 return this.listen(null, {cancelOnError: true}).asFuture(futureValue);
398 } 401 }
399 take(count) { 402 take(count) {
400 return dart.as(new _TakeStream(this, count), Stream$(T)); 403 return dart.as(new _TakeStream(this, count), Stream$(T));
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 get last() { 439 get last() {
437 let future = new (_Future$(T))(); 440 let future = new (_Future$(T))();
438 let result = null; 441 let result = null;
439 let foundResult = false; 442 let foundResult = false;
440 let subscription = null; 443 let subscription = null;
441 subscription = this.listen((value) => { 444 subscription = this.listen((value) => {
442 foundResult = true; 445 foundResult = true;
443 result = value; 446 result = value;
444 }, {onError: future[_completeError], onDone: (() => { 447 }, {onError: future[_completeError], onDone: (() => {
445 if (foundResult) { 448 if (foundResult) {
446 future._complete(result); 449 future[_complete](result);
447 return; 450 return;
448 } 451 }
449 try { 452 try {
450 throw _internal.IterableElementError.noElement(); 453 throw _internal.IterableElementError.noElement();
451 } catch (e) { 454 } catch (e) {
452 let s = dart.stackTrace(e); 455 let s = dart.stackTrace(e);
453 _completeWithErrorCallback(future, e, s); 456 _completeWithErrorCallback(future, e, s);
454 } 457 }
455 458
456 }).bind(this), cancelOnError: true}); 459 }).bind(this), cancelOnError: true});
(...skipping 12 matching lines...) Expand all
469 let s = dart.stackTrace(e); 472 let s = dart.stackTrace(e);
470 _cancelAndErrorWithReplacement(subscription, future, e, s); 473 _cancelAndErrorWithReplacement(subscription, future, e, s);
471 } 474 }
472 475
473 return; 476 return;
474 } 477 }
475 foundResult = true; 478 foundResult = true;
476 result = value; 479 result = value;
477 }, {onError: future[_completeError], onDone: (() => { 480 }, {onError: future[_completeError], onDone: (() => {
478 if (foundResult) { 481 if (foundResult) {
479 future._complete(result); 482 future[_complete](result);
480 return; 483 return;
481 } 484 }
482 try { 485 try {
483 throw _internal.IterableElementError.noElement(); 486 throw _internal.IterableElementError.noElement();
484 } catch (e) { 487 } catch (e) {
485 let s = dart.stackTrace(e); 488 let s = dart.stackTrace(e);
486 _completeWithErrorCallback(future, e, s); 489 _completeWithErrorCallback(future, e, s);
487 } 490 }
488 491
489 }).bind(this), cancelOnError: true}); 492 }).bind(this), cancelOnError: true});
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 let subscription = null; 525 let subscription = null;
523 subscription = this.listen((value) => { 526 subscription = this.listen((value) => {
524 _runUserCode(() => true == test(value), (isMatch) => { 527 _runUserCode(() => true == test(value), (isMatch) => {
525 if (isMatch) { 528 if (isMatch) {
526 foundResult = true; 529 foundResult = true;
527 result = value; 530 result = value;
528 } 531 }
529 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic"))); 532 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic")));
530 }, {onError: future[_completeError], onDone: (() => { 533 }, {onError: future[_completeError], onDone: (() => {
531 if (foundResult) { 534 if (foundResult) {
532 future._complete(result); 535 future[_complete](result);
533 return; 536 return;
534 } 537 }
535 if (defaultValue != null) { 538 if (defaultValue != null) {
536 _runUserCode(defaultValue, future[_complete], future[_completeErro r]); 539 _runUserCode(defaultValue, future[_complete], future[_completeErro r]);
537 return; 540 return;
538 } 541 }
539 try { 542 try {
540 throw _internal.IterableElementError.noElement(); 543 throw _internal.IterableElementError.noElement();
541 } catch (e) { 544 } catch (e) {
542 let s = dart.stackTrace(e); 545 let s = dart.stackTrace(e);
(...skipping 20 matching lines...) Expand all
563 } 566 }
564 567
565 return; 568 return;
566 } 569 }
567 foundResult = true; 570 foundResult = true;
568 result = value; 571 result = value;
569 } 572 }
570 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic"))); 573 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_(" Unimplemented type (dynamic, StackTrace) → dynamic")));
571 }, {onError: future[_completeError], onDone: (() => { 574 }, {onError: future[_completeError], onDone: (() => {
572 if (foundResult) { 575 if (foundResult) {
573 future._complete(result); 576 future[_complete](result);
574 return; 577 return;
575 } 578 }
576 try { 579 try {
577 throw _internal.IterableElementError.noElement(); 580 throw _internal.IterableElementError.noElement();
578 } catch (e) { 581 } catch (e) {
579 let s = dart.stackTrace(e); 582 let s = dart.stackTrace(e);
580 _completeWithErrorCallback(future, e, s); 583 _completeWithErrorCallback(future, e, s);
581 } 584 }
582 585
583 }).bind(this), cancelOnError: true}); 586 }).bind(this), cancelOnError: true});
584 return future; 587 return future;
585 } 588 }
586 elementAt(index) { 589 elementAt(index) {
587 if (dart.notNull(!(typeof index == 'number')) || dart.notNull(index) < 0 ) 590 if (dart.notNull(!(typeof index == 'number')) || dart.notNull(index) < 0 )
588 throw new core.ArgumentError(index); 591 throw new core.ArgumentError(index);
589 let future = new (_Future$(T))(); 592 let future = new (_Future$(T))();
590 let subscription = null; 593 let subscription = null;
591 let elementIndex = 0; 594 let elementIndex = 0;
592 subscription = this.listen((value) => { 595 subscription = this.listen((value) => {
593 if (index == elementIndex) { 596 if (index == elementIndex) {
594 _cancelAndValue(subscription, future, value); 597 _cancelAndValue(subscription, future, value);
595 return; 598 return;
596 } 599 }
597 elementIndex = 1; 600 elementIndex = 1;
598 }, {onError: future[_completeError], onDone: (() => { 601 }, {onError: future[_completeError], onDone: (() => {
599 future._completeError(new core.RangeError.index(index, this, "index" , null, elementIndex)); 602 future[_completeError](new core.RangeError.index(index, this, "index ", null, elementIndex));
600 }).bind(this), cancelOnError: true}); 603 }).bind(this), cancelOnError: true});
601 return future; 604 return future;
602 } 605 }
603 timeout(timeLimit, opts) { 606 timeout(timeLimit, opts) {
604 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; 607 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null;
605 let controller = null; 608 let controller = null;
606 let subscription = null; 609 let subscription = null;
607 let timer = null; 610 let timer = null;
608 let zone = null; 611 let zone = null;
609 let timeout = null; 612 let timeout = null;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 return _StreamImpl; 691 return _StreamImpl;
689 }); 692 });
690 let _StreamImpl = _StreamImpl$(dart.dynamic); 693 let _StreamImpl = _StreamImpl$(dart.dynamic);
691 let _ControllerStream$ = dart.generic(function(T) { 694 let _ControllerStream$ = dart.generic(function(T) {
692 class _ControllerStream extends _StreamImpl$(T) { 695 class _ControllerStream extends _StreamImpl$(T) {
693 _ControllerStream(controller$) { 696 _ControllerStream(controller$) {
694 this[_controller] = controller$; 697 this[_controller] = controller$;
695 super._StreamImpl(); 698 super._StreamImpl();
696 } 699 }
697 [_createSubscription](onData, onError, onDone, cancelOnError) { 700 [_createSubscription](onData, onError, onDone, cancelOnError) {
698 return this[_controller]._subscribe(onData, onError, onDone, cancelOnErr or); 701 return this[_controller][_subscribe](onData, onError, onDone, cancelOnEr ror);
699 } 702 }
700 get hashCode() { 703 get hashCode() {
701 return dart.notNull(this[_controller].hashCode) ^ 892482866; 704 return dart.notNull(this[_controller].hashCode) ^ 892482866;
702 } 705 }
703 ['=='](other) { 706 ['=='](other) {
704 if (core.identical(this, other)) 707 if (core.identical(this, other))
705 return true; 708 return true;
706 if (!dart.is(other, _ControllerStream)) 709 if (!dart.is(other, _ControllerStream))
707 return false; 710 return false;
708 let otherStream = dart.as(other, _ControllerStream); 711 let otherStream = dart.as(other, _ControllerStream);
(...skipping 28 matching lines...) Expand all
737 let _STATE_EVENT_ID = Symbol('_STATE_EVENT_ID'); 740 let _STATE_EVENT_ID = Symbol('_STATE_EVENT_ID');
738 let _toggleEventId = Symbol('_toggleEventId'); 741 let _toggleEventId = Symbol('_toggleEventId');
739 let _isFiring = Symbol('_isFiring'); 742 let _isFiring = Symbol('_isFiring');
740 let _STATE_FIRING = Symbol('_STATE_FIRING'); 743 let _STATE_FIRING = Symbol('_STATE_FIRING');
741 let _setRemoveAfterFiring = Symbol('_setRemoveAfterFiring'); 744 let _setRemoveAfterFiring = Symbol('_setRemoveAfterFiring');
742 let _STATE_REMOVE_AFTER_FIRING = Symbol('_STATE_REMOVE_AFTER_FIRING'); 745 let _STATE_REMOVE_AFTER_FIRING = Symbol('_STATE_REMOVE_AFTER_FIRING');
743 let _removeAfterFiring = Symbol('_removeAfterFiring'); 746 let _removeAfterFiring = Symbol('_removeAfterFiring');
744 let _onPause = Symbol('_onPause'); 747 let _onPause = Symbol('_onPause');
745 let _onResume = Symbol('_onResume'); 748 let _onResume = Symbol('_onResume');
746 let _onCancel = Symbol('_onCancel'); 749 let _onCancel = Symbol('_onCancel');
750 let _recordCancel = Symbol('_recordCancel');
751 let _recordPause = Symbol('_recordPause');
752 let _recordResume = Symbol('_recordResume');
747 let _zone = Symbol('_zone'); 753 let _zone = Symbol('_zone');
748 let _state = Symbol('_state'); 754 let _state = Symbol('_state');
749 let _STATE_CANCEL_ON_ERROR = Symbol('_STATE_CANCEL_ON_ERROR'); 755 let _STATE_CANCEL_ON_ERROR = Symbol('_STATE_CANCEL_ON_ERROR');
750 let _onData = Symbol('_onData'); 756 let _onData = Symbol('_onData');
751 let _onError = Symbol('_onError'); 757 let _onError = Symbol('_onError');
752 let _onDone = Symbol('_onDone'); 758 let _onDone = Symbol('_onDone');
753 let _cancelFuture = Symbol('_cancelFuture'); 759 let _cancelFuture = Symbol('_cancelFuture');
754 let _pending = Symbol('_pending'); 760 let _pending = Symbol('_pending');
755 let _setPendingEvents = Symbol('_setPendingEvents'); 761 let _setPendingEvents = Symbol('_setPendingEvents');
756 let _STATE_HAS_PENDING = Symbol('_STATE_HAS_PENDING'); 762 let _STATE_HAS_PENDING = Symbol('_STATE_HAS_PENDING');
(...skipping 11 matching lines...) Expand all
768 let _STATE_WAIT_FOR_CANCEL = Symbol('_STATE_WAIT_FOR_CANCEL'); 774 let _STATE_WAIT_FOR_CANCEL = Symbol('_STATE_WAIT_FOR_CANCEL');
769 let _cancel = Symbol('_cancel'); 775 let _cancel = Symbol('_cancel');
770 let _isClosed = Symbol('_isClosed'); 776 let _isClosed = Symbol('_isClosed');
771 let _STATE_CLOSED = Symbol('_STATE_CLOSED'); 777 let _STATE_CLOSED = Symbol('_STATE_CLOSED');
772 let _STATE_CANCELED = Symbol('_STATE_CANCELED'); 778 let _STATE_CANCELED = Symbol('_STATE_CANCELED');
773 let _waitsForCancel = Symbol('_waitsForCancel'); 779 let _waitsForCancel = Symbol('_waitsForCancel');
774 let _STATE_IN_CALLBACK = Symbol('_STATE_IN_CALLBACK'); 780 let _STATE_IN_CALLBACK = Symbol('_STATE_IN_CALLBACK');
775 let _canFire = Symbol('_canFire'); 781 let _canFire = Symbol('_canFire');
776 let _cancelOnError = Symbol('_cancelOnError'); 782 let _cancelOnError = Symbol('_cancelOnError');
777 let _incrementPauseCount = Symbol('_incrementPauseCount'); 783 let _incrementPauseCount = Symbol('_incrementPauseCount');
778 let _add = Symbol('_add');
779 let _sendData = Symbol('_sendData'); 784 let _sendData = Symbol('_sendData');
780 let _addPending = Symbol('_addPending'); 785 let _addPending = Symbol('_addPending');
781 let _sendError = Symbol('_sendError'); 786 let _sendError = Symbol('_sendError');
782 let _close = Symbol('_close'); 787 let _close = Symbol('_close');
783 let _sendDone = Symbol('_sendDone'); 788 let _sendDone = Symbol('_sendDone');
784 let _checkState = Symbol('_checkState'); 789 let _checkState = Symbol('_checkState');
785 let _BufferingStreamSubscription$ = dart.generic(function(T) { 790 let _BufferingStreamSubscription$ = dart.generic(function(T) {
786 class _BufferingStreamSubscription extends core.Object { 791 class _BufferingStreamSubscription extends core.Object {
787 _BufferingStreamSubscription(onData, onError, onDone, cancelOnError) { 792 _BufferingStreamSubscription(onData, onError, onDone, cancelOnError) {
788 this[_zone] = Zone.current; 793 this[_zone] = Zone.current;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 if (this[_isCanceled]) 869 if (this[_isCanceled])
865 return this[_cancelFuture]; 870 return this[_cancelFuture];
866 this[_cancel](); 871 this[_cancel]();
867 return this[_cancelFuture]; 872 return this[_cancelFuture];
868 } 873 }
869 asFuture(futureValue) { 874 asFuture(futureValue) {
870 if (futureValue === void 0) 875 if (futureValue === void 0)
871 futureValue = null; 876 futureValue = null;
872 let result = new (_Future$(T))(); 877 let result = new (_Future$(T))();
873 this[_onDone] = (() => { 878 this[_onDone] = (() => {
874 result._complete(futureValue); 879 result[_complete](futureValue);
875 }).bind(this); 880 }).bind(this);
876 this[_onError] = ((error, stackTrace) => { 881 this[_onError] = ((error, stackTrace) => {
877 this.cancel(); 882 this.cancel();
878 result._completeError(error, dart.as(stackTrace, core.StackTrace)); 883 result[_completeError](error, dart.as(stackTrace, core.StackTrace));
879 }).bind(this); 884 }).bind(this);
880 return result; 885 return result;
881 } 886 }
882 get [_isInputPaused]() { 887 get [_isInputPaused]() {
883 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption[_STATE_INPUT_PAUSED])) != 0; 888 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption[_STATE_INPUT_PAUSED])) != 0;
884 } 889 }
885 get [_isClosed]() { 890 get [_isClosed]() {
886 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption[_STATE_CLOSED])) != 0; 891 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption[_STATE_CLOSED])) != 0;
887 } 892 }
888 get [_isCanceled]() { 893 get [_isCanceled]() {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 return _BufferingStreamSubscription; 1096 return _BufferingStreamSubscription;
1092 }); 1097 });
1093 let _BufferingStreamSubscription = _BufferingStreamSubscription$(dart.dynamic) ; 1098 let _BufferingStreamSubscription = _BufferingStreamSubscription$(dart.dynamic) ;
1094 let _ControllerSubscription$ = dart.generic(function(T) { 1099 let _ControllerSubscription$ = dart.generic(function(T) {
1095 class _ControllerSubscription extends _BufferingStreamSubscription$(T) { 1100 class _ControllerSubscription extends _BufferingStreamSubscription$(T) {
1096 _ControllerSubscription(controller$, onData, onError, onDone, cancelOnErro r) { 1101 _ControllerSubscription(controller$, onData, onError, onDone, cancelOnErro r) {
1097 this[_controller] = controller$; 1102 this[_controller] = controller$;
1098 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro r); 1103 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro r);
1099 } 1104 }
1100 [_onCancel]() { 1105 [_onCancel]() {
1101 return this[_controller]._recordCancel(this); 1106 return this[_controller][_recordCancel](this);
1102 } 1107 }
1103 [_onPause]() { 1108 [_onPause]() {
1104 this[_controller]._recordPause(this); 1109 this[_controller][_recordPause](this);
1105 } 1110 }
1106 [_onResume]() { 1111 [_onResume]() {
1107 this[_controller]._recordResume(this); 1112 this[_controller][_recordResume](this);
1108 } 1113 }
1109 } 1114 }
1110 return _ControllerSubscription; 1115 return _ControllerSubscription;
1111 }); 1116 });
1112 let _ControllerSubscription = _ControllerSubscription$(dart.dynamic); 1117 let _ControllerSubscription = _ControllerSubscription$(dart.dynamic);
1113 let _BroadcastSubscription$ = dart.generic(function(T) { 1118 let _BroadcastSubscription$ = dart.generic(function(T) {
1114 class _BroadcastSubscription extends _ControllerSubscription$(T) { 1119 class _BroadcastSubscription extends _ControllerSubscription$(T) {
1115 _BroadcastSubscription(controller, onData, onError, onDone, cancelOnError) { 1120 _BroadcastSubscription(controller, onData, onError, onDone, cancelOnError) {
1116 this[_eventState] = null; 1121 this[_eventState] = null;
1117 this[_next] = null; 1122 this[_next] = null;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 let _addStreamState = Symbol('_addStreamState'); 1157 let _addStreamState = Symbol('_addStreamState');
1153 let _doneFuture = Symbol('_doneFuture'); 1158 let _doneFuture = Symbol('_doneFuture');
1154 let _isEmpty = Symbol('_isEmpty'); 1159 let _isEmpty = Symbol('_isEmpty');
1155 let _hasOneListener = Symbol('_hasOneListener'); 1160 let _hasOneListener = Symbol('_hasOneListener');
1156 let _isAddingStream = Symbol('_isAddingStream'); 1161 let _isAddingStream = Symbol('_isAddingStream');
1157 let _STATE_ADDSTREAM = Symbol('_STATE_ADDSTREAM'); 1162 let _STATE_ADDSTREAM = Symbol('_STATE_ADDSTREAM');
1158 let _mayAddEvent = Symbol('_mayAddEvent'); 1163 let _mayAddEvent = Symbol('_mayAddEvent');
1159 let _ensureDoneFuture = Symbol('_ensureDoneFuture'); 1164 let _ensureDoneFuture = Symbol('_ensureDoneFuture');
1160 let _addListener = Symbol('_addListener'); 1165 let _addListener = Symbol('_addListener');
1161 let _removeListener = Symbol('_removeListener'); 1166 let _removeListener = Symbol('_removeListener');
1162 let _subscribe = Symbol('_subscribe');
1163 let _recordCancel = Symbol('_recordCancel');
1164 let _callOnCancel = Symbol('_callOnCancel'); 1167 let _callOnCancel = Symbol('_callOnCancel');
1165 let _recordPause = Symbol('_recordPause');
1166 let _recordResume = Symbol('_recordResume');
1167 let _addEventError = Symbol('_addEventError'); 1168 let _addEventError = Symbol('_addEventError');
1168 let _forEachListener = Symbol('_forEachListener'); 1169 let _forEachListener = Symbol('_forEachListener');
1169 let _mayComplete = Symbol('_mayComplete'); 1170 let _mayComplete = Symbol('_mayComplete');
1171 let _asyncComplete = Symbol('_asyncComplete');
1170 let _BroadcastStreamController$ = dart.generic(function(T) { 1172 let _BroadcastStreamController$ = dart.generic(function(T) {
1171 class _BroadcastStreamController extends core.Object { 1173 class _BroadcastStreamController extends core.Object {
1172 _BroadcastStreamController(onListen$, onCancel$) { 1174 _BroadcastStreamController(onListen$, onCancel$) {
1173 this[_onListen] = onListen$; 1175 this[_onListen] = onListen$;
1174 this[_onCancel] = onCancel$; 1176 this[_onCancel] = onCancel$;
1175 this[_state] = _BroadcastStreamController[_STATE_INITIAL]; 1177 this[_state] = _BroadcastStreamController[_STATE_INITIAL];
1176 this[_next] = null; 1178 this[_next] = null;
1177 this[_previous] = null; 1179 this[_previous] = null;
1178 this[_addStreamState] = null; 1180 this[_addStreamState] = null;
1179 this[_doneFuture] = null; 1181 this[_doneFuture] = null;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 if (core.identical(this[_next], this[_previous])) { 1245 if (core.identical(this[_next], this[_previous])) {
1244 _runGuarded(this[_onListen]); 1246 _runGuarded(this[_onListen]);
1245 } 1247 }
1246 return dart.as(subscription, StreamSubscription$(T)); 1248 return dart.as(subscription, StreamSubscription$(T));
1247 } 1249 }
1248 [_recordCancel](subscription) { 1250 [_recordCancel](subscription) {
1249 if (core.identical(subscription[_next], subscription)) 1251 if (core.identical(subscription[_next], subscription))
1250 return null; 1252 return null;
1251 dart.assert(!dart.notNull(core.identical(subscription[_next], subscripti on))); 1253 dart.assert(!dart.notNull(core.identical(subscription[_next], subscripti on)));
1252 if (subscription[_isFiring]) { 1254 if (subscription[_isFiring]) {
1253 subscription._setRemoveAfterFiring(); 1255 subscription[_setRemoveAfterFiring]();
1254 } else { 1256 } else {
1255 dart.assert(!dart.notNull(core.identical(subscription[_next], subscrip tion))); 1257 dart.assert(!dart.notNull(core.identical(subscription[_next], subscrip tion)));
1256 this[_removeListener](subscription); 1258 this[_removeListener](subscription);
1257 if (!dart.notNull(this[_isFiring]) && dart.notNull(this[_isEmpty])) { 1259 if (!dart.notNull(this[_isFiring]) && dart.notNull(this[_isEmpty])) {
1258 this[_callOnCancel](); 1260 this[_callOnCancel]();
1259 } 1261 }
1260 } 1262 }
1261 return null; 1263 return null;
1262 } 1264 }
1263 [_recordPause](subscription) {} 1265 [_recordPause](subscription) {}
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 if (this[_isFiring]) { 1329 if (this[_isFiring]) {
1328 throw new core.StateError("Cannot fire new event. Controller is alread y firing an event"); 1330 throw new core.StateError("Cannot fire new event. Controller is alread y firing an event");
1329 } 1331 }
1330 if (this[_isEmpty]) 1332 if (this[_isEmpty])
1331 return; 1333 return;
1332 let id = dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContr oller[_STATE_EVENT_ID]); 1334 let id = dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContr oller[_STATE_EVENT_ID]);
1333 this[_state] = dart.notNull(_BroadcastStreamController[_STATE_EVENT_ID]) | dart.notNull(_BroadcastStreamController[_STATE_FIRING]); 1335 this[_state] = dart.notNull(_BroadcastStreamController[_STATE_EVENT_ID]) | dart.notNull(_BroadcastStreamController[_STATE_FIRING]);
1334 let link = this[_next]; 1336 let link = this[_next];
1335 while (!dart.notNull(core.identical(link, this))) { 1337 while (!dart.notNull(core.identical(link, this))) {
1336 let subscription = dart.as(link, _BroadcastSubscription$(T)); 1338 let subscription = dart.as(link, _BroadcastSubscription$(T));
1337 if (subscription._expectsEvent(id)) { 1339 if (subscription[_expectsEvent](id)) {
1338 subscription[_eventState] = _BroadcastSubscription[_STATE_FIRING]; 1340 subscription[_eventState] = _BroadcastSubscription[_STATE_FIRING];
1339 action(subscription); 1341 action(subscription);
1340 subscription._toggleEventId(); 1342 subscription[_toggleEventId]();
1341 link = subscription[_next]; 1343 link = subscription[_next];
1342 if (subscription[_removeAfterFiring]) { 1344 if (subscription[_removeAfterFiring]) {
1343 this[_removeListener](subscription); 1345 this[_removeListener](subscription);
1344 } 1346 }
1345 subscription[_eventState] = ~dart.notNull(_BroadcastSubscription[_ST ATE_FIRING]); 1347 subscription[_eventState] = ~dart.notNull(_BroadcastSubscription[_ST ATE_FIRING]);
1346 } else { 1348 } else {
1347 link = subscription[_next]; 1349 link = subscription[_next];
1348 } 1350 }
1349 } 1351 }
1350 this[_state] = ~dart.notNull(_BroadcastStreamController[_STATE_FIRING]); 1352 this[_state] = ~dart.notNull(_BroadcastStreamController[_STATE_FIRING]);
1351 if (this[_isEmpty]) { 1353 if (this[_isEmpty]) {
1352 this[_callOnCancel](); 1354 this[_callOnCancel]();
1353 } 1355 }
1354 } 1356 }
1355 [_callOnCancel]() { 1357 [_callOnCancel]() {
1356 dart.assert(this[_isEmpty]); 1358 dart.assert(this[_isEmpty]);
1357 if (dart.notNull(this.isClosed) && dart.notNull(this[_doneFuture][_mayCo mplete])) { 1359 if (dart.notNull(this.isClosed) && dart.notNull(this[_doneFuture][_mayCo mplete])) {
1358 this[_doneFuture]._asyncComplete(null); 1360 this[_doneFuture][_asyncComplete](null);
1359 } 1361 }
1360 _runGuarded(this[_onCancel]); 1362 _runGuarded(this[_onCancel]);
1361 } 1363 }
1362 } 1364 }
1363 _BroadcastStreamController[dart.implements] = () => [StreamController$(T), _ StreamControllerLifecycle$(T), _BroadcastSubscriptionLink, _EventSink$(T), _Even tDispatch$(T)]; 1365 _BroadcastStreamController[dart.implements] = () => [StreamController$(T), _ StreamControllerLifecycle$(T), _BroadcastSubscriptionLink, _EventSink$(T), _Even tDispatch$(T)];
1364 _BroadcastStreamController._STATE_INITIAL = 0; 1366 _BroadcastStreamController._STATE_INITIAL = 0;
1365 _BroadcastStreamController._STATE_EVENT_ID = 1; 1367 _BroadcastStreamController._STATE_EVENT_ID = 1;
1366 _BroadcastStreamController._STATE_FIRING = 2; 1368 _BroadcastStreamController._STATE_FIRING = 2;
1367 _BroadcastStreamController._STATE_CLOSED = 4; 1369 _BroadcastStreamController._STATE_CLOSED = 4;
1368 _BroadcastStreamController._STATE_ADDSTREAM = 8; 1370 _BroadcastStreamController._STATE_ADDSTREAM = 8;
1369 return _BroadcastStreamController; 1371 return _BroadcastStreamController;
1370 }); 1372 });
1371 let _BroadcastStreamController = _BroadcastStreamController$(dart.dynamic); 1373 let _BroadcastStreamController = _BroadcastStreamController$(dart.dynamic);
1372 let _SyncBroadcastStreamController$ = dart.generic(function(T) { 1374 let _SyncBroadcastStreamController$ = dart.generic(function(T) {
1373 class _SyncBroadcastStreamController extends _BroadcastStreamController$(T) { 1375 class _SyncBroadcastStreamController extends _BroadcastStreamController$(T) {
1374 _SyncBroadcastStreamController(onListen, onCancel) { 1376 _SyncBroadcastStreamController(onListen, onCancel) {
1375 super._BroadcastStreamController(onListen, onCancel); 1377 super._BroadcastStreamController(onListen, onCancel);
1376 } 1378 }
1377 [_sendData](data) { 1379 [_sendData](data) {
1378 if (this[_isEmpty]) 1380 if (this[_isEmpty])
1379 return; 1381 return;
1380 if (this[_hasOneListener]) { 1382 if (this[_hasOneListener]) {
1381 this[_state] = _BroadcastStreamController[_STATE_FIRING]; 1383 this[_state] = _BroadcastStreamController[_STATE_FIRING];
1382 let subscription = dart.as(this[_next], _BroadcastSubscription); 1384 let subscription = dart.as(this[_next], _BroadcastSubscription);
1383 subscription._add(data); 1385 subscription[_add](data);
1384 this[_state] = ~dart.notNull(_BroadcastStreamController[_STATE_FIRING] ); 1386 this[_state] = ~dart.notNull(_BroadcastStreamController[_STATE_FIRING] );
1385 if (this[_isEmpty]) { 1387 if (this[_isEmpty]) {
1386 this[_callOnCancel](); 1388 this[_callOnCancel]();
1387 } 1389 }
1388 return; 1390 return;
1389 } 1391 }
1390 this[_forEachListener](((subscription) => { 1392 this[_forEachListener](((subscription) => {
1391 subscription._add(data); 1393 subscription[_add](data);
1392 }).bind(this)); 1394 }).bind(this));
1393 } 1395 }
1394 [_sendError](error, stackTrace) { 1396 [_sendError](error, stackTrace) {
1395 if (this[_isEmpty]) 1397 if (this[_isEmpty])
1396 return; 1398 return;
1397 this[_forEachListener](((subscription) => { 1399 this[_forEachListener](((subscription) => {
1398 subscription._addError(error, stackTrace); 1400 subscription[_addError](error, stackTrace);
1399 }).bind(this)); 1401 }).bind(this));
1400 } 1402 }
1401 [_sendDone]() { 1403 [_sendDone]() {
1402 if (!dart.notNull(this[_isEmpty])) { 1404 if (!dart.notNull(this[_isEmpty])) {
1403 this[_forEachListener](dart.closureWrap(((subscription) => { 1405 this[_forEachListener](dart.closureWrap(((subscription) => {
1404 subscription._close(); 1406 subscription[_close]();
1405 }).bind(this), "(_BufferingStreamSubscription<T>) → void")); 1407 }).bind(this), "(_BufferingStreamSubscription<T>) → void"));
1406 } else { 1408 } else {
1407 dart.assert(this[_doneFuture] != null); 1409 dart.assert(this[_doneFuture] != null);
1408 dart.assert(this[_doneFuture][_mayComplete]); 1410 dart.assert(this[_doneFuture][_mayComplete]);
1409 this[_doneFuture]._asyncComplete(null); 1411 this[_doneFuture][_asyncComplete](null);
1410 } 1412 }
1411 } 1413 }
1412 } 1414 }
1413 return _SyncBroadcastStreamController; 1415 return _SyncBroadcastStreamController;
1414 }); 1416 });
1415 let _SyncBroadcastStreamController = _SyncBroadcastStreamController$(dart.dyna mic); 1417 let _SyncBroadcastStreamController = _SyncBroadcastStreamController$(dart.dyna mic);
1416 let _AsyncBroadcastStreamController$ = dart.generic(function(T) { 1418 let _AsyncBroadcastStreamController$ = dart.generic(function(T) {
1417 class _AsyncBroadcastStreamController extends _BroadcastStreamController$(T) { 1419 class _AsyncBroadcastStreamController extends _BroadcastStreamController$(T) {
1418 _AsyncBroadcastStreamController(onListen, onCancel) { 1420 _AsyncBroadcastStreamController(onListen, onCancel) {
1419 super._BroadcastStreamController(onListen, onCancel); 1421 super._BroadcastStreamController(onListen, onCancel);
1420 } 1422 }
1421 [_sendData](data) { 1423 [_sendData](data) {
1422 for (let link = this[_next]; !dart.notNull(core.identical(link, this)); link = link[_next]) { 1424 for (let link = this[_next]; !dart.notNull(core.identical(link, this)); link = link[_next]) {
1423 let subscription = dart.as(link, _BroadcastSubscription$(T)); 1425 let subscription = dart.as(link, _BroadcastSubscription$(T));
1424 subscription._addPending(new _DelayedData(data)); 1426 subscription[_addPending](new _DelayedData(data));
1425 } 1427 }
1426 } 1428 }
1427 [_sendError](error, stackTrace) { 1429 [_sendError](error, stackTrace) {
1428 for (let link = this[_next]; !dart.notNull(core.identical(link, this)); link = link[_next]) { 1430 for (let link = this[_next]; !dart.notNull(core.identical(link, this)); link = link[_next]) {
1429 let subscription = dart.as(link, _BroadcastSubscription$(T)); 1431 let subscription = dart.as(link, _BroadcastSubscription$(T));
1430 subscription._addPending(new _DelayedError(error, stackTrace)); 1432 subscription[_addPending](new _DelayedError(error, stackTrace));
1431 } 1433 }
1432 } 1434 }
1433 [_sendDone]() { 1435 [_sendDone]() {
1434 if (!dart.notNull(this[_isEmpty])) { 1436 if (!dart.notNull(this[_isEmpty])) {
1435 for (let link = this[_next]; !dart.notNull(core.identical(link, this)) ; link = link[_next]) { 1437 for (let link = this[_next]; !dart.notNull(core.identical(link, this)) ; link = link[_next]) {
1436 let subscription = dart.as(link, _BroadcastSubscription$(T)); 1438 let subscription = dart.as(link, _BroadcastSubscription$(T));
1437 subscription._addPending(new _DelayedDone()); 1439 subscription[_addPending](new _DelayedDone());
1438 } 1440 }
1439 } else { 1441 } else {
1440 dart.assert(this[_doneFuture] != null); 1442 dart.assert(this[_doneFuture] != null);
1441 dart.assert(this[_doneFuture][_mayComplete]); 1443 dart.assert(this[_doneFuture][_mayComplete]);
1442 this[_doneFuture]._asyncComplete(null); 1444 this[_doneFuture][_asyncComplete](null);
1443 } 1445 }
1444 } 1446 }
1445 } 1447 }
1446 return _AsyncBroadcastStreamController; 1448 return _AsyncBroadcastStreamController;
1447 }); 1449 });
1448 let _AsyncBroadcastStreamController = _AsyncBroadcastStreamController$(dart.dy namic); 1450 let _AsyncBroadcastStreamController = _AsyncBroadcastStreamController$(dart.dy namic);
1449 let _addPendingEvent = Symbol('_addPendingEvent'); 1451 let _addPendingEvent = Symbol('_addPendingEvent');
1450 let _AsBroadcastStreamController$ = dart.generic(function(T) { 1452 let _AsBroadcastStreamController$ = dart.generic(function(T) {
1451 class _AsBroadcastStreamController extends _SyncBroadcastStreamController$(T ) { 1453 class _AsBroadcastStreamController extends _SyncBroadcastStreamController$(T ) {
1452 _AsBroadcastStreamController(onListen, onCancel) { 1454 _AsBroadcastStreamController(onListen, onCancel) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 } 1496 }
1495 let result = super.close(); 1497 let result = super.close();
1496 dart.assert(!dart.notNull(this[_hasPending])); 1498 dart.assert(!dart.notNull(this[_hasPending]));
1497 return result; 1499 return result;
1498 } 1500 }
1499 [_callOnCancel]() { 1501 [_callOnCancel]() {
1500 if (this[_hasPending]) { 1502 if (this[_hasPending]) {
1501 this[_pending].clear(); 1503 this[_pending].clear();
1502 this[_pending] = null; 1504 this[_pending] = null;
1503 } 1505 }
1504 super._callOnCancel(); 1506 super[_callOnCancel]();
1505 } 1507 }
1506 } 1508 }
1507 _AsBroadcastStreamController[dart.implements] = () => [_EventDispatch$(T)]; 1509 _AsBroadcastStreamController[dart.implements] = () => [_EventDispatch$(T)];
1508 return _AsBroadcastStreamController; 1510 return _AsBroadcastStreamController;
1509 }); 1511 });
1510 let _AsBroadcastStreamController = _AsBroadcastStreamController$(dart.dynamic) ; 1512 let _AsBroadcastStreamController = _AsBroadcastStreamController$(dart.dynamic) ;
1511 let _pauseCount = Symbol('_pauseCount'); 1513 let _pauseCount = Symbol('_pauseCount');
1512 let _resume = Symbol('_resume'); 1514 let _resume = Symbol('_resume');
1513 let _DoneSubscription$ = dart.generic(function(T) { 1515 let _DoneSubscription$ = dart.generic(function(T) {
1514 class _DoneSubscription extends core.Object { 1516 class _DoneSubscription extends core.Object {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 let _s = Symbol('_s'); 1563 let _s = Symbol('_s');
1562 class DeferredLoadException extends core.Object { 1564 class DeferredLoadException extends core.Object {
1563 DeferredLoadException(s$) { 1565 DeferredLoadException(s$) {
1564 this[_s] = s$; 1566 this[_s] = s$;
1565 } 1567 }
1566 toString() { 1568 toString() {
1567 return `DeferredLoadException: '${this[_s]}'`; 1569 return `DeferredLoadException: '${this[_s]}'`;
1568 } 1570 }
1569 } 1571 }
1570 DeferredLoadException[dart.implements] = () => [core.Exception]; 1572 DeferredLoadException[dart.implements] = () => [core.Exception];
1573 let _completeWithValue = Symbol('_completeWithValue');
1571 let Future$ = dart.generic(function(T) { 1574 let Future$ = dart.generic(function(T) {
1572 class Future extends core.Object { 1575 class Future extends core.Object {
1573 Future(computation) { 1576 Future(computation) {
1574 let result = new (_Future$(T))(); 1577 let result = new (_Future$(T))();
1575 Timer.run((() => { 1578 Timer.run((() => {
1576 try { 1579 try {
1577 result._complete(computation()); 1580 result[_complete](computation());
1578 } catch (e) { 1581 } catch (e) {
1579 let s = dart.stackTrace(e); 1582 let s = dart.stackTrace(e);
1580 _completeWithErrorCallback(result, e, s); 1583 _completeWithErrorCallback(result, e, s);
1581 } 1584 }
1582 1585
1583 }).bind(this)); 1586 }).bind(this));
1584 return dart.as(result, Future$(T)); 1587 return dart.as(result, Future$(T));
1585 } 1588 }
1586 microtask(computation) { 1589 microtask(computation) {
1587 let result = new (_Future$(T))(); 1590 let result = new (_Future$(T))();
1588 scheduleMicrotask((() => { 1591 scheduleMicrotask((() => {
1589 try { 1592 try {
1590 result._complete(computation()); 1593 result[_complete](computation());
1591 } catch (e) { 1594 } catch (e) {
1592 let s = dart.stackTrace(e); 1595 let s = dart.stackTrace(e);
1593 _completeWithErrorCallback(result, e, s); 1596 _completeWithErrorCallback(result, e, s);
1594 } 1597 }
1595 1598
1596 }).bind(this)); 1599 }).bind(this));
1597 return dart.as(result, Future$(T)); 1600 return dart.as(result, Future$(T));
1598 } 1601 }
1599 sync(computation) { 1602 sync(computation) {
1600 try { 1603 try {
(...skipping 22 matching lines...) Expand all
1623 } 1626 }
1624 } 1627 }
1625 return new _Future$(T).immediateError(error, stackTrace); 1628 return new _Future$(T).immediateError(error, stackTrace);
1626 } 1629 }
1627 delayed(duration, computation) { 1630 delayed(duration, computation) {
1628 if (computation === void 0) 1631 if (computation === void 0)
1629 computation = null; 1632 computation = null;
1630 let result = new (_Future$(T))(); 1633 let result = new (_Future$(T))();
1631 new Timer(duration, (() => { 1634 new Timer(duration, (() => {
1632 try { 1635 try {
1633 result._complete(computation == null ? null : computation()); 1636 result[_complete](computation == null ? null : computation());
1634 } catch (e) { 1637 } catch (e) {
1635 let s = dart.stackTrace(e); 1638 let s = dart.stackTrace(e);
1636 _completeWithErrorCallback(result, e, s); 1639 _completeWithErrorCallback(result, e, s);
1637 } 1640 }
1638 1641
1639 }).bind(this)); 1642 }).bind(this));
1640 return dart.as(result, Future$(T)); 1643 return dart.as(result, Future$(T));
1641 } 1644 }
1642 static wait(futures, opts) { 1645 static wait(futures, opts) {
1643 let eagerError = opts && 'eagerError' in opts ? opts.eagerError : false; 1646 let eagerError = opts && 'eagerError' in opts ? opts.eagerError : false;
(...skipping 11 matching lines...) Expand all
1655 for (let value of values) { 1658 for (let value of values) {
1656 if (value != null) { 1659 if (value != null) {
1657 new Future.sync(() => { 1660 new Future.sync(() => {
1658 dart.dinvokef(cleanUp, value); 1661 dart.dinvokef(cleanUp, value);
1659 }); 1662 });
1660 } 1663 }
1661 } 1664 }
1662 } 1665 }
1663 values = null; 1666 values = null;
1664 if (remaining == 0 || dart.notNull(eagerError)) { 1667 if (remaining == 0 || dart.notNull(eagerError)) {
1665 result._completeError(theError, dart.as(theStackTrace, core.StackT race)); 1668 result[_completeError](theError, dart.as(theStackTrace, core.Stack Trace));
1666 } else { 1669 } else {
1667 error = theError; 1670 error = theError;
1668 stackTrace = dart.as(theStackTrace, core.StackTrace); 1671 stackTrace = dart.as(theStackTrace, core.StackTrace);
1669 } 1672 }
1670 } else if (remaining == 0 && !dart.notNull(eagerError)) { 1673 } else if (remaining == 0 && !dart.notNull(eagerError)) {
1671 result._completeError(error, stackTrace); 1674 result[_completeError](error, stackTrace);
1672 } 1675 }
1673 } 1676 }
1674 for (let future of futures) { 1677 for (let future of futures) {
1675 let pos = ((x) => remaining = dart.notNull(x) + 1, x)(remaining); 1678 let pos = ((x) => remaining = dart.notNull(x) + 1, x)(remaining);
1676 future.then(((value) => { 1679 future.then(((value) => {
1677 remaining = dart.notNull(remaining) - 1; 1680 remaining = dart.notNull(remaining) - 1;
1678 if (values != null) { 1681 if (values != null) {
1679 values.set(pos, value); 1682 values[core.$set](pos, value);
1680 if (remaining == 0) { 1683 if (remaining == 0) {
1681 result._completeWithValue(values); 1684 result[_completeWithValue](values);
1682 } 1685 }
1683 } else { 1686 } else {
1684 if (dart.notNull(cleanUp != null) && dart.notNull(value != null)) { 1687 if (dart.notNull(cleanUp != null) && dart.notNull(value != null)) {
1685 new Future.sync(() => { 1688 new Future.sync(() => {
1686 dart.dinvokef(cleanUp, value); 1689 dart.dinvokef(cleanUp, value);
1687 }); 1690 });
1688 } 1691 }
1689 if (remaining == 0 && !dart.notNull(eagerError)) { 1692 if (remaining == 0 && !dart.notNull(eagerError)) {
1690 result._completeError(error, stackTrace); 1693 result[_completeError](error, stackTrace);
1691 } 1694 }
1692 } 1695 }
1693 }).bind(this), {onError: handleError}); 1696 }).bind(this), {onError: handleError});
1694 } 1697 }
1695 if (remaining == 0) { 1698 if (remaining == 0) {
1696 return dart.as(new Future.value(/* Unimplemented const */new core.List .from([])), Future$(core.List)); 1699 return dart.as(new Future.value(/* Unimplemented const */new core.List .from([])), Future$(core.List));
1697 } 1700 }
1698 values = new core.List(remaining); 1701 values = new core.List(remaining);
1699 return result; 1702 return result;
1700 } 1703 }
1701 static forEach(input, f) { 1704 static forEach(input, f) {
1702 let iterator = input.iterator; 1705 let iterator = input[core.$iterator];
1703 return Future.doWhile((() => { 1706 return Future.doWhile((() => {
1704 if (!dart.notNull(iterator.moveNext())) 1707 if (!dart.notNull(iterator.moveNext()))
1705 return false; 1708 return false;
1706 return new Future.sync((() => dart.dinvokef(f, iterator.current)).bind (this)).then((_) => true); 1709 return new Future.sync((() => dart.dinvokef(f, iterator.current)).bind (this)).then((_) => true);
1707 }).bind(this)); 1710 }).bind(this));
1708 } 1711 }
1709 static doWhile(f) { 1712 static doWhile(f) {
1710 let doneSignal = new _Future(); 1713 let doneSignal = new _Future();
1711 let nextIteration = null; 1714 let nextIteration = null;
1712 nextIteration = Zone.current.bindUnaryCallback(((keepGoing) => { 1715 nextIteration = Zone.current.bindUnaryCallback(((keepGoing) => {
1713 if (keepGoing) { 1716 if (keepGoing) {
1714 new Future.sync(f).then(dart.as(nextIteration, dart.throw_("Unimplem ented type (dynamic) → dynamic")), {onError: doneSignal[_completeError]}); 1717 new Future.sync(f).then(dart.as(nextIteration, dart.throw_("Unimplem ented type (dynamic) → dynamic")), {onError: doneSignal[_completeError]});
1715 } else { 1718 } else {
1716 doneSignal._complete(null); 1719 doneSignal[_complete](null);
1717 } 1720 }
1718 }).bind(this), {runGuarded: true}); 1721 }).bind(this), {runGuarded: true});
1719 dart.dinvokef(nextIteration, true); 1722 dart.dinvokef(nextIteration, true);
1720 return doneSignal; 1723 return doneSignal;
1721 } 1724 }
1722 } 1725 }
1723 dart.defineNamedConstructor(Future, 'microtask'); 1726 dart.defineNamedConstructor(Future, 'microtask');
1724 dart.defineNamedConstructor(Future, 'sync'); 1727 dart.defineNamedConstructor(Future, 'sync');
1725 dart.defineNamedConstructor(Future, 'value'); 1728 dart.defineNamedConstructor(Future, 'value');
1726 dart.defineNamedConstructor(Future, 'error'); 1729 dart.defineNamedConstructor(Future, 'error');
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 return Completer; 1766 return Completer;
1764 }); 1767 });
1765 let Completer = Completer$(dart.dynamic); 1768 let Completer = Completer$(dart.dynamic);
1766 // Function _completeWithErrorCallback: (_Future<dynamic>, dynamic, dynamic) → void 1769 // Function _completeWithErrorCallback: (_Future<dynamic>, dynamic, dynamic) → void
1767 function _completeWithErrorCallback(result, error, stackTrace) { 1770 function _completeWithErrorCallback(result, error, stackTrace) {
1768 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core .StackTrace)); 1771 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core .StackTrace));
1769 if (replacement != null) { 1772 if (replacement != null) {
1770 error = _nonNullError(replacement.error); 1773 error = _nonNullError(replacement.error);
1771 stackTrace = replacement.stackTrace; 1774 stackTrace = replacement.stackTrace;
1772 } 1775 }
1773 result._completeError(error, dart.as(stackTrace, core.StackTrace)); 1776 result[_completeError](error, dart.as(stackTrace, core.StackTrace));
1774 } 1777 }
1775 // Function _nonNullError: (Object) → Object 1778 // Function _nonNullError: (Object) → Object
1776 function _nonNullError(error) { 1779 function _nonNullError(error) {
1777 return error != null ? error : new core.NullThrownError(); 1780 return error != null ? error : new core.NullThrownError();
1778 } 1781 }
1779 let _Completer$ = dart.generic(function(T) { 1782 let _Completer$ = dart.generic(function(T) {
1780 class _Completer extends core.Object { 1783 class _Completer extends core.Object {
1781 _Completer() { 1784 _Completer() {
1782 this.future = new (_Future$(T))(); 1785 this.future = new (_Future$(T))();
1783 } 1786 }
(...skipping 11 matching lines...) Expand all
1795 this[_completeError](error, stackTrace); 1798 this[_completeError](error, stackTrace);
1796 } 1799 }
1797 get isCompleted() { 1800 get isCompleted() {
1798 return !dart.notNull(this.future[_mayComplete]); 1801 return !dart.notNull(this.future[_mayComplete]);
1799 } 1802 }
1800 } 1803 }
1801 _Completer[dart.implements] = () => [Completer$(T)]; 1804 _Completer[dart.implements] = () => [Completer$(T)];
1802 return _Completer; 1805 return _Completer;
1803 }); 1806 });
1804 let _Completer = _Completer$(dart.dynamic); 1807 let _Completer = _Completer$(dart.dynamic);
1808 let _asyncCompleteError = Symbol('_asyncCompleteError');
1805 let _AsyncCompleter$ = dart.generic(function(T) { 1809 let _AsyncCompleter$ = dart.generic(function(T) {
1806 class _AsyncCompleter extends _Completer$(T) { 1810 class _AsyncCompleter extends _Completer$(T) {
1807 complete(value) { 1811 complete(value) {
1808 if (value === void 0) 1812 if (value === void 0)
1809 value = null; 1813 value = null;
1810 if (!dart.notNull(this.future[_mayComplete])) 1814 if (!dart.notNull(this.future[_mayComplete]))
1811 throw new core.StateError("Future already completed"); 1815 throw new core.StateError("Future already completed");
1812 this.future._asyncComplete(value); 1816 this.future[_asyncComplete](value);
1813 } 1817 }
1814 [_completeError](error, stackTrace) { 1818 [_completeError](error, stackTrace) {
1815 this.future._asyncCompleteError(error, stackTrace); 1819 this.future[_asyncCompleteError](error, stackTrace);
1816 } 1820 }
1817 } 1821 }
1818 return _AsyncCompleter; 1822 return _AsyncCompleter;
1819 }); 1823 });
1820 let _AsyncCompleter = _AsyncCompleter$(dart.dynamic); 1824 let _AsyncCompleter = _AsyncCompleter$(dart.dynamic);
1821 let _SyncCompleter$ = dart.generic(function(T) { 1825 let _SyncCompleter$ = dart.generic(function(T) {
1822 class _SyncCompleter extends _Completer$(T) { 1826 class _SyncCompleter extends _Completer$(T) {
1823 complete(value) { 1827 complete(value) {
1824 if (value === void 0) 1828 if (value === void 0)
1825 value = null; 1829 value = null;
1826 if (!dart.notNull(this.future[_mayComplete])) 1830 if (!dart.notNull(this.future[_mayComplete]))
1827 throw new core.StateError("Future already completed"); 1831 throw new core.StateError("Future already completed");
1828 this.future._complete(value); 1832 this.future[_complete](value);
1829 } 1833 }
1830 [_completeError](error, stackTrace) { 1834 [_completeError](error, stackTrace) {
1831 this.future._completeError(error, stackTrace); 1835 this.future[_completeError](error, stackTrace);
1832 } 1836 }
1833 } 1837 }
1834 return _SyncCompleter; 1838 return _SyncCompleter;
1835 }); 1839 });
1836 let _SyncCompleter = _SyncCompleter$(dart.dynamic); 1840 let _SyncCompleter = _SyncCompleter$(dart.dynamic);
1837 let _nextListener = Symbol('_nextListener'); 1841 let _nextListener = Symbol('_nextListener');
1838 let _onValue = Symbol('_onValue'); 1842 let _onValue = Symbol('_onValue');
1839 let _errorTest = Symbol('_errorTest'); 1843 let _errorTest = Symbol('_errorTest');
1840 let _whenCompleteAction = Symbol('_whenCompleteAction'); 1844 let _whenCompleteAction = Symbol('_whenCompleteAction');
1841 class _FutureListener extends core.Object { 1845 class _FutureListener extends core.Object {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 _FutureListener.MASK_TEST_ERROR = 4; 1911 _FutureListener.MASK_TEST_ERROR = 4;
1908 _FutureListener.MASK_WHENCOMPLETE = 8; 1912 _FutureListener.MASK_WHENCOMPLETE = 8;
1909 _FutureListener.STATE_CHAIN = 0; 1913 _FutureListener.STATE_CHAIN = 0;
1910 _FutureListener.STATE_THEN = _FutureListener.MASK_VALUE; 1914 _FutureListener.STATE_THEN = _FutureListener.MASK_VALUE;
1911 _FutureListener.STATE_THEN_ONERROR = dart.notNull(_FutureListener.MASK_VALUE) | dart.notNull(_FutureListener.MASK_ERROR); 1915 _FutureListener.STATE_THEN_ONERROR = dart.notNull(_FutureListener.MASK_VALUE) | dart.notNull(_FutureListener.MASK_ERROR);
1912 _FutureListener.STATE_CATCHERROR = _FutureListener.MASK_ERROR; 1916 _FutureListener.STATE_CATCHERROR = _FutureListener.MASK_ERROR;
1913 _FutureListener.STATE_CATCHERROR_TEST = dart.notNull(_FutureListener.MASK_ERRO R) | dart.notNull(_FutureListener.MASK_TEST_ERROR); 1917 _FutureListener.STATE_CATCHERROR_TEST = dart.notNull(_FutureListener.MASK_ERRO R) | dart.notNull(_FutureListener.MASK_TEST_ERROR);
1914 _FutureListener.STATE_WHENCOMPLETE = _FutureListener.MASK_WHENCOMPLETE; 1918 _FutureListener.STATE_WHENCOMPLETE = _FutureListener.MASK_WHENCOMPLETE;
1915 let _INCOMPLETE = Symbol('_INCOMPLETE'); 1919 let _INCOMPLETE = Symbol('_INCOMPLETE');
1916 let _resultOrListeners = Symbol('_resultOrListeners'); 1920 let _resultOrListeners = Symbol('_resultOrListeners');
1917 let _asyncComplete = Symbol('_asyncComplete');
1918 let _asyncCompleteError = Symbol('_asyncCompleteError');
1919 let _isChained = Symbol('_isChained'); 1921 let _isChained = Symbol('_isChained');
1920 let _CHAINED = Symbol('_CHAINED'); 1922 let _CHAINED = Symbol('_CHAINED');
1921 let _isComplete = Symbol('_isComplete'); 1923 let _isComplete = Symbol('_isComplete');
1922 let _VALUE = Symbol('_VALUE'); 1924 let _VALUE = Symbol('_VALUE');
1923 let _hasValue = Symbol('_hasValue'); 1925 let _hasValue = Symbol('_hasValue');
1924 let _hasError = Symbol('_hasError'); 1926 let _hasError = Symbol('_hasError');
1925 let _ERROR = Symbol('_ERROR'); 1927 let _ERROR = Symbol('_ERROR');
1926 let _markPendingCompletion = Symbol('_markPendingCompletion'); 1928 let _markPendingCompletion = Symbol('_markPendingCompletion');
1927 let _PENDING_COMPLETE = Symbol('_PENDING_COMPLETE'); 1929 let _PENDING_COMPLETE = Symbol('_PENDING_COMPLETE');
1928 let _value = Symbol('_value'); 1930 let _value = Symbol('_value');
1929 let _error = Symbol('_error'); 1931 let _error = Symbol('_error');
1930 let _setValue = Symbol('_setValue'); 1932 let _setValue = Symbol('_setValue');
1931 let _setErrorObject = Symbol('_setErrorObject'); 1933 let _setErrorObject = Symbol('_setErrorObject');
1932 let _setError = Symbol('_setError'); 1934 let _setError = Symbol('_setError');
1933 let _propagateToListeners = Symbol('_propagateToListeners'); 1935 let _propagateToListeners = Symbol('_propagateToListeners');
1934 let _removeListeners = Symbol('_removeListeners'); 1936 let _removeListeners = Symbol('_removeListeners');
1935 let _chainForeignFuture = Symbol('_chainForeignFuture'); 1937 let _chainForeignFuture = Symbol('_chainForeignFuture');
1936 let _chainCoreFuture = Symbol('_chainCoreFuture'); 1938 let _chainCoreFuture = Symbol('_chainCoreFuture');
1937 let _completeWithValue = Symbol('_completeWithValue'); 1939 let _enter = Symbol('_enter');
1940 let _leave = Symbol('_leave');
1938 let _Future$ = dart.generic(function(T) { 1941 let _Future$ = dart.generic(function(T) {
1939 class _Future extends core.Object { 1942 class _Future extends core.Object {
1940 _Future() { 1943 _Future() {
1941 this[_zone] = Zone.current; 1944 this[_zone] = Zone.current;
1942 this[_state] = _Future[_INCOMPLETE]; 1945 this[_state] = _Future[_INCOMPLETE];
1943 this[_resultOrListeners] = null; 1946 this[_resultOrListeners] = null;
1944 } 1947 }
1945 immediate(value) { 1948 immediate(value) {
1946 this[_zone] = Zone.current; 1949 this[_zone] = Zone.current;
1947 this[_state] = _Future[_INCOMPLETE]; 1950 this[_state] = _Future[_INCOMPLETE];
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 current = next; 2066 current = next;
2064 } 2067 }
2065 return prev; 2068 return prev;
2066 } 2069 }
2067 static [_chainForeignFuture](source, target) { 2070 static [_chainForeignFuture](source, target) {
2068 dart.assert(!dart.notNull(target[_isComplete])); 2071 dart.assert(!dart.notNull(target[_isComplete]));
2069 dart.assert(!dart.is(source, _Future)); 2072 dart.assert(!dart.is(source, _Future));
2070 target[_isChained] = true; 2073 target[_isChained] = true;
2071 source.then(((value) => { 2074 source.then(((value) => {
2072 dart.assert(target[_isChained]); 2075 dart.assert(target[_isChained]);
2073 target._completeWithValue(value); 2076 target[_completeWithValue](value);
2074 }).bind(this), {onError: ((error, stackTrace) => { 2077 }).bind(this), {onError: ((error, stackTrace) => {
2075 if (stackTrace === void 0) 2078 if (stackTrace === void 0)
2076 stackTrace = null; 2079 stackTrace = null;
2077 dart.assert(target[_isChained]); 2080 dart.assert(target[_isChained]);
2078 target._completeError(error, dart.as(stackTrace, core.StackTrace)); 2081 target[_completeError](error, dart.as(stackTrace, core.StackTrace));
2079 }).bind(this)}); 2082 }).bind(this)});
2080 } 2083 }
2081 static [_chainCoreFuture](source, target) { 2084 static [_chainCoreFuture](source, target) {
2082 dart.assert(!dart.notNull(target[_isComplete])); 2085 dart.assert(!dart.notNull(target[_isComplete]));
2083 dart.assert(dart.is(source, _Future)); 2086 dart.assert(dart.is(source, _Future));
2084 target[_isChained] = true; 2087 target[_isChained] = true;
2085 let listener = new _FutureListener.chain(target); 2088 let listener = new _FutureListener.chain(target);
2086 if (source[_isComplete]) { 2089 if (source[_isComplete]) {
2087 _Future[_propagateToListeners](source, listener); 2090 _Future[_propagateToListeners](source, listener);
2088 } else { 2091 } else {
2089 source._addListener(listener); 2092 source[_addListener](listener);
2090 } 2093 }
2091 } 2094 }
2092 [_complete](value) { 2095 [_complete](value) {
2093 dart.assert(!dart.notNull(this[_isComplete])); 2096 dart.assert(!dart.notNull(this[_isComplete]));
2094 if (dart.is(value, Future)) { 2097 if (dart.is(value, Future)) {
2095 if (dart.is(value, _Future)) { 2098 if (dart.is(value, _Future)) {
2096 _Future[_chainCoreFuture](dart.as(value, _Future), this); 2099 _Future[_chainCoreFuture](dart.as(value, _Future), this);
2097 } else { 2100 } else {
2098 _Future[_chainForeignFuture](dart.as(value, Future), this); 2101 _Future[_chainForeignFuture](dart.as(value, Future), this);
2099 } 2102 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 let isPropagationAborted = false; 2179 let isPropagationAborted = false;
2177 if (dart.notNull(hasError) || dart.notNull(listener.handlesValue) || d art.notNull(listener.handlesComplete)) { 2180 if (dart.notNull(hasError) || dart.notNull(listener.handlesValue) || d art.notNull(listener.handlesComplete)) {
2178 let zone = listener[_zone]; 2181 let zone = listener[_zone];
2179 if (dart.notNull(hasError) && !dart.notNull(source[_zone].inSameErro rZone(zone))) { 2182 if (dart.notNull(hasError) && !dart.notNull(source[_zone].inSameErro rZone(zone))) {
2180 let asyncError = source[_error]; 2183 let asyncError = source[_error];
2181 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta ckTrace); 2184 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta ckTrace);
2182 return; 2185 return;
2183 } 2186 }
2184 let oldZone = null; 2187 let oldZone = null;
2185 if (!dart.notNull(core.identical(Zone.current, zone))) { 2188 if (!dart.notNull(core.identical(Zone.current, zone))) {
2186 oldZone = Zone._enter(zone); 2189 oldZone = Zone[_enter](zone);
2187 } 2190 }
2188 // Function handleValueCallback: () → bool 2191 // Function handleValueCallback: () → bool
2189 function handleValueCallback() { 2192 function handleValueCallback() {
2190 try { 2193 try {
2191 listenerValueOrError = zone.runUnary(listener[_onValue], sourceV alue); 2194 listenerValueOrError = zone.runUnary(listener[_onValue], sourceV alue);
2192 return true; 2195 return true;
2193 } catch (e) { 2196 } catch (e) {
2194 let s = dart.stackTrace(e); 2197 let s = dart.stackTrace(e);
2195 listenerValueOrError = new AsyncError(e, s); 2198 listenerValueOrError = new AsyncError(e, s);
2196 return false; 2199 return false;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
2273 if (listener.handlesValue) { 2276 if (listener.handlesValue) {
2274 listenerHasValue = handleValueCallback(); 2277 listenerHasValue = handleValueCallback();
2275 } 2278 }
2276 } else { 2279 } else {
2277 handleError(); 2280 handleError();
2278 } 2281 }
2279 if (listener.handlesComplete) { 2282 if (listener.handlesComplete) {
2280 handleWhenCompleteCallback(); 2283 handleWhenCompleteCallback();
2281 } 2284 }
2282 if (oldZone != null) 2285 if (oldZone != null)
2283 Zone._leave(oldZone); 2286 Zone[_leave](oldZone);
2284 if (isPropagationAborted) 2287 if (isPropagationAborted)
2285 return; 2288 return;
2286 if (dart.notNull(listenerHasValue) && !dart.notNull(core.identical(s ourceValue, listenerValueOrError)) && dart.notNull(dart.is(listenerValueOrError, Future))) { 2289 if (dart.notNull(listenerHasValue) && !dart.notNull(core.identical(s ourceValue, listenerValueOrError)) && dart.notNull(dart.is(listenerValueOrError, Future))) {
2287 let chainSource = dart.as(listenerValueOrError, Future); 2290 let chainSource = dart.as(listenerValueOrError, Future);
2288 let result = listener.result; 2291 let result = listener.result;
2289 if (dart.is(chainSource, _Future)) { 2292 if (dart.is(chainSource, _Future)) {
2290 if (chainSource[_isComplete]) { 2293 if (chainSource[_isComplete]) {
2291 result[_isChained] = true; 2294 result[_isChained] = true;
2292 source = chainSource; 2295 source = chainSource;
2293 listeners = new _FutureListener.chain(result); 2296 listeners = new _FutureListener.chain(result);
2294 continue; 2297 continue;
2295 } else { 2298 } else {
2296 _Future[_chainCoreFuture](chainSource, result); 2299 _Future[_chainCoreFuture](chainSource, result);
2297 } 2300 }
2298 } else { 2301 } else {
2299 _Future[_chainForeignFuture](chainSource, result); 2302 _Future[_chainForeignFuture](chainSource, result);
2300 } 2303 }
2301 return; 2304 return;
2302 } 2305 }
2303 } 2306 }
2304 let result = listener.result; 2307 let result = listener.result;
2305 listeners = result._removeListeners(); 2308 listeners = result[_removeListeners]();
2306 if (listenerHasValue) { 2309 if (listenerHasValue) {
2307 result._setValue(listenerValueOrError); 2310 result[_setValue](listenerValueOrError);
2308 } else { 2311 } else {
2309 let asyncError = dart.as(listenerValueOrError, AsyncError); 2312 let asyncError = dart.as(listenerValueOrError, AsyncError);
2310 result._setErrorObject(asyncError); 2313 result[_setErrorObject](asyncError);
2311 } 2314 }
2312 source = result; 2315 source = result;
2313 } 2316 }
2314 } 2317 }
2315 timeout(timeLimit, opts) { 2318 timeout(timeLimit, opts) {
2316 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; 2319 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null;
2317 if (this[_isComplete]) 2320 if (this[_isComplete])
2318 return new _Future.immediate(this); 2321 return new _Future.immediate(this);
2319 let result = new _Future(); 2322 let result = new _Future();
2320 let timer = null; 2323 let timer = null;
2321 if (onTimeout == null) { 2324 if (onTimeout == null) {
2322 timer = new Timer(timeLimit, (() => { 2325 timer = new Timer(timeLimit, (() => {
2323 result._completeError(new TimeoutException("Future not completed", t imeLimit)); 2326 result[_completeError](new TimeoutException("Future not completed", timeLimit));
2324 }).bind(this)); 2327 }).bind(this));
2325 } else { 2328 } else {
2326 let zone = Zone.current; 2329 let zone = Zone.current;
2327 onTimeout = zone.registerCallback(onTimeout); 2330 onTimeout = zone.registerCallback(onTimeout);
2328 timer = new Timer(timeLimit, (() => { 2331 timer = new Timer(timeLimit, (() => {
2329 try { 2332 try {
2330 result._complete(zone.run(onTimeout)); 2333 result[_complete](zone.run(onTimeout));
2331 } catch (e) { 2334 } catch (e) {
2332 let s = dart.stackTrace(e); 2335 let s = dart.stackTrace(e);
2333 result._completeError(e, s); 2336 result[_completeError](e, s);
2334 } 2337 }
2335 2338
2336 }).bind(this)); 2339 }).bind(this));
2337 } 2340 }
2338 this.then(((v) => { 2341 this.then(((v) => {
2339 if (timer.isActive) { 2342 if (timer.isActive) {
2340 timer.cancel(); 2343 timer.cancel();
2341 result._completeWithValue(v); 2344 result[_completeWithValue](v);
2342 } 2345 }
2343 }).bind(this), {onError: ((e, s) => { 2346 }).bind(this), {onError: ((e, s) => {
2344 if (timer.isActive) { 2347 if (timer.isActive) {
2345 timer.cancel(); 2348 timer.cancel();
2346 result._completeError(e, dart.as(s, core.StackTrace)); 2349 result[_completeError](e, dart.as(s, core.StackTrace));
2347 } 2350 }
2348 }).bind(this)}); 2351 }).bind(this)});
2349 return result; 2352 return result;
2350 } 2353 }
2351 } 2354 }
2352 _Future[dart.implements] = () => [Future$(T)]; 2355 _Future[dart.implements] = () => [Future$(T)];
2353 dart.defineNamedConstructor(_Future, 'immediate'); 2356 dart.defineNamedConstructor(_Future, 'immediate');
2354 dart.defineNamedConstructor(_Future, 'immediateError'); 2357 dart.defineNamedConstructor(_Future, 'immediateError');
2355 _Future._INCOMPLETE = 0; 2358 _Future._INCOMPLETE = 0;
2356 _Future._PENDING_COMPLETE = 1; 2359 _Future._PENDING_COMPLETE = 1;
(...skipping 17 matching lines...) Expand all
2374 function _asyncRunCallbackLoop() { 2377 function _asyncRunCallbackLoop() {
2375 while (exports._nextCallback != null) { 2378 while (exports._nextCallback != null) {
2376 exports._lastPriorityCallback = null; 2379 exports._lastPriorityCallback = null;
2377 let entry = exports._nextCallback; 2380 let entry = exports._nextCallback;
2378 exports._nextCallback = entry.next; 2381 exports._nextCallback = entry.next;
2379 if (exports._nextCallback == null) 2382 if (exports._nextCallback == null)
2380 exports._lastCallback = null; 2383 exports._lastCallback = null;
2381 entry.callback(); 2384 entry.callback();
2382 } 2385 }
2383 } 2386 }
2387 let _scheduleImmediate = Symbol('_scheduleImmediate');
2384 // Function _asyncRunCallback: () → void 2388 // Function _asyncRunCallback: () → void
2385 function _asyncRunCallback() { 2389 function _asyncRunCallback() {
2386 exports._isInCallbackLoop = true; 2390 exports._isInCallbackLoop = true;
2387 try { 2391 try {
2388 _asyncRunCallbackLoop(); 2392 _asyncRunCallbackLoop();
2389 } finally { 2393 } finally {
2390 exports._lastPriorityCallback = null; 2394 exports._lastPriorityCallback = null;
2391 exports._isInCallbackLoop = false; 2395 exports._isInCallbackLoop = false;
2392 if (exports._nextCallback != null) 2396 if (exports._nextCallback != null)
2393 _AsyncRun._scheduleImmediate(_asyncRunCallback); 2397 _AsyncRun[_scheduleImmediate](_asyncRunCallback);
2394 } 2398 }
2395 } 2399 }
2396 // Function _scheduleAsyncCallback: (dynamic) → void 2400 // Function _scheduleAsyncCallback: (dynamic) → void
2397 function _scheduleAsyncCallback(callback) { 2401 function _scheduleAsyncCallback(callback) {
2398 if (exports._nextCallback == null) { 2402 if (exports._nextCallback == null) {
2399 exports._nextCallback = exports._lastCallback = new _AsyncCallbackEntry(da rt.as(callback, _AsyncCallback)); 2403 exports._nextCallback = exports._lastCallback = new _AsyncCallbackEntry(da rt.as(callback, _AsyncCallback));
2400 if (!dart.notNull(exports._isInCallbackLoop)) { 2404 if (!dart.notNull(exports._isInCallbackLoop)) {
2401 _AsyncRun._scheduleImmediate(_asyncRunCallback); 2405 _AsyncRun[_scheduleImmediate](_asyncRunCallback);
2402 } 2406 }
2403 } else { 2407 } else {
2404 let newEntry = new _AsyncCallbackEntry(dart.as(callback, _AsyncCallback)); 2408 let newEntry = new _AsyncCallbackEntry(dart.as(callback, _AsyncCallback));
2405 exports._lastCallback.next = newEntry; 2409 exports._lastCallback.next = newEntry;
2406 exports._lastCallback = newEntry; 2410 exports._lastCallback = newEntry;
2407 } 2411 }
2408 } 2412 }
2409 // Function _schedulePriorityAsyncCallback: (dynamic) → void 2413 // Function _schedulePriorityAsyncCallback: (dynamic) → void
2410 function _schedulePriorityAsyncCallback(callback) { 2414 function _schedulePriorityAsyncCallback(callback) {
2411 let entry = new _AsyncCallbackEntry(dart.as(callback, _AsyncCallback)); 2415 let entry = new _AsyncCallbackEntry(dart.as(callback, _AsyncCallback));
(...skipping 13 matching lines...) Expand all
2425 } 2429 }
2426 } 2430 }
2427 // Function scheduleMicrotask: (() → void) → void 2431 // Function scheduleMicrotask: (() → void) → void
2428 function scheduleMicrotask(callback) { 2432 function scheduleMicrotask(callback) {
2429 if (core.identical(_ROOT_ZONE, Zone.current)) { 2433 if (core.identical(_ROOT_ZONE, Zone.current)) {
2430 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback); 2434 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback);
2431 return; 2435 return;
2432 } 2436 }
2433 Zone.current.scheduleMicrotask(Zone.current.bindCallback(callback, {runGuard ed: true})); 2437 Zone.current.scheduleMicrotask(Zone.current.bindCallback(callback, {runGuard ed: true}));
2434 } 2438 }
2435 let _scheduleImmediate = Symbol('_scheduleImmediate');
2436 let _initializeScheduleImmediate = Symbol('_initializeScheduleImmediate'); 2439 let _initializeScheduleImmediate = Symbol('_initializeScheduleImmediate');
2437 let _scheduleImmediateJsOverride = Symbol('_scheduleImmediateJsOverride'); 2440 let _scheduleImmediateJsOverride = Symbol('_scheduleImmediateJsOverride');
2438 let _scheduleImmediateWithSetImmediate = Symbol('_scheduleImmediateWithSetImme diate'); 2441 let _scheduleImmediateWithSetImmediate = Symbol('_scheduleImmediateWithSetImme diate');
2439 let _scheduleImmediateWithTimer = Symbol('_scheduleImmediateWithTimer'); 2442 let _scheduleImmediateWithTimer = Symbol('_scheduleImmediateWithTimer');
2443 let _createTimer = Symbol('_createTimer');
2440 class _AsyncRun extends core.Object { 2444 class _AsyncRun extends core.Object {
2441 static [_scheduleImmediate](callback) { 2445 static [_scheduleImmediate](callback) {
2442 dart.dinvokef(_AsyncRun.scheduleImmediateClosure, callback); 2446 dart.dinvokef(_AsyncRun.scheduleImmediateClosure, callback);
2443 } 2447 }
2444 static [_initializeScheduleImmediate]() { 2448 static [_initializeScheduleImmediate]() {
2445 _js_helper.requiresPreamble(); 2449 _js_helper.requiresPreamble();
2446 if (self.scheduleImmediate != null) { 2450 if (self.scheduleImmediate != null) {
2447 return _AsyncRun[_scheduleImmediateJsOverride]; 2451 return _AsyncRun[_scheduleImmediateJsOverride];
2448 } 2452 }
2449 if (dart.notNull(self.MutationObserver != null) && dart.notNull(self.docum ent != null)) { 2453 if (dart.notNull(self.MutationObserver != null) && dart.notNull(self.docum ent != null)) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 // Function internalCallback: () → dynamic 2489 // Function internalCallback: () → dynamic
2486 function internalCallback() { 2490 function internalCallback() {
2487 _isolate_helper.leaveJsAsync(); 2491 _isolate_helper.leaveJsAsync();
2488 callback(); 2492 callback();
2489 } 2493 }
2490 ; 2494 ;
2491 _isolate_helper.enterJsAsync(); 2495 _isolate_helper.enterJsAsync();
2492 self.setImmediate(_js_helper.convertDartClosureToJS(internalCallback, 0)); 2496 self.setImmediate(_js_helper.convertDartClosureToJS(internalCallback, 0));
2493 } 2497 }
2494 static [_scheduleImmediateWithTimer](callback) { 2498 static [_scheduleImmediateWithTimer](callback) {
2495 Timer._createTimer(core.Duration.ZERO, callback); 2499 Timer[_createTimer](core.Duration.ZERO, callback);
2496 } 2500 }
2497 } 2501 }
2498 dart.defineLazyProperties(_AsyncRun, { 2502 dart.defineLazyProperties(_AsyncRun, {
2499 get scheduleImmediateClosure() { 2503 get scheduleImmediateClosure() {
2500 return _AsyncRun[_initializeScheduleImmediate](); 2504 return _AsyncRun[_initializeScheduleImmediate]();
2501 } 2505 }
2502 }); 2506 });
2503 let StreamSubscription$ = dart.generic(function(T) { 2507 let StreamSubscription$ = dart.generic(function(T) {
2504 class StreamSubscription extends core.Object { 2508 class StreamSubscription extends core.Object {
2505 } 2509 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 let _StreamControllerLifecycle = _StreamControllerLifecycle$(dart.dynamic); 2636 let _StreamControllerLifecycle = _StreamControllerLifecycle$(dart.dynamic);
2633 let _varData = Symbol('_varData'); 2637 let _varData = Symbol('_varData');
2634 let _STATE_SUBSCRIBED = Symbol('_STATE_SUBSCRIBED'); 2638 let _STATE_SUBSCRIBED = Symbol('_STATE_SUBSCRIBED');
2635 let _isInitialState = Symbol('_isInitialState'); 2639 let _isInitialState = Symbol('_isInitialState');
2636 let _STATE_SUBSCRIPTION_MASK = Symbol('_STATE_SUBSCRIPTION_MASK'); 2640 let _STATE_SUBSCRIPTION_MASK = Symbol('_STATE_SUBSCRIPTION_MASK');
2637 let _subscription = Symbol('_subscription'); 2641 let _subscription = Symbol('_subscription');
2638 let _pendingEvents = Symbol('_pendingEvents'); 2642 let _pendingEvents = Symbol('_pendingEvents');
2639 let _ensurePendingEvents = Symbol('_ensurePendingEvents'); 2643 let _ensurePendingEvents = Symbol('_ensurePendingEvents');
2640 let _badEventState = Symbol('_badEventState'); 2644 let _badEventState = Symbol('_badEventState');
2641 let _nullFuture = Symbol('_nullFuture'); 2645 let _nullFuture = Symbol('_nullFuture');
2642 let _closeUnchecked = Symbol('_closeUnchecked');
2643 let _StreamController$ = dart.generic(function(T) { 2646 let _StreamController$ = dart.generic(function(T) {
2644 class _StreamController extends core.Object { 2647 class _StreamController extends core.Object {
2645 _StreamController() { 2648 _StreamController() {
2646 this[_varData] = null; 2649 this[_varData] = null;
2647 this[_state] = _StreamController[_STATE_INITIAL]; 2650 this[_state] = _StreamController[_STATE_INITIAL];
2648 this[_doneFuture] = null; 2651 this[_doneFuture] = null;
2649 } 2652 }
2650 get stream() { 2653 get stream() {
2651 return dart.as(new _ControllerStream(this), Stream$(T)); 2654 return dart.as(new _ControllerStream(this), Stream$(T));
2652 } 2655 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 let subscription = new _ControllerSubscription(this, onData, onError, on Done, cancelOnError); 2795 let subscription = new _ControllerSubscription(this, onData, onError, on Done, cancelOnError);
2793 let pendingEvents = this[_pendingEvents]; 2796 let pendingEvents = this[_pendingEvents];
2794 this[_state] = _StreamController[_STATE_SUBSCRIBED]; 2797 this[_state] = _StreamController[_STATE_SUBSCRIBED];
2795 if (this[_isAddingStream]) { 2798 if (this[_isAddingStream]) {
2796 let addState = dart.as(this[_varData], _StreamControllerAddStreamState ); 2799 let addState = dart.as(this[_varData], _StreamControllerAddStreamState );
2797 addState.varData = subscription; 2800 addState.varData = subscription;
2798 addState.resume(); 2801 addState.resume();
2799 } else { 2802 } else {
2800 this[_varData] = subscription; 2803 this[_varData] = subscription;
2801 } 2804 }
2802 subscription._setPendingEvents(pendingEvents); 2805 subscription[_setPendingEvents](pendingEvents);
2803 subscription._guardCallback((() => { 2806 subscription[_guardCallback]((() => {
2804 _runGuarded(this[_onListen]); 2807 _runGuarded(this[_onListen]);
2805 }).bind(this)); 2808 }).bind(this));
2806 return dart.as(subscription, StreamSubscription$(T)); 2809 return dart.as(subscription, StreamSubscription$(T));
2807 } 2810 }
2808 [_recordCancel](subscription) { 2811 [_recordCancel](subscription) {
2809 let result = null; 2812 let result = null;
2810 if (this[_isAddingStream]) { 2813 if (this[_isAddingStream]) {
2811 let addState = dart.as(this[_varData], _StreamControllerAddStreamState ); 2814 let addState = dart.as(this[_varData], _StreamControllerAddStreamState );
2812 result = addState.cancel(); 2815 result = addState.cancel();
2813 } 2816 }
2814 this[_varData] = null; 2817 this[_varData] = null;
2815 this[_state] = dart.notNull(this[_state]) & ~(dart.notNull(_StreamContro ller[_STATE_SUBSCRIBED]) | dart.notNull(_StreamController[_STATE_ADDSTREAM])) | dart.notNull(_StreamController[_STATE_CANCELED]); 2818 this[_state] = dart.notNull(this[_state]) & ~(dart.notNull(_StreamContro ller[_STATE_SUBSCRIBED]) | dart.notNull(_StreamController[_STATE_ADDSTREAM])) | dart.notNull(_StreamController[_STATE_CANCELED]);
2816 if (this[_onCancel] != null) { 2819 if (this[_onCancel] != null) {
2817 if (result == null) { 2820 if (result == null) {
2818 try { 2821 try {
2819 result = dart.as(this[_onCancel](), Future); 2822 result = dart.as(this[_onCancel](), Future);
2820 } catch (e) { 2823 } catch (e) {
2821 let s = dart.stackTrace(e); 2824 let s = dart.stackTrace(e);
2822 result = ((_$) => { 2825 result = ((_$) => {
2823 _$._asyncCompleteError(e, s); 2826 _$[_asyncCompleteError](e, s);
2824 return _$; 2827 return _$;
2825 }).bind(this)(new _Future()); 2828 }).bind(this)(new _Future());
2826 } 2829 }
2827 2830
2828 } else { 2831 } else {
2829 result = result.whenComplete(this[_onCancel]); 2832 result = result.whenComplete(this[_onCancel]);
2830 } 2833 }
2831 } 2834 }
2832 // Function complete: () → void 2835 // Function complete: () → void
2833 function complete() { 2836 function complete() {
2834 if (dart.notNull(this[_doneFuture] != null) && dart.notNull(this[_done Future][_mayComplete])) { 2837 if (dart.notNull(this[_doneFuture] != null) && dart.notNull(this[_done Future][_mayComplete])) {
2835 this[_doneFuture]._asyncComplete(null); 2838 this[_doneFuture][_asyncComplete](null);
2836 } 2839 }
2837 } 2840 }
2838 if (result != null) { 2841 if (result != null) {
2839 result = result.whenComplete(complete); 2842 result = result.whenComplete(complete);
2840 } else { 2843 } else {
2841 complete(); 2844 complete();
2842 } 2845 }
2843 return result; 2846 return result;
2844 } 2847 }
2845 [_recordPause](subscription) { 2848 [_recordPause](subscription) {
(...skipping 17 matching lines...) Expand all
2863 _StreamController._STATE_CANCELED = 2; 2866 _StreamController._STATE_CANCELED = 2;
2864 _StreamController._STATE_SUBSCRIPTION_MASK = 3; 2867 _StreamController._STATE_SUBSCRIPTION_MASK = 3;
2865 _StreamController._STATE_CLOSED = 4; 2868 _StreamController._STATE_CLOSED = 4;
2866 _StreamController._STATE_ADDSTREAM = 8; 2869 _StreamController._STATE_ADDSTREAM = 8;
2867 return _StreamController; 2870 return _StreamController;
2868 }); 2871 });
2869 let _StreamController = _StreamController$(dart.dynamic); 2872 let _StreamController = _StreamController$(dart.dynamic);
2870 let _SyncStreamControllerDispatch$ = dart.generic(function(T) { 2873 let _SyncStreamControllerDispatch$ = dart.generic(function(T) {
2871 class _SyncStreamControllerDispatch extends core.Object { 2874 class _SyncStreamControllerDispatch extends core.Object {
2872 [_sendData](data) { 2875 [_sendData](data) {
2873 this[_subscription]._add(data); 2876 this[_subscription][_add](data);
2874 } 2877 }
2875 [_sendError](error, stackTrace) { 2878 [_sendError](error, stackTrace) {
2876 this[_subscription]._addError(error, stackTrace); 2879 this[_subscription][_addError](error, stackTrace);
2877 } 2880 }
2878 [_sendDone]() { 2881 [_sendDone]() {
2879 this[_subscription]._close(); 2882 this[_subscription][_close]();
2880 } 2883 }
2881 } 2884 }
2882 _SyncStreamControllerDispatch[dart.implements] = () => [_StreamController$(T )]; 2885 _SyncStreamControllerDispatch[dart.implements] = () => [_StreamController$(T )];
2883 return _SyncStreamControllerDispatch; 2886 return _SyncStreamControllerDispatch;
2884 }); 2887 });
2885 let _SyncStreamControllerDispatch = _SyncStreamControllerDispatch$(dart.dynami c); 2888 let _SyncStreamControllerDispatch = _SyncStreamControllerDispatch$(dart.dynami c);
2886 let _AsyncStreamControllerDispatch$ = dart.generic(function(T) { 2889 let _AsyncStreamControllerDispatch$ = dart.generic(function(T) {
2887 class _AsyncStreamControllerDispatch extends core.Object { 2890 class _AsyncStreamControllerDispatch extends core.Object {
2888 [_sendData](data) { 2891 [_sendData](data) {
2889 this[_subscription]._addPending(new _DelayedData(data)); 2892 this[_subscription][_addPending](new _DelayedData(data));
2890 } 2893 }
2891 [_sendError](error, stackTrace) { 2894 [_sendError](error, stackTrace) {
2892 this[_subscription]._addPending(new _DelayedError(error, stackTrace)); 2895 this[_subscription][_addPending](new _DelayedError(error, stackTrace));
2893 } 2896 }
2894 [_sendDone]() { 2897 [_sendDone]() {
2895 this[_subscription]._addPending(new _DelayedDone()); 2898 this[_subscription][_addPending](new _DelayedDone());
2896 } 2899 }
2897 } 2900 }
2898 _AsyncStreamControllerDispatch[dart.implements] = () => [_StreamController$( T)]; 2901 _AsyncStreamControllerDispatch[dart.implements] = () => [_StreamController$( T)];
2899 return _AsyncStreamControllerDispatch; 2902 return _AsyncStreamControllerDispatch;
2900 }); 2903 });
2901 let _AsyncStreamControllerDispatch = _AsyncStreamControllerDispatch$(dart.dyna mic); 2904 let _AsyncStreamControllerDispatch = _AsyncStreamControllerDispatch$(dart.dyna mic);
2902 let _AsyncStreamController$ = dart.generic(function(T) { 2905 let _AsyncStreamController$ = dart.generic(function(T) {
2903 class _AsyncStreamController extends dart.mixin(_StreamController$(T), _Asyn cStreamControllerDispatch$(T)) { 2906 class _AsyncStreamController extends dart.mixin(_StreamController$(T), _Asyn cStreamControllerDispatch$(T)) {
2904 _AsyncStreamController(onListen$, onPause$, onResume$, onCancel$) { 2907 _AsyncStreamController(onListen$, onPause$, onResume$, onCancel$) {
2905 this[_onListen] = onListen$; 2908 this[_onListen] = onListen$;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 }); 2991 });
2989 let _StreamSinkWrapper = _StreamSinkWrapper$(dart.dynamic); 2992 let _StreamSinkWrapper = _StreamSinkWrapper$(dart.dynamic);
2990 let _AddStreamState$ = dart.generic(function(T) { 2993 let _AddStreamState$ = dart.generic(function(T) {
2991 class _AddStreamState extends core.Object { 2994 class _AddStreamState extends core.Object {
2992 _AddStreamState(controller, source, cancelOnError) { 2995 _AddStreamState(controller, source, cancelOnError) {
2993 this.addStreamFuture = new _Future(); 2996 this.addStreamFuture = new _Future();
2994 this.addSubscription = source.listen(controller[_add], {onError: dart.as (cancelOnError ? _AddStreamState.makeErrorHandler(controller) : controller[_addE rror], core.Function), onDone: controller[_close], cancelOnError: cancelOnError} ); 2997 this.addSubscription = source.listen(controller[_add], {onError: dart.as (cancelOnError ? _AddStreamState.makeErrorHandler(controller) : controller[_addE rror], core.Function), onDone: controller[_close], cancelOnError: cancelOnError} );
2995 } 2998 }
2996 static makeErrorHandler(controller) { 2999 static makeErrorHandler(controller) {
2997 return ((e, s) => { 3000 return ((e, s) => {
2998 controller._addError(e, s); 3001 controller[_addError](e, s);
2999 controller._close(); 3002 controller[_close]();
3000 }).bind(this); 3003 }).bind(this);
3001 } 3004 }
3002 pause() { 3005 pause() {
3003 this.addSubscription.pause(); 3006 this.addSubscription.pause();
3004 } 3007 }
3005 resume() { 3008 resume() {
3006 this.addSubscription.resume(); 3009 this.addSubscription.resume();
3007 } 3010 }
3008 cancel() { 3011 cancel() {
3009 let cancel = this.addSubscription.cancel(); 3012 let cancel = this.addSubscription.cancel();
3010 if (cancel == null) { 3013 if (cancel == null) {
3011 this.addStreamFuture._asyncComplete(null); 3014 this.addStreamFuture[_asyncComplete](null);
3012 return null; 3015 return null;
3013 } 3016 }
3014 return cancel.whenComplete((() => { 3017 return cancel.whenComplete((() => {
3015 this.addStreamFuture._asyncComplete(null); 3018 this.addStreamFuture[_asyncComplete](null);
3016 }).bind(this)); 3019 }).bind(this));
3017 } 3020 }
3018 complete() { 3021 complete() {
3019 this.addStreamFuture._asyncComplete(null); 3022 this.addStreamFuture[_asyncComplete](null);
3020 } 3023 }
3021 } 3024 }
3022 return _AddStreamState; 3025 return _AddStreamState;
3023 }); 3026 });
3024 let _AddStreamState = _AddStreamState$(dart.dynamic); 3027 let _AddStreamState = _AddStreamState$(dart.dynamic);
3025 let _StreamControllerAddStreamState$ = dart.generic(function(T) { 3028 let _StreamControllerAddStreamState$ = dart.generic(function(T) {
3026 class _StreamControllerAddStreamState extends _AddStreamState$(T) { 3029 class _StreamControllerAddStreamState extends _AddStreamState$(T) {
3027 _StreamControllerAddStreamState(controller, varData, source, cancelOnError ) { 3030 _StreamControllerAddStreamState(controller, varData, source, cancelOnError ) {
3028 this.varData = varData; 3031 this.varData = varData;
3029 super._AddStreamState(dart.as(controller, _EventSink$(T)), source, cance lOnError); 3032 super._AddStreamState(dart.as(controller, _EventSink$(T)), source, cance lOnError);
(...skipping 23 matching lines...) Expand all
3053 _GeneratedStreamImpl(pending$) { 3056 _GeneratedStreamImpl(pending$) {
3054 this[_pending] = pending$; 3057 this[_pending] = pending$;
3055 this[_isUsed] = false; 3058 this[_isUsed] = false;
3056 super._StreamImpl(); 3059 super._StreamImpl();
3057 } 3060 }
3058 [_createSubscription](onData, onError, onDone, cancelOnError) { 3061 [_createSubscription](onData, onError, onDone, cancelOnError) {
3059 if (this[_isUsed]) 3062 if (this[_isUsed])
3060 throw new core.StateError("Stream has already been listened to."); 3063 throw new core.StateError("Stream has already been listened to.");
3061 this[_isUsed] = true; 3064 this[_isUsed] = true;
3062 return ((_$) => { 3065 return ((_$) => {
3063 _$._setPendingEvents(this[_pending]()); 3066 _$[_setPendingEvents](this[_pending]());
3064 return _$; 3067 return _$;
3065 }).bind(this)(new _BufferingStreamSubscription(onData, onError, onDone, cancelOnError)); 3068 }).bind(this)(new _BufferingStreamSubscription(onData, onError, onDone, cancelOnError));
3066 } 3069 }
3067 } 3070 }
3068 return _GeneratedStreamImpl; 3071 return _GeneratedStreamImpl;
3069 }); 3072 });
3070 let _GeneratedStreamImpl = _GeneratedStreamImpl$(dart.dynamic); 3073 let _GeneratedStreamImpl = _GeneratedStreamImpl$(dart.dynamic);
3071 let _iterator = Symbol('_iterator'); 3074 let _iterator = Symbol('_iterator');
3072 let _STATE_UNSCHEDULED = Symbol('_STATE_UNSCHEDULED'); 3075 let _STATE_UNSCHEDULED = Symbol('_STATE_UNSCHEDULED');
3073 let _STATE_SCHEDULED = Symbol('_STATE_SCHEDULED'); 3076 let _STATE_SCHEDULED = Symbol('_STATE_SCHEDULED');
(...skipping 30 matching lines...) Expand all
3104 if (this.isScheduled) 3107 if (this.isScheduled)
3105 this[_state] = _PendingEvents[_STATE_CANCELED]; 3108 this[_state] = _PendingEvents[_STATE_CANCELED];
3106 } 3109 }
3107 } 3110 }
3108 _PendingEvents._STATE_UNSCHEDULED = 0; 3111 _PendingEvents._STATE_UNSCHEDULED = 0;
3109 _PendingEvents._STATE_SCHEDULED = 1; 3112 _PendingEvents._STATE_SCHEDULED = 1;
3110 _PendingEvents._STATE_CANCELED = 3; 3113 _PendingEvents._STATE_CANCELED = 3;
3111 let _IterablePendingEvents$ = dart.generic(function(T) { 3114 let _IterablePendingEvents$ = dart.generic(function(T) {
3112 class _IterablePendingEvents extends _PendingEvents { 3115 class _IterablePendingEvents extends _PendingEvents {
3113 _IterablePendingEvents(data) { 3116 _IterablePendingEvents(data) {
3114 this[_iterator] = data.iterator; 3117 this[_iterator] = data[core.$iterator];
3115 super._PendingEvents(); 3118 super._PendingEvents();
3116 } 3119 }
3117 get isEmpty() { 3120 get isEmpty() {
3118 return this[_iterator] == null; 3121 return this[_iterator] == null;
3119 } 3122 }
3120 handleNext(dispatch) { 3123 handleNext(dispatch) {
3121 if (this[_iterator] == null) { 3124 if (this[_iterator] == null) {
3122 throw new core.StateError("No events pending."); 3125 throw new core.StateError("No events pending.");
3123 } 3126 }
3124 let isDone = null; 3127 let isDone = null;
3125 try { 3128 try {
3126 isDone = !dart.notNull(this[_iterator].moveNext()); 3129 isDone = !dart.notNull(this[_iterator].moveNext());
3127 } catch (e) { 3130 } catch (e) {
3128 let s = dart.stackTrace(e); 3131 let s = dart.stackTrace(e);
3129 this[_iterator] = null; 3132 this[_iterator] = null;
3130 dispatch._sendError(e, s); 3133 dispatch[_sendError](e, s);
3131 return; 3134 return;
3132 } 3135 }
3133 3136
3134 if (!dart.notNull(isDone)) { 3137 if (!dart.notNull(isDone)) {
3135 dispatch._sendData(this[_iterator].current); 3138 dispatch[_sendData](this[_iterator].current);
3136 } else { 3139 } else {
3137 this[_iterator] = null; 3140 this[_iterator] = null;
3138 dispatch._sendDone(); 3141 dispatch[_sendDone]();
3139 } 3142 }
3140 } 3143 }
3141 clear() { 3144 clear() {
3142 if (this.isScheduled) 3145 if (this.isScheduled)
3143 this.cancelSchedule(); 3146 this.cancelSchedule();
3144 this[_iterator] = null; 3147 this[_iterator] = null;
3145 } 3148 }
3146 } 3149 }
3147 return _IterablePendingEvents; 3150 return _IterablePendingEvents;
3148 }); 3151 });
(...skipping 15 matching lines...) Expand all
3164 this.next = null; 3167 this.next = null;
3165 } 3168 }
3166 } 3169 }
3167 let _DelayedData$ = dart.generic(function(T) { 3170 let _DelayedData$ = dart.generic(function(T) {
3168 class _DelayedData extends _DelayedEvent { 3171 class _DelayedData extends _DelayedEvent {
3169 _DelayedData(value) { 3172 _DelayedData(value) {
3170 this.value = value; 3173 this.value = value;
3171 super._DelayedEvent(); 3174 super._DelayedEvent();
3172 } 3175 }
3173 perform(dispatch) { 3176 perform(dispatch) {
3174 dispatch._sendData(this.value); 3177 dispatch[_sendData](this.value);
3175 } 3178 }
3176 } 3179 }
3177 return _DelayedData; 3180 return _DelayedData;
3178 }); 3181 });
3179 let _DelayedData = _DelayedData$(dart.dynamic); 3182 let _DelayedData = _DelayedData$(dart.dynamic);
3180 class _DelayedError extends _DelayedEvent { 3183 class _DelayedError extends _DelayedEvent {
3181 _DelayedError(error, stackTrace) { 3184 _DelayedError(error, stackTrace) {
3182 this.error = error; 3185 this.error = error;
3183 this.stackTrace = stackTrace; 3186 this.stackTrace = stackTrace;
3184 super._DelayedEvent(); 3187 super._DelayedEvent();
3185 } 3188 }
3186 perform(dispatch) { 3189 perform(dispatch) {
3187 dispatch._sendError(this.error, this.stackTrace); 3190 dispatch[_sendError](this.error, this.stackTrace);
3188 } 3191 }
3189 } 3192 }
3190 class _DelayedDone extends core.Object { 3193 class _DelayedDone extends core.Object {
3191 _DelayedDone() { 3194 _DelayedDone() {
3192 } 3195 }
3193 perform(dispatch) { 3196 perform(dispatch) {
3194 dispatch._sendDone(); 3197 dispatch[_sendDone]();
3195 } 3198 }
3196 get next() { 3199 get next() {
3197 return null; 3200 return null;
3198 } 3201 }
3199 set next(_) { 3202 set next(_) {
3200 throw new core.StateError("No events after a done."); 3203 throw new core.StateError("No events after a done.");
3201 } 3204 }
3202 } 3205 }
3203 _DelayedDone[dart.implements] = () => [_DelayedEvent]; 3206 _DelayedDone[dart.implements] = () => [_DelayedEvent];
3204 class _StreamImplEvents extends _PendingEvents { 3207 class _StreamImplEvents extends _PendingEvents {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
3302 } 3305 }
3303 } 3306 }
3304 cancel() { 3307 cancel() {
3305 return null; 3308 return null;
3306 } 3309 }
3307 asFuture(futureValue) { 3310 asFuture(futureValue) {
3308 if (futureValue === void 0) 3311 if (futureValue === void 0)
3309 futureValue = null; 3312 futureValue = null;
3310 let result = new _Future(); 3313 let result = new _Future();
3311 this[_onDone] = (() => { 3314 this[_onDone] = (() => {
3312 result._completeWithValue(null); 3315 result[_completeWithValue](null);
3313 }).bind(this); 3316 }).bind(this);
3314 return result; 3317 return result;
3315 } 3318 }
3316 [_sendDone]() { 3319 [_sendDone]() {
3317 this[_state] = ~dart.notNull(_DoneStreamSubscription[_SCHEDULED]); 3320 this[_state] = ~dart.notNull(_DoneStreamSubscription[_SCHEDULED]);
3318 if (this.isPaused) 3321 if (this.isPaused)
3319 return; 3322 return;
3320 this[_state] = _DoneStreamSubscription[_DONE_SENT]; 3323 this[_state] = _DoneStreamSubscription[_DONE_SENT];
3321 if (this[_onDone] != null) 3324 if (this[_onDone] != null)
3322 this[_zone].runGuarded(this[_onDone]); 3325 this[_zone].runGuarded(this[_onDone]);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3355 let onError = opts && 'onError' in opts ? opts.onError : null; 3358 let onError = opts && 'onError' in opts ? opts.onError : null;
3356 let onDone = opts && 'onDone' in opts ? opts.onDone : null; 3359 let onDone = opts && 'onDone' in opts ? opts.onDone : null;
3357 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; 3360 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
3358 if (dart.notNull(this[_controller] == null) || dart.notNull(this[_contro ller].isClosed)) { 3361 if (dart.notNull(this[_controller] == null) || dart.notNull(this[_contro ller].isClosed)) {
3359 return new (_DoneStreamSubscription$(T))(onDone); 3362 return new (_DoneStreamSubscription$(T))(onDone);
3360 } 3363 }
3361 if (this[_subscription] == null) { 3364 if (this[_subscription] == null) {
3362 this[_subscription] = this[_source].listen(this[_controller].add, {onE rror: this[_controller].addError, onDone: this[_controller].close}); 3365 this[_subscription] = this[_source].listen(this[_controller].add, {onE rror: this[_controller].addError, onDone: this[_controller].close});
3363 } 3366 }
3364 cancelOnError = core.identical(true, cancelOnError); 3367 cancelOnError = core.identical(true, cancelOnError);
3365 return this[_controller]._subscribe(onData, onError, onDone, cancelOnErr or); 3368 return this[_controller][_subscribe](onData, onError, onDone, cancelOnEr ror);
3366 } 3369 }
3367 [_onCancel]() { 3370 [_onCancel]() {
3368 let shutdown = dart.notNull(this[_controller] == null) || dart.notNull(t his[_controller].isClosed); 3371 let shutdown = dart.notNull(this[_controller] == null) || dart.notNull(t his[_controller].isClosed);
3369 if (this[_onCancelHandler] != null) { 3372 if (this[_onCancelHandler] != null) {
3370 this[_zone].runUnary(this[_onCancelHandler], new _BroadcastSubscriptio nWrapper(this)); 3373 this[_zone].runUnary(this[_onCancelHandler], new _BroadcastSubscriptio nWrapper(this));
3371 } 3374 }
3372 if (shutdown) { 3375 if (shutdown) {
3373 if (this[_subscription] != null) { 3376 if (this[_subscription] != null) {
3374 this[_subscription].cancel(); 3377 this[_subscription].cancel();
3375 this[_subscription] = null; 3378 this[_subscription] = null;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
3418 } 3421 }
3419 onError(handleError) { 3422 onError(handleError) {
3420 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt ream source subscription."); 3423 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt ream source subscription.");
3421 } 3424 }
3422 onDone(handleDone) { 3425 onDone(handleDone) {
3423 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt ream source subscription."); 3426 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt ream source subscription.");
3424 } 3427 }
3425 pause(resumeSignal) { 3428 pause(resumeSignal) {
3426 if (resumeSignal === void 0) 3429 if (resumeSignal === void 0)
3427 resumeSignal = null; 3430 resumeSignal = null;
3428 this[_stream]._pauseSubscription(resumeSignal); 3431 this[_stream][_pauseSubscription](resumeSignal);
3429 } 3432 }
3430 resume() { 3433 resume() {
3431 this[_stream]._resumeSubscription(); 3434 this[_stream][_resumeSubscription]();
3432 } 3435 }
3433 cancel() { 3436 cancel() {
3434 this[_stream]._cancelSubscription(); 3437 this[_stream][_cancelSubscription]();
3435 return null; 3438 return null;
3436 } 3439 }
3437 get isPaused() { 3440 get isPaused() {
3438 return this[_stream][_isSubscriptionPaused]; 3441 return this[_stream][_isSubscriptionPaused];
3439 } 3442 }
3440 asFuture(futureValue) { 3443 asFuture(futureValue) {
3441 if (futureValue === void 0) 3444 if (futureValue === void 0)
3442 futureValue = null; 3445 futureValue = null;
3443 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt ream source subscription."); 3446 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt ream source subscription.");
3444 } 3447 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
3509 this[_subscription] = null; 3512 this[_subscription] = null;
3510 this[_futureOrPrefetch] = null; 3513 this[_futureOrPrefetch] = null;
3511 this[_current] = null; 3514 this[_current] = null;
3512 this[_state] = _StreamIteratorImpl[_STATE_DONE]; 3515 this[_state] = _StreamIteratorImpl[_STATE_DONE];
3513 } 3516 }
3514 cancel() { 3517 cancel() {
3515 let subscription = this[_subscription]; 3518 let subscription = this[_subscription];
3516 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { 3519 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) {
3517 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); 3520 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
3518 this[_clear](); 3521 this[_clear]();
3519 hasNext._complete(false); 3522 hasNext[_complete](false);
3520 } else { 3523 } else {
3521 this[_clear](); 3524 this[_clear]();
3522 } 3525 }
3523 return subscription.cancel(); 3526 return subscription.cancel();
3524 } 3527 }
3525 [_onData](data) { 3528 [_onData](data) {
3526 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { 3529 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) {
3527 this[_current] = data; 3530 this[_current] = data;
3528 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); 3531 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
3529 this[_futureOrPrefetch] = null; 3532 this[_futureOrPrefetch] = null;
3530 this[_state] = _StreamIteratorImpl[_STATE_FOUND]; 3533 this[_state] = _StreamIteratorImpl[_STATE_FOUND];
3531 hasNext._complete(true); 3534 hasNext[_complete](true);
3532 return; 3535 return;
3533 } 3536 }
3534 this[_subscription].pause(); 3537 this[_subscription].pause();
3535 dart.assert(this[_futureOrPrefetch] == null); 3538 dart.assert(this[_futureOrPrefetch] == null);
3536 this[_futureOrPrefetch] = data; 3539 this[_futureOrPrefetch] = data;
3537 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_DATA]; 3540 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_DATA];
3538 } 3541 }
3539 [_onError](error, stackTrace) { 3542 [_onError](error, stackTrace) {
3540 if (stackTrace === void 0) 3543 if (stackTrace === void 0)
3541 stackTrace = null; 3544 stackTrace = null;
3542 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { 3545 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) {
3543 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); 3546 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
3544 this[_clear](); 3547 this[_clear]();
3545 hasNext._completeError(error, stackTrace); 3548 hasNext[_completeError](error, stackTrace);
3546 return; 3549 return;
3547 } 3550 }
3548 this[_subscription].pause(); 3551 this[_subscription].pause();
3549 dart.assert(this[_futureOrPrefetch] == null); 3552 dart.assert(this[_futureOrPrefetch] == null);
3550 this[_futureOrPrefetch] = new AsyncError(error, stackTrace); 3553 this[_futureOrPrefetch] = new AsyncError(error, stackTrace);
3551 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_ERROR]; 3554 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_ERROR];
3552 } 3555 }
3553 [_onDone]() { 3556 [_onDone]() {
3554 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { 3557 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) {
3555 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); 3558 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
3556 this[_clear](); 3559 this[_clear]();
3557 hasNext._complete(false); 3560 hasNext[_complete](false);
3558 return; 3561 return;
3559 } 3562 }
3560 this[_subscription].pause(); 3563 this[_subscription].pause();
3561 this[_futureOrPrefetch] = null; 3564 this[_futureOrPrefetch] = null;
3562 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_DONE]; 3565 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_DONE];
3563 } 3566 }
3564 } 3567 }
3565 _StreamIteratorImpl[dart.implements] = () => [StreamIterator$(T)]; 3568 _StreamIteratorImpl[dart.implements] = () => [StreamIterator$(T)];
3566 _StreamIteratorImpl._STATE_FOUND = 0; 3569 _StreamIteratorImpl._STATE_FOUND = 0;
3567 _StreamIteratorImpl._STATE_DONE = 1; 3570 _StreamIteratorImpl._STATE_DONE = 1;
(...skipping 18 matching lines...) Expand all
3586 let stackTrace = replacement.stackTrace; 3589 let stackTrace = replacement.stackTrace;
3587 dart.dinvokef(onError, error, stackTrace); 3590 dart.dinvokef(onError, error, stackTrace);
3588 } 3591 }
3589 } 3592 }
3590 3593
3591 } 3594 }
3592 // Function _cancelAndError: (StreamSubscription<dynamic>, _Future<dynamic>, d ynamic, StackTrace) → void 3595 // Function _cancelAndError: (StreamSubscription<dynamic>, _Future<dynamic>, d ynamic, StackTrace) → void
3593 function _cancelAndError(subscription, future, error, stackTrace) { 3596 function _cancelAndError(subscription, future, error, stackTrace) {
3594 let cancelFuture = subscription.cancel(); 3597 let cancelFuture = subscription.cancel();
3595 if (dart.is(cancelFuture, Future)) { 3598 if (dart.is(cancelFuture, Future)) {
3596 cancelFuture.whenComplete(() => future._completeError(error, stackTrace)); 3599 cancelFuture.whenComplete(() => future[_completeError](error, stackTrace)) ;
3597 } else { 3600 } else {
3598 future._completeError(error, stackTrace); 3601 future[_completeError](error, stackTrace);
3599 } 3602 }
3600 } 3603 }
3601 // Function _cancelAndErrorWithReplacement: (StreamSubscription<dynamic>, _Fut ure<dynamic>, dynamic, StackTrace) → void 3604 // Function _cancelAndErrorWithReplacement: (StreamSubscription<dynamic>, _Fut ure<dynamic>, dynamic, StackTrace) → void
3602 function _cancelAndErrorWithReplacement(subscription, future, error, stackTrac e) { 3605 function _cancelAndErrorWithReplacement(subscription, future, error, stackTrac e) {
3603 let replacement = Zone.current.errorCallback(error, stackTrace); 3606 let replacement = Zone.current.errorCallback(error, stackTrace);
3604 if (replacement != null) { 3607 if (replacement != null) {
3605 error = _nonNullError(replacement.error); 3608 error = _nonNullError(replacement.error);
3606 stackTrace = replacement.stackTrace; 3609 stackTrace = replacement.stackTrace;
3607 } 3610 }
3608 _cancelAndError(subscription, future, error, stackTrace); 3611 _cancelAndError(subscription, future, error, stackTrace);
3609 } 3612 }
3610 // Function _cancelAndErrorClosure: (StreamSubscription<dynamic>, _Future<dyna mic>) → dynamic 3613 // Function _cancelAndErrorClosure: (StreamSubscription<dynamic>, _Future<dyna mic>) → dynamic
3611 function _cancelAndErrorClosure(subscription, future) { 3614 function _cancelAndErrorClosure(subscription, future) {
3612 return (error, stackTrace) => _cancelAndError(subscription, future, error, s tackTrace); 3615 return (error, stackTrace) => _cancelAndError(subscription, future, error, s tackTrace);
3613 } 3616 }
3614 // Function _cancelAndValue: (StreamSubscription<dynamic>, _Future<dynamic>, d ynamic) → void 3617 // Function _cancelAndValue: (StreamSubscription<dynamic>, _Future<dynamic>, d ynamic) → void
3615 function _cancelAndValue(subscription, future, value) { 3618 function _cancelAndValue(subscription, future, value) {
3616 let cancelFuture = subscription.cancel(); 3619 let cancelFuture = subscription.cancel();
3617 if (dart.is(cancelFuture, Future)) { 3620 if (dart.is(cancelFuture, Future)) {
3618 cancelFuture.whenComplete(() => future._complete(value)); 3621 cancelFuture.whenComplete(() => future[_complete](value));
3619 } else { 3622 } else {
3620 future._complete(value); 3623 future[_complete](value);
3621 } 3624 }
3622 } 3625 }
3623 let _handleData = Symbol('_handleData'); 3626 let _handleData = Symbol('_handleData');
3624 let _handleError = Symbol('_handleError'); 3627 let _handleError = Symbol('_handleError');
3625 let _handleDone = Symbol('_handleDone'); 3628 let _handleDone = Symbol('_handleDone');
3626 let _ForwardingStream$ = dart.generic(function(S, T) { 3629 let _ForwardingStream$ = dart.generic(function(S, T) {
3627 class _ForwardingStream extends Stream$(T) { 3630 class _ForwardingStream extends Stream$(T) {
3628 _ForwardingStream(source$) { 3631 _ForwardingStream(source$) {
3629 this[_source] = source$; 3632 this[_source] = source$;
3630 super.Stream(); 3633 super.Stream();
3631 } 3634 }
3632 get isBroadcast() { 3635 get isBroadcast() {
3633 return this[_source].isBroadcast; 3636 return this[_source].isBroadcast;
3634 } 3637 }
3635 listen(onData, opts) { 3638 listen(onData, opts) {
3636 let onError = opts && 'onError' in opts ? opts.onError : null; 3639 let onError = opts && 'onError' in opts ? opts.onError : null;
3637 let onDone = opts && 'onDone' in opts ? opts.onDone : null; 3640 let onDone = opts && 'onDone' in opts ? opts.onDone : null;
3638 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; 3641 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
3639 cancelOnError = core.identical(true, cancelOnError); 3642 cancelOnError = core.identical(true, cancelOnError);
3640 return this[_createSubscription](onData, onError, onDone, cancelOnError) ; 3643 return this[_createSubscription](onData, onError, onDone, cancelOnError) ;
3641 } 3644 }
3642 [_createSubscription](onData, onError, onDone, cancelOnError) { 3645 [_createSubscription](onData, onError, onDone, cancelOnError) {
3643 return new (_ForwardingStreamSubscription$(S, T))(this, onData, onError, onDone, cancelOnError); 3646 return new (_ForwardingStreamSubscription$(S, T))(this, onData, onError, onDone, cancelOnError);
3644 } 3647 }
3645 [_handleData](data, sink) { 3648 [_handleData](data, sink) {
3646 let outputData = data; 3649 let outputData = data;
3647 sink._add(outputData); 3650 sink[_add](outputData);
3648 } 3651 }
3649 [_handleError](error, stackTrace, sink) { 3652 [_handleError](error, stackTrace, sink) {
3650 sink._addError(error, stackTrace); 3653 sink[_addError](error, stackTrace);
3651 } 3654 }
3652 [_handleDone](sink) { 3655 [_handleDone](sink) {
3653 sink._close(); 3656 sink[_close]();
3654 } 3657 }
3655 } 3658 }
3656 return _ForwardingStream; 3659 return _ForwardingStream;
3657 }); 3660 });
3658 let _ForwardingStream = _ForwardingStream$(dart.dynamic, dart.dynamic); 3661 let _ForwardingStream = _ForwardingStream$(dart.dynamic, dart.dynamic);
3659 let _ForwardingStreamSubscription$ = dart.generic(function(S, T) { 3662 let _ForwardingStreamSubscription$ = dart.generic(function(S, T) {
3660 class _ForwardingStreamSubscription extends _BufferingStreamSubscription$(T) { 3663 class _ForwardingStreamSubscription extends _BufferingStreamSubscription$(T) {
3661 _ForwardingStreamSubscription(stream$, onData, onError, onDone, cancelOnEr ror) { 3664 _ForwardingStreamSubscription(stream$, onData, onError, onDone, cancelOnEr ror) {
3662 this[_stream] = stream$; 3665 this[_stream] = stream$;
3663 this[_subscription] = null; 3666 this[_subscription] = null;
3664 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro r); 3667 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro r);
3665 this[_subscription] = this[_stream][_source].listen(this[_handleData], { onError: this[_handleError], onDone: this[_handleDone]}); 3668 this[_subscription] = this[_stream][_source].listen(this[_handleData], { onError: this[_handleError], onDone: this[_handleDone]});
3666 } 3669 }
3667 [_add](data) { 3670 [_add](data) {
3668 if (this[_isClosed]) 3671 if (this[_isClosed])
3669 return; 3672 return;
3670 super._add(data); 3673 super[_add](data);
3671 } 3674 }
3672 [_addError](error, stackTrace) { 3675 [_addError](error, stackTrace) {
3673 if (this[_isClosed]) 3676 if (this[_isClosed])
3674 return; 3677 return;
3675 super._addError(error, stackTrace); 3678 super[_addError](error, stackTrace);
3676 } 3679 }
3677 [_onPause]() { 3680 [_onPause]() {
3678 if (this[_subscription] == null) 3681 if (this[_subscription] == null)
3679 return; 3682 return;
3680 this[_subscription].pause(); 3683 this[_subscription].pause();
3681 } 3684 }
3682 [_onResume]() { 3685 [_onResume]() {
3683 if (this[_subscription] == null) 3686 if (this[_subscription] == null)
3684 return; 3687 return;
3685 this[_subscription].resume(); 3688 this[_subscription].resume();
3686 } 3689 }
3687 [_onCancel]() { 3690 [_onCancel]() {
3688 if (this[_subscription] != null) { 3691 if (this[_subscription] != null) {
3689 let subscription = this[_subscription]; 3692 let subscription = this[_subscription];
3690 this[_subscription] = null; 3693 this[_subscription] = null;
3691 subscription.cancel(); 3694 subscription.cancel();
3692 } 3695 }
3693 return null; 3696 return null;
3694 } 3697 }
3695 [_handleData](data) { 3698 [_handleData](data) {
3696 this[_stream]._handleData(data, this); 3699 this[_stream][_handleData](data, this);
3697 } 3700 }
3698 [_handleError](error, stackTrace) { 3701 [_handleError](error, stackTrace) {
3699 this[_stream]._handleError(error, stackTrace, this); 3702 this[_stream][_handleError](error, stackTrace, this);
3700 } 3703 }
3701 [_handleDone]() { 3704 [_handleDone]() {
3702 this[_stream]._handleDone(this); 3705 this[_stream][_handleDone](this);
3703 } 3706 }
3704 } 3707 }
3705 return _ForwardingStreamSubscription; 3708 return _ForwardingStreamSubscription;
3706 }); 3709 });
3707 let _ForwardingStreamSubscription = _ForwardingStreamSubscription$(dart.dynami c, dart.dynamic); 3710 let _ForwardingStreamSubscription = _ForwardingStreamSubscription$(dart.dynami c, dart.dynamic);
3708 // Function _addErrorWithReplacement: (_EventSink<dynamic>, dynamic, dynamic) → void 3711 // Function _addErrorWithReplacement: (_EventSink<dynamic>, dynamic, dynamic) → void
3709 function _addErrorWithReplacement(sink, error, stackTrace) { 3712 function _addErrorWithReplacement(sink, error, stackTrace) {
3710 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core .StackTrace)); 3713 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core .StackTrace));
3711 if (replacement != null) { 3714 if (replacement != null) {
3712 error = _nonNullError(replacement.error); 3715 error = _nonNullError(replacement.error);
3713 stackTrace = replacement.stackTrace; 3716 stackTrace = replacement.stackTrace;
3714 } 3717 }
3715 sink._addError(error, dart.as(stackTrace, core.StackTrace)); 3718 sink[_addError](error, dart.as(stackTrace, core.StackTrace));
3716 } 3719 }
3717 let _test = Symbol('_test'); 3720 let _test = Symbol('_test');
3718 let _WhereStream$ = dart.generic(function(T) { 3721 let _WhereStream$ = dart.generic(function(T) {
3719 class _WhereStream extends _ForwardingStream$(T, T) { 3722 class _WhereStream extends _ForwardingStream$(T, T) {
3720 _WhereStream(source, test) { 3723 _WhereStream(source, test) {
3721 this[_test] = test; 3724 this[_test] = test;
3722 super._ForwardingStream(source); 3725 super._ForwardingStream(source);
3723 } 3726 }
3724 [_handleData](inputEvent, sink) { 3727 [_handleData](inputEvent, sink) {
3725 let satisfies = null; 3728 let satisfies = null;
3726 try { 3729 try {
3727 satisfies = this[_test](inputEvent); 3730 satisfies = this[_test](inputEvent);
3728 } catch (e) { 3731 } catch (e) {
3729 let s = dart.stackTrace(e); 3732 let s = dart.stackTrace(e);
3730 _addErrorWithReplacement(sink, e, s); 3733 _addErrorWithReplacement(sink, e, s);
3731 return; 3734 return;
3732 } 3735 }
3733 3736
3734 if (satisfies) { 3737 if (satisfies) {
3735 sink._add(inputEvent); 3738 sink[_add](inputEvent);
3736 } 3739 }
3737 } 3740 }
3738 } 3741 }
3739 return _WhereStream; 3742 return _WhereStream;
3740 }); 3743 });
3741 let _WhereStream = _WhereStream$(dart.dynamic); 3744 let _WhereStream = _WhereStream$(dart.dynamic);
3742 let _transform = Symbol('_transform'); 3745 let _transform = Symbol('_transform');
3743 let _MapStream$ = dart.generic(function(S, T) { 3746 let _MapStream$ = dart.generic(function(S, T) {
3744 class _MapStream extends _ForwardingStream$(S, T) { 3747 class _MapStream extends _ForwardingStream$(S, T) {
3745 _MapStream(source, transform) { 3748 _MapStream(source, transform) {
3746 this[_transform] = transform; 3749 this[_transform] = transform;
3747 super._ForwardingStream(source); 3750 super._ForwardingStream(source);
3748 } 3751 }
3749 [_handleData](inputEvent, sink) { 3752 [_handleData](inputEvent, sink) {
3750 let outputEvent = null; 3753 let outputEvent = null;
3751 try { 3754 try {
3752 outputEvent = dart.as(dart.dinvokef(this[_transform], inputEvent), T); 3755 outputEvent = dart.as(dart.dinvokef(this[_transform], inputEvent), T);
3753 } catch (e) { 3756 } catch (e) {
3754 let s = dart.stackTrace(e); 3757 let s = dart.stackTrace(e);
3755 _addErrorWithReplacement(sink, e, s); 3758 _addErrorWithReplacement(sink, e, s);
3756 return; 3759 return;
3757 } 3760 }
3758 3761
3759 sink._add(outputEvent); 3762 sink[_add](outputEvent);
3760 } 3763 }
3761 } 3764 }
3762 return _MapStream; 3765 return _MapStream;
3763 }); 3766 });
3764 let _MapStream = _MapStream$(dart.dynamic, dart.dynamic); 3767 let _MapStream = _MapStream$(dart.dynamic, dart.dynamic);
3765 let _expand = Symbol('_expand'); 3768 let _expand = Symbol('_expand');
3766 let _ExpandStream$ = dart.generic(function(S, T) { 3769 let _ExpandStream$ = dart.generic(function(S, T) {
3767 class _ExpandStream extends _ForwardingStream$(S, T) { 3770 class _ExpandStream extends _ForwardingStream$(S, T) {
3768 _ExpandStream(source, expand) { 3771 _ExpandStream(source, expand) {
3769 this[_expand] = expand; 3772 this[_expand] = expand;
3770 super._ForwardingStream(source); 3773 super._ForwardingStream(source);
3771 } 3774 }
3772 [_handleData](inputEvent, sink) { 3775 [_handleData](inputEvent, sink) {
3773 try { 3776 try {
3774 for (let value of this[_expand](inputEvent)) { 3777 for (let value of this[_expand](inputEvent)) {
3775 sink._add(value); 3778 sink[_add](value);
3776 } 3779 }
3777 } catch (e) { 3780 } catch (e) {
3778 let s = dart.stackTrace(e); 3781 let s = dart.stackTrace(e);
3779 _addErrorWithReplacement(sink, e, s); 3782 _addErrorWithReplacement(sink, e, s);
3780 } 3783 }
3781 3784
3782 } 3785 }
3783 } 3786 }
3784 return _ExpandStream; 3787 return _ExpandStream;
3785 }); 3788 });
(...skipping 16 matching lines...) Expand all
3802 return; 3805 return;
3803 } 3806 }
3804 3807
3805 } 3808 }
3806 if (matches) { 3809 if (matches) {
3807 try { 3810 try {
3808 _invokeErrorHandler(this[_transform], error, stackTrace); 3811 _invokeErrorHandler(this[_transform], error, stackTrace);
3809 } catch (e) { 3812 } catch (e) {
3810 let s = dart.stackTrace(e); 3813 let s = dart.stackTrace(e);
3811 if (core.identical(e, error)) { 3814 if (core.identical(e, error)) {
3812 sink._addError(error, stackTrace); 3815 sink[_addError](error, stackTrace);
3813 } else { 3816 } else {
3814 _addErrorWithReplacement(sink, e, s); 3817 _addErrorWithReplacement(sink, e, s);
3815 } 3818 }
3816 return; 3819 return;
3817 } 3820 }
3818 3821
3819 } else { 3822 } else {
3820 sink._addError(error, stackTrace); 3823 sink[_addError](error, stackTrace);
3821 } 3824 }
3822 } 3825 }
3823 } 3826 }
3824 return _HandleErrorStream; 3827 return _HandleErrorStream;
3825 }); 3828 });
3826 let _HandleErrorStream = _HandleErrorStream$(dart.dynamic); 3829 let _HandleErrorStream = _HandleErrorStream$(dart.dynamic);
3827 let _remaining = Symbol('_remaining'); 3830 let _remaining = Symbol('_remaining');
3828 let _TakeStream$ = dart.generic(function(T) { 3831 let _TakeStream$ = dart.generic(function(T) {
3829 class _TakeStream extends _ForwardingStream$(T, T) { 3832 class _TakeStream extends _ForwardingStream$(T, T) {
3830 _TakeStream(source, count) { 3833 _TakeStream(source, count) {
3831 this[_remaining] = count; 3834 this[_remaining] = count;
3832 super._ForwardingStream(source); 3835 super._ForwardingStream(source);
3833 if (!(typeof count == 'number')) 3836 if (!(typeof count == 'number'))
3834 throw new core.ArgumentError(count); 3837 throw new core.ArgumentError(count);
3835 } 3838 }
3836 [_handleData](inputEvent, sink) { 3839 [_handleData](inputEvent, sink) {
3837 if (dart.notNull(this[_remaining]) > 0) { 3840 if (dart.notNull(this[_remaining]) > 0) {
3838 sink._add(inputEvent); 3841 sink[_add](inputEvent);
3839 this[_remaining] = 1; 3842 this[_remaining] = 1;
3840 if (this[_remaining] == 0) { 3843 if (this[_remaining] == 0) {
3841 sink._close(); 3844 sink[_close]();
3842 } 3845 }
3843 } 3846 }
3844 } 3847 }
3845 } 3848 }
3846 return _TakeStream; 3849 return _TakeStream;
3847 }); 3850 });
3848 let _TakeStream = _TakeStream$(dart.dynamic); 3851 let _TakeStream = _TakeStream$(dart.dynamic);
3849 let _TakeWhileStream$ = dart.generic(function(T) { 3852 let _TakeWhileStream$ = dart.generic(function(T) {
3850 class _TakeWhileStream extends _ForwardingStream$(T, T) { 3853 class _TakeWhileStream extends _ForwardingStream$(T, T) {
3851 _TakeWhileStream(source, test) { 3854 _TakeWhileStream(source, test) {
3852 this[_test] = test; 3855 this[_test] = test;
3853 super._ForwardingStream(source); 3856 super._ForwardingStream(source);
3854 } 3857 }
3855 [_handleData](inputEvent, sink) { 3858 [_handleData](inputEvent, sink) {
3856 let satisfies = null; 3859 let satisfies = null;
3857 try { 3860 try {
3858 satisfies = this[_test](inputEvent); 3861 satisfies = this[_test](inputEvent);
3859 } catch (e) { 3862 } catch (e) {
3860 let s = dart.stackTrace(e); 3863 let s = dart.stackTrace(e);
3861 _addErrorWithReplacement(sink, e, s); 3864 _addErrorWithReplacement(sink, e, s);
3862 sink._close(); 3865 sink[_close]();
3863 return; 3866 return;
3864 } 3867 }
3865 3868
3866 if (satisfies) { 3869 if (satisfies) {
3867 sink._add(inputEvent); 3870 sink[_add](inputEvent);
3868 } else { 3871 } else {
3869 sink._close(); 3872 sink[_close]();
3870 } 3873 }
3871 } 3874 }
3872 } 3875 }
3873 return _TakeWhileStream; 3876 return _TakeWhileStream;
3874 }); 3877 });
3875 let _TakeWhileStream = _TakeWhileStream$(dart.dynamic); 3878 let _TakeWhileStream = _TakeWhileStream$(dart.dynamic);
3876 let _SkipStream$ = dart.generic(function(T) { 3879 let _SkipStream$ = dart.generic(function(T) {
3877 class _SkipStream extends _ForwardingStream$(T, T) { 3880 class _SkipStream extends _ForwardingStream$(T, T) {
3878 _SkipStream(source, count) { 3881 _SkipStream(source, count) {
3879 this[_remaining] = count; 3882 this[_remaining] = count;
3880 super._ForwardingStream(source); 3883 super._ForwardingStream(source);
3881 if (dart.notNull(!(typeof count == 'number')) || dart.notNull(count) < 0 ) 3884 if (dart.notNull(!(typeof count == 'number')) || dart.notNull(count) < 0 )
3882 throw new core.ArgumentError(count); 3885 throw new core.ArgumentError(count);
3883 } 3886 }
3884 [_handleData](inputEvent, sink) { 3887 [_handleData](inputEvent, sink) {
3885 if (dart.notNull(this[_remaining]) > 0) { 3888 if (dart.notNull(this[_remaining]) > 0) {
3886 this[_remaining] = dart.notNull(this[_remaining]) - 1; 3889 this[_remaining] = dart.notNull(this[_remaining]) - 1;
3887 return; 3890 return;
3888 } 3891 }
3889 sink._add(inputEvent); 3892 sink[_add](inputEvent);
3890 } 3893 }
3891 } 3894 }
3892 return _SkipStream; 3895 return _SkipStream;
3893 }); 3896 });
3894 let _SkipStream = _SkipStream$(dart.dynamic); 3897 let _SkipStream = _SkipStream$(dart.dynamic);
3895 let _hasFailed = Symbol('_hasFailed'); 3898 let _hasFailed = Symbol('_hasFailed');
3896 let _SkipWhileStream$ = dart.generic(function(T) { 3899 let _SkipWhileStream$ = dart.generic(function(T) {
3897 class _SkipWhileStream extends _ForwardingStream$(T, T) { 3900 class _SkipWhileStream extends _ForwardingStream$(T, T) {
3898 _SkipWhileStream(source, test) { 3901 _SkipWhileStream(source, test) {
3899 this[_test] = test; 3902 this[_test] = test;
3900 this[_hasFailed] = false; 3903 this[_hasFailed] = false;
3901 super._ForwardingStream(source); 3904 super._ForwardingStream(source);
3902 } 3905 }
3903 [_handleData](inputEvent, sink) { 3906 [_handleData](inputEvent, sink) {
3904 if (this[_hasFailed]) { 3907 if (this[_hasFailed]) {
3905 sink._add(inputEvent); 3908 sink[_add](inputEvent);
3906 return; 3909 return;
3907 } 3910 }
3908 let satisfies = null; 3911 let satisfies = null;
3909 try { 3912 try {
3910 satisfies = this[_test](inputEvent); 3913 satisfies = this[_test](inputEvent);
3911 } catch (e) { 3914 } catch (e) {
3912 let s = dart.stackTrace(e); 3915 let s = dart.stackTrace(e);
3913 _addErrorWithReplacement(sink, e, s); 3916 _addErrorWithReplacement(sink, e, s);
3914 this[_hasFailed] = true; 3917 this[_hasFailed] = true;
3915 return; 3918 return;
3916 } 3919 }
3917 3920
3918 if (!dart.notNull(satisfies)) { 3921 if (!dart.notNull(satisfies)) {
3919 this[_hasFailed] = true; 3922 this[_hasFailed] = true;
3920 sink._add(inputEvent); 3923 sink[_add](inputEvent);
3921 } 3924 }
3922 } 3925 }
3923 } 3926 }
3924 return _SkipWhileStream; 3927 return _SkipWhileStream;
3925 }); 3928 });
3926 let _SkipWhileStream = _SkipWhileStream$(dart.dynamic); 3929 let _SkipWhileStream = _SkipWhileStream$(dart.dynamic);
3927 let _SENTINEL = Symbol('_SENTINEL'); 3930 let _SENTINEL = Symbol('_SENTINEL');
3928 let _equals = Symbol('_equals'); 3931 let _equals = Symbol('_equals');
3929 let _DistinctStream$ = dart.generic(function(T) { 3932 let _DistinctStream$ = dart.generic(function(T) {
3930 class _DistinctStream extends _ForwardingStream$(T, T) { 3933 class _DistinctStream extends _ForwardingStream$(T, T) {
3931 _DistinctStream(source, equals) { 3934 _DistinctStream(source, equals) {
3932 this[_previous] = _DistinctStream[_SENTINEL]; 3935 this[_previous] = _DistinctStream[_SENTINEL];
3933 this[_equals] = equals; 3936 this[_equals] = equals;
3934 super._ForwardingStream(source); 3937 super._ForwardingStream(source);
3935 } 3938 }
3936 [_handleData](inputEvent, sink) { 3939 [_handleData](inputEvent, sink) {
3937 if (core.identical(this[_previous], _DistinctStream[_SENTINEL])) { 3940 if (core.identical(this[_previous], _DistinctStream[_SENTINEL])) {
3938 this[_previous] = inputEvent; 3941 this[_previous] = inputEvent;
3939 return sink._add(inputEvent); 3942 return sink[_add](inputEvent);
3940 } else { 3943 } else {
3941 let isEqual = null; 3944 let isEqual = null;
3942 try { 3945 try {
3943 if (this[_equals] == null) { 3946 if (this[_equals] == null) {
3944 isEqual = dart.equals(this[_previous], inputEvent); 3947 isEqual = dart.equals(this[_previous], inputEvent);
3945 } else { 3948 } else {
3946 isEqual = this[_equals](dart.as(this[_previous], T), inputEvent); 3949 isEqual = this[_equals](dart.as(this[_previous], T), inputEvent);
3947 } 3950 }
3948 } catch (e) { 3951 } catch (e) {
3949 let s = dart.stackTrace(e); 3952 let s = dart.stackTrace(e);
3950 _addErrorWithReplacement(sink, e, s); 3953 _addErrorWithReplacement(sink, e, s);
3951 return null; 3954 return null;
3952 } 3955 }
3953 3956
3954 if (!dart.notNull(isEqual)) { 3957 if (!dart.notNull(isEqual)) {
3955 sink._add(inputEvent); 3958 sink[_add](inputEvent);
3956 this[_previous] = inputEvent; 3959 this[_previous] = inputEvent;
3957 } 3960 }
3958 } 3961 }
3959 } 3962 }
3960 } 3963 }
3961 dart.defineLazyProperties(_DistinctStream, { 3964 dart.defineLazyProperties(_DistinctStream, {
3962 get _SENTINEL() { 3965 get _SENTINEL() {
3963 return new core.Object(); 3966 return new core.Object();
3964 }, 3967 },
3965 set _SENTINEL(_) {} 3968 set _SENTINEL(_) {}
3966 }); 3969 });
3967 return _DistinctStream; 3970 return _DistinctStream;
3968 }); 3971 });
3969 let _DistinctStream = _DistinctStream$(dart.dynamic); 3972 let _DistinctStream = _DistinctStream$(dart.dynamic);
3970 let _EventSinkWrapper$ = dart.generic(function(T) { 3973 let _EventSinkWrapper$ = dart.generic(function(T) {
3971 class _EventSinkWrapper extends core.Object { 3974 class _EventSinkWrapper extends core.Object {
3972 _EventSinkWrapper(sink$) { 3975 _EventSinkWrapper(sink$) {
3973 this[_sink] = sink$; 3976 this[_sink] = sink$;
3974 } 3977 }
3975 add(data) { 3978 add(data) {
3976 this[_sink]._add(data); 3979 this[_sink][_add](data);
3977 } 3980 }
3978 addError(error, stackTrace) { 3981 addError(error, stackTrace) {
3979 if (stackTrace === void 0) 3982 if (stackTrace === void 0)
3980 stackTrace = null; 3983 stackTrace = null;
3981 this[_sink]._addError(error, stackTrace); 3984 this[_sink][_addError](error, stackTrace);
3982 } 3985 }
3983 close() { 3986 close() {
3984 this[_sink]._close(); 3987 this[_sink][_close]();
3985 } 3988 }
3986 } 3989 }
3987 _EventSinkWrapper[dart.implements] = () => [EventSink$(T)]; 3990 _EventSinkWrapper[dart.implements] = () => [EventSink$(T)];
3988 return _EventSinkWrapper; 3991 return _EventSinkWrapper;
3989 }); 3992 });
3990 let _EventSinkWrapper = _EventSinkWrapper$(dart.dynamic); 3993 let _EventSinkWrapper = _EventSinkWrapper$(dart.dynamic);
3991 let _transformerSink = Symbol('_transformerSink'); 3994 let _transformerSink = Symbol('_transformerSink');
3992 let _isSubscribed = Symbol('_isSubscribed'); 3995 let _isSubscribed = Symbol('_isSubscribed');
3993 let _SinkTransformerStreamSubscription$ = dart.generic(function(S, T) { 3996 let _SinkTransformerStreamSubscription$ = dart.generic(function(S, T) {
3994 class _SinkTransformerStreamSubscription extends _BufferingStreamSubscriptio n$(T) { 3997 class _SinkTransformerStreamSubscription extends _BufferingStreamSubscriptio n$(T) {
3995 _SinkTransformerStreamSubscription(source, mapper, onData, onError, onDone , cancelOnError) { 3998 _SinkTransformerStreamSubscription(source, mapper, onData, onError, onDone , cancelOnError) {
3996 this[_transformerSink] = null; 3999 this[_transformerSink] = null;
3997 this[_subscription] = null; 4000 this[_subscription] = null;
3998 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro r); 4001 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro r);
3999 let eventSink = new (_EventSinkWrapper$(T))(this); 4002 let eventSink = new (_EventSinkWrapper$(T))(this);
4000 this[_transformerSink] = mapper(eventSink); 4003 this[_transformerSink] = mapper(eventSink);
4001 this[_subscription] = source.listen(this[_handleData], {onError: this[_h andleError], onDone: this[_handleDone]}); 4004 this[_subscription] = source.listen(this[_handleData], {onError: this[_h andleError], onDone: this[_handleDone]});
4002 } 4005 }
4003 get [_isSubscribed]() { 4006 get [_isSubscribed]() {
4004 return this[_subscription] != null; 4007 return this[_subscription] != null;
4005 } 4008 }
4006 [_add](data) { 4009 [_add](data) {
4007 if (this[_isClosed]) { 4010 if (this[_isClosed]) {
4008 throw new core.StateError("Stream is already closed"); 4011 throw new core.StateError("Stream is already closed");
4009 } 4012 }
4010 super._add(data); 4013 super[_add](data);
4011 } 4014 }
4012 [_addError](error, stackTrace) { 4015 [_addError](error, stackTrace) {
4013 if (this[_isClosed]) { 4016 if (this[_isClosed]) {
4014 throw new core.StateError("Stream is already closed"); 4017 throw new core.StateError("Stream is already closed");
4015 } 4018 }
4016 super._addError(error, stackTrace); 4019 super[_addError](error, stackTrace);
4017 } 4020 }
4018 [_close]() { 4021 [_close]() {
4019 if (this[_isClosed]) { 4022 if (this[_isClosed]) {
4020 throw new core.StateError("Stream is already closed"); 4023 throw new core.StateError("Stream is already closed");
4021 } 4024 }
4022 super._close(); 4025 super[_close]();
4023 } 4026 }
4024 [_onPause]() { 4027 [_onPause]() {
4025 if (this[_isSubscribed]) 4028 if (this[_isSubscribed])
4026 this[_subscription].pause(); 4029 this[_subscription].pause();
4027 } 4030 }
4028 [_onResume]() { 4031 [_onResume]() {
4029 if (this[_isSubscribed]) 4032 if (this[_isSubscribed])
4030 this[_subscription].resume(); 4033 this[_subscription].resume();
4031 } 4034 }
4032 [_onCancel]() { 4035 [_onCancel]() {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
4199 let result = this[_transformer](this[_stream], cancelOnError); 4202 let result = this[_transformer](this[_stream], cancelOnError);
4200 result.onData(onData); 4203 result.onData(onData);
4201 result.onError(onError); 4204 result.onError(onError);
4202 result.onDone(onDone); 4205 result.onDone(onDone);
4203 return result; 4206 return result;
4204 } 4207 }
4205 } 4208 }
4206 return _BoundSubscriptionStream; 4209 return _BoundSubscriptionStream;
4207 }); 4210 });
4208 let _BoundSubscriptionStream = _BoundSubscriptionStream$(dart.dynamic, dart.dy namic); 4211 let _BoundSubscriptionStream = _BoundSubscriptionStream$(dart.dynamic, dart.dy namic);
4209 let _createTimer = Symbol('_createTimer');
4210 let _createPeriodicTimer = Symbol('_createPeriodicTimer'); 4212 let _createPeriodicTimer = Symbol('_createPeriodicTimer');
4211 class Timer extends core.Object { 4213 class Timer extends core.Object {
4212 Timer(duration, callback) { 4214 Timer(duration, callback) {
4213 if (dart.equals(Zone.current, Zone.ROOT)) { 4215 if (dart.equals(Zone.current, Zone.ROOT)) {
4214 return Zone.current.createTimer(duration, callback); 4216 return Zone.current.createTimer(duration, callback);
4215 } 4217 }
4216 return Zone.current.createTimer(duration, Zone.current.bindCallback(callba ck, {runGuarded: true})); 4218 return Zone.current.createTimer(duration, Zone.current.bindCallback(callba ck, {runGuarded: true}));
4217 } 4219 }
4218 periodic(duration, callback) { 4220 periodic(duration, callback) {
4219 if (dart.equals(Zone.current, Zone.ROOT)) { 4221 if (dart.equals(Zone.current, Zone.ROOT)) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
4293 this.createTimer = createTimer; 4295 this.createTimer = createTimer;
4294 this.createPeriodicTimer = createPeriodicTimer; 4296 this.createPeriodicTimer = createPeriodicTimer;
4295 this.print = print; 4297 this.print = print;
4296 this.fork = fork; 4298 this.fork = fork;
4297 } 4299 }
4298 } 4300 }
4299 _ZoneSpecification[dart.implements] = () => [ZoneSpecification]; 4301 _ZoneSpecification[dart.implements] = () => [ZoneSpecification];
4300 class ZoneDelegate extends core.Object { 4302 class ZoneDelegate extends core.Object {
4301 } 4303 }
4302 let _$ = Symbol('_'); 4304 let _$ = Symbol('_');
4303 let _enter = Symbol('_enter');
4304 let _leave = Symbol('_leave');
4305 class Zone extends core.Object { 4305 class Zone extends core.Object {
4306 [_$]() { 4306 [_$]() {
4307 } 4307 }
4308 static get current() { 4308 static get current() {
4309 return Zone[_current]; 4309 return Zone[_current];
4310 } 4310 }
4311 static [_enter](zone) { 4311 static [_enter](zone) {
4312 dart.assert(zone != null); 4312 dart.assert(zone != null);
4313 dart.assert(!dart.notNull(core.identical(zone, Zone[_current]))); 4313 dart.assert(!dart.notNull(core.identical(zone, Zone[_current])));
4314 let previous = Zone[_current]; 4314 let previous = Zone[_current];
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
4622 // Function _rootHandleUncaughtError: (Zone, ZoneDelegate, Zone, dynamic, Stac kTrace) → void 4622 // Function _rootHandleUncaughtError: (Zone, ZoneDelegate, Zone, dynamic, Stac kTrace) → void
4623 function _rootHandleUncaughtError(self, parent, zone, error, stackTrace) { 4623 function _rootHandleUncaughtError(self, parent, zone, error, stackTrace) {
4624 _schedulePriorityAsyncCallback(() => { 4624 _schedulePriorityAsyncCallback(() => {
4625 throw new _UncaughtAsyncError(error, stackTrace); 4625 throw new _UncaughtAsyncError(error, stackTrace);
4626 }); 4626 });
4627 } 4627 }
4628 // Function _rootRun: (Zone, ZoneDelegate, Zone, () → dynamic) → dynamic 4628 // Function _rootRun: (Zone, ZoneDelegate, Zone, () → dynamic) → dynamic
4629 function _rootRun(self, parent, zone, f) { 4629 function _rootRun(self, parent, zone, f) {
4630 if (dart.equals(Zone[_current], zone)) 4630 if (dart.equals(Zone[_current], zone))
4631 return f(); 4631 return f();
4632 let old = Zone._enter(zone); 4632 let old = Zone[_enter](zone);
4633 try { 4633 try {
4634 return f(); 4634 return f();
4635 } finally { 4635 } finally {
4636 Zone._leave(old); 4636 Zone[_leave](old);
4637 } 4637 }
4638 } 4638 }
4639 // Function _rootRunUnary: (Zone, ZoneDelegate, Zone, (dynamic) → dynamic, dyn amic) → dynamic 4639 // Function _rootRunUnary: (Zone, ZoneDelegate, Zone, (dynamic) → dynamic, dyn amic) → dynamic
4640 function _rootRunUnary(self, parent, zone, f, arg) { 4640 function _rootRunUnary(self, parent, zone, f, arg) {
4641 if (dart.equals(Zone[_current], zone)) 4641 if (dart.equals(Zone[_current], zone))
4642 return dart.dinvokef(f, arg); 4642 return dart.dinvokef(f, arg);
4643 let old = Zone._enter(zone); 4643 let old = Zone[_enter](zone);
4644 try { 4644 try {
4645 return dart.dinvokef(f, arg); 4645 return dart.dinvokef(f, arg);
4646 } finally { 4646 } finally {
4647 Zone._leave(old); 4647 Zone[_leave](old);
4648 } 4648 }
4649 } 4649 }
4650 // Function _rootRunBinary: (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dy namic, dynamic, dynamic) → dynamic 4650 // Function _rootRunBinary: (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dy namic, dynamic, dynamic) → dynamic
4651 function _rootRunBinary(self, parent, zone, f, arg1, arg2) { 4651 function _rootRunBinary(self, parent, zone, f, arg1, arg2) {
4652 if (dart.equals(Zone[_current], zone)) 4652 if (dart.equals(Zone[_current], zone))
4653 return dart.dinvokef(f, arg1, arg2); 4653 return dart.dinvokef(f, arg1, arg2);
4654 let old = Zone._enter(zone); 4654 let old = Zone[_enter](zone);
4655 try { 4655 try {
4656 return dart.dinvokef(f, arg1, arg2); 4656 return dart.dinvokef(f, arg1, arg2);
4657 } finally { 4657 } finally {
4658 Zone._leave(old); 4658 Zone[_leave](old);
4659 } 4659 }
4660 } 4660 }
4661 // Function _rootRegisterCallback: (Zone, ZoneDelegate, Zone, () → dynamic) → ZoneCallback 4661 // Function _rootRegisterCallback: (Zone, ZoneDelegate, Zone, () → dynamic) → ZoneCallback
4662 function _rootRegisterCallback(self, parent, zone, f) { 4662 function _rootRegisterCallback(self, parent, zone, f) {
4663 return f; 4663 return f;
4664 } 4664 }
4665 // Function _rootRegisterUnaryCallback: (Zone, ZoneDelegate, Zone, (dynamic) → dynamic) → ZoneUnaryCallback 4665 // Function _rootRegisterUnaryCallback: (Zone, ZoneDelegate, Zone, (dynamic) → dynamic) → ZoneUnaryCallback
4666 function _rootRegisterUnaryCallback(self, parent, zone, f) { 4666 function _rootRegisterUnaryCallback(self, parent, zone, f) {
4667 return f; 4667 return f;
4668 } 4668 }
(...skipping 11 matching lines...) Expand all
4680 let hasErrorHandler = !dart.notNull(_ROOT_ZONE.inSameErrorZone(zone)); 4680 let hasErrorHandler = !dart.notNull(_ROOT_ZONE.inSameErrorZone(zone));
4681 f = zone.bindCallback(f, {runGuarded: hasErrorHandler}); 4681 f = zone.bindCallback(f, {runGuarded: hasErrorHandler});
4682 } 4682 }
4683 _scheduleAsyncCallback(f); 4683 _scheduleAsyncCallback(f);
4684 } 4684 }
4685 // Function _rootCreateTimer: (Zone, ZoneDelegate, Zone, Duration, () → void) → Timer 4685 // Function _rootCreateTimer: (Zone, ZoneDelegate, Zone, Duration, () → void) → Timer
4686 function _rootCreateTimer(self, parent, zone, duration, callback) { 4686 function _rootCreateTimer(self, parent, zone, duration, callback) {
4687 if (!dart.notNull(core.identical(_ROOT_ZONE, zone))) { 4687 if (!dart.notNull(core.identical(_ROOT_ZONE, zone))) {
4688 callback = zone.bindCallback(callback); 4688 callback = zone.bindCallback(callback);
4689 } 4689 }
4690 return Timer._createTimer(duration, callback); 4690 return Timer[_createTimer](duration, callback);
4691 } 4691 }
4692 // Function _rootCreatePeriodicTimer: (Zone, ZoneDelegate, Zone, Duration, (Ti mer) → void) → Timer 4692 // Function _rootCreatePeriodicTimer: (Zone, ZoneDelegate, Zone, Duration, (Ti mer) → void) → Timer
4693 function _rootCreatePeriodicTimer(self, parent, zone, duration, callback) { 4693 function _rootCreatePeriodicTimer(self, parent, zone, duration, callback) {
4694 if (!dart.notNull(core.identical(_ROOT_ZONE, zone))) { 4694 if (!dart.notNull(core.identical(_ROOT_ZONE, zone))) {
4695 callback = dart.closureWrap(zone.bindUnaryCallback(callback), "(Timer) → v oid"); 4695 callback = dart.closureWrap(zone.bindUnaryCallback(callback), "(Timer) → v oid");
4696 } 4696 }
4697 return Timer._createPeriodicTimer(duration, callback); 4697 return Timer[_createPeriodicTimer](duration, callback);
4698 } 4698 }
4699 // Function _rootPrint: (Zone, ZoneDelegate, Zone, String) → void 4699 // Function _rootPrint: (Zone, ZoneDelegate, Zone, String) → void
4700 function _rootPrint(self, parent, zone, line) { 4700 function _rootPrint(self, parent, zone, line) {
4701 _internal.printToConsole(line); 4701 _internal.printToConsole(line);
4702 } 4702 }
4703 // Function _printToZone: (String) → void 4703 // Function _printToZone: (String) → void
4704 function _printToZone(line) { 4704 function _printToZone(line) {
4705 Zone.current.print(line); 4705 Zone.current.print(line);
4706 } 4706 }
4707 // Function _rootFork: (Zone, ZoneDelegate, Zone, ZoneSpecification, Map<dynam ic, dynamic>) → Zone 4707 // Function _rootFork: (Zone, ZoneDelegate, Zone, ZoneSpecification, Map<dynam ic, dynamic>) → Zone
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
4920 registerBinaryCallback(f) { 4920 registerBinaryCallback(f) {
4921 return f; 4921 return f;
4922 } 4922 }
4923 errorCallback(error, stackTrace) { 4923 errorCallback(error, stackTrace) {
4924 return null; 4924 return null;
4925 } 4925 }
4926 scheduleMicrotask(f) { 4926 scheduleMicrotask(f) {
4927 _rootScheduleMicrotask(null, null, this, f); 4927 _rootScheduleMicrotask(null, null, this, f);
4928 } 4928 }
4929 createTimer(duration, f) { 4929 createTimer(duration, f) {
4930 return Timer._createTimer(duration, f); 4930 return Timer[_createTimer](duration, f);
4931 } 4931 }
4932 createPeriodicTimer(duration, f) { 4932 createPeriodicTimer(duration, f) {
4933 return Timer._createPeriodicTimer(duration, f); 4933 return Timer[_createPeriodicTimer](duration, f);
4934 } 4934 }
4935 print(line) { 4935 print(line) {
4936 _internal.printToConsole(line); 4936 _internal.printToConsole(line);
4937 } 4937 }
4938 } 4938 }
4939 _RootZone._rootDelegate = null; 4939 _RootZone._rootDelegate = null;
4940 dart.defineLazyProperties(_RootZone, { 4940 dart.defineLazyProperties(_RootZone, {
4941 get _rootMap() { 4941 get _rootMap() {
4942 return new collection.HashMap(); 4942 return new collection.HashMap();
4943 }, 4943 },
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
5012 exports.StreamIterator = StreamIterator; 5012 exports.StreamIterator = StreamIterator;
5013 exports.StreamIterator$ = StreamIterator$; 5013 exports.StreamIterator$ = StreamIterator$;
5014 exports.StreamController = StreamController; 5014 exports.StreamController = StreamController;
5015 exports.StreamController$ = StreamController$; 5015 exports.StreamController$ = StreamController$;
5016 exports.Timer = Timer; 5016 exports.Timer = Timer;
5017 exports.ZoneSpecification = ZoneSpecification; 5017 exports.ZoneSpecification = ZoneSpecification;
5018 exports.ZoneDelegate = ZoneDelegate; 5018 exports.ZoneDelegate = ZoneDelegate;
5019 exports.Zone = Zone; 5019 exports.Zone = Zone;
5020 exports.runZoned = runZoned; 5020 exports.runZoned = runZoned;
5021 })(async || (async = {})); 5021 })(async || (async = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698