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

Side by Side Diff: test/dart_codegen/expect/async/stream_impl.dart

Issue 977613002: Make int and double nullable by default (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: actually upload changes Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 part of dart.async; 1 part of dart.async;
2 abstract class _EventSink<T> {void _add(T data); 2 abstract class _EventSink<T> {void _add(T data);
3 void _addError(Object error, StackTrace stackTrace); 3 void _addError(Object error, StackTrace stackTrace);
4 void _close(); 4 void _close();
5 } 5 }
6 abstract class _EventDispatch<T> {void _sendData(T data); 6 abstract class _EventDispatch<T> {void _sendData(T data);
7 void _sendError(Object error, StackTrace stackTrace); 7 void _sendError(Object error, StackTrace stackTrace);
8 void _sendDone(); 8 void _sendDone();
9 } 9 }
10 class _BufferingStreamSubscription<T> implements StreamSubscription<T>, _EventS ink<T>, _EventDispatch<T> {static const int _STATE_CANCEL_ON_ERROR = 1; 10 class _BufferingStreamSubscription<T> implements StreamSubscription<T>, _EventS ink<T>, _EventDispatch<T> {static const int _STATE_CANCEL_ON_ERROR = 1;
(...skipping 24 matching lines...) Expand all
35 _pending.schedule(this); 35 _pending.schedule(this);
36 } 36 }
37 } 37 }
38 _PendingEvents _extractPending() { 38 _PendingEvents _extractPending() {
39 assert (_isCanceled); _PendingEvents events = _pending; 39 assert (_isCanceled); _PendingEvents events = _pending;
40 _pending = null; 40 _pending = null;
41 return events; 41 return events;
42 } 42 }
43 void onData(void handleData(T event)) { 43 void onData(void handleData(T event)) {
44 if (handleData == null) handleData = _nullDataHandler; 44 if (handleData == null) handleData = _nullDataHandler;
45 _onData = _zone.registerUnaryCallback(DDC$RT.wrap((void f(T __u129)) { 45 _onData = _zone.registerUnaryCallback(DDC$RT.wrap((void f(T __u118)) {
46 void c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 154, column 4 3 of dart:async/stream_impl.dart: """, x0 is T, false)); 46 void c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 154, column 4 3 of dart:async/stream_impl.dart: """, x0 is T, false));
47 return f == null ? null : c; 47 return f == null ? null : c;
48 } 48 }
49 , handleData, DDC$RT.type((__t132<T> _) { 49 , handleData, DDC$RT.type((__t121<T> _) {
50 } 50 }
51 ), __t130, "Wrap", """line 154, column 43 of dart:async/stream_impl.dart: """, h andleData is __t130)); 51 ), __t119, "Wrap", """line 154, column 43 of dart:async/stream_impl.dart: """, h andleData is __t119));
52 } 52 }
53 void onError(Function handleError) { 53 void onError(Function handleError) {
54 if (handleError == null) handleError = _nullErrorHandler; 54 if (handleError == null) handleError = _nullErrorHandler;
55 _onError = _registerErrorHandler(handleError, _zone); 55 _onError = _registerErrorHandler(handleError, _zone);
56 } 56 }
57 void onDone(void handleDone()) { 57 void onDone(void handleDone()) {
58 if (handleDone == null) handleDone = _nullDoneHandler; 58 if (handleDone == null) handleDone = _nullDoneHandler;
59 _onDone = _zone.registerCallback(handleDone); 59 _onDone = _zone.registerCallback(handleDone);
60 } 60 }
61 void pause([Future resumeSignal]) { 61 void pause([Future resumeSignal]) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if (!_hasPending) { 163 if (!_hasPending) {
164 _state |= _STATE_HAS_PENDING; 164 _state |= _STATE_HAS_PENDING;
165 if (!_isPaused) { 165 if (!_isPaused) {
166 _pending.schedule(this); 166 _pending.schedule(this);
167 } 167 }
168 } 168 }
169 } 169 }
170 void _sendData(T data) { 170 void _sendData(T data) {
171 assert (!_isCanceled); assert (!_isPaused); assert (!_inCallback); bool wasInput Paused = _isInputPaused; 171 assert (!_isCanceled); assert (!_isPaused); assert (!_inCallback); bool wasInput Paused = _isInputPaused;
172 _state |= _STATE_IN_CALLBACK; 172 _state |= _STATE_IN_CALLBACK;
173 _zone.runUnaryGuarded(DDC$RT.wrap((void f(T __u134)) { 173 _zone.runUnaryGuarded(DDC$RT.wrap((void f(T __u123)) {
174 void c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 341, column 2 7 of dart:async/stream_impl.dart: """, x0 is T, false)); 174 void c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 341, column 2 7 of dart:async/stream_impl.dart: """, x0 is T, false));
175 return f == null ? null : c; 175 return f == null ? null : c;
176 } 176 }
177 , _onData, DDC$RT.type((__t132<T> _) { 177 , _onData, DDC$RT.type((__t121<T> _) {
178 } 178 }
179 ), __t130, "Wrap", """line 341, column 27 of dart:async/stream_impl.dart: """, _ onData is __t130), data); 179 ), __t119, "Wrap", """line 341, column 27 of dart:async/stream_impl.dart: """, _ onData is __t119), data);
180 _state &= ~_STATE_IN_CALLBACK; 180 _state &= ~_STATE_IN_CALLBACK;
181 _checkState(wasInputPaused); 181 _checkState(wasInputPaused);
182 } 182 }
183 void _sendError(var error, StackTrace stackTrace) { 183 void _sendError(var error, StackTrace stackTrace) {
184 assert (!_isCanceled); assert (!_isPaused); assert (!_inCallback); bool wasInput Paused = _isInputPaused; 184 assert (!_isCanceled); assert (!_isPaused); assert (!_inCallback); bool wasInput Paused = _isInputPaused;
185 void sendError() { 185 void sendError() {
186 if (_isCanceled && !_waitsForCancel) return; _state |= _STATE_IN_CALLBACK; 186 if (_isCanceled && !_waitsForCancel) return; _state |= _STATE_IN_CALLBACK;
187 if (_onError is ZoneBinaryCallback) { 187 if (_onError is ZoneBinaryCallback) {
188 _zone.runBinaryGuarded(DDC$RT.cast(_onError, Function, __t135, "CastGeneral", """line 358, column 32 of dart:async/stream_impl.dart: """, _onError is __t135, false), error, stackTrace); 188 _zone.runBinaryGuarded(DDC$RT.cast(_onError, Function, __t124, "CastGeneral", """line 358, column 32 of dart:async/stream_impl.dart: """, _onError is __t124, false), error, stackTrace);
189 } 189 }
190 else { 190 else {
191 _zone.runUnaryGuarded(DDC$RT.cast(_onError, Function, __t130, "CastGeneral", " ""line 360, column 31 of dart:async/stream_impl.dart: """, _onError is __t130, f alse), error); 191 _zone.runUnaryGuarded(DDC$RT.cast(_onError, Function, __t119, "CastGeneral", " ""line 360, column 31 of dart:async/stream_impl.dart: """, _onError is __t119, f alse), error);
192 } 192 }
193 _state &= ~_STATE_IN_CALLBACK; 193 _state &= ~_STATE_IN_CALLBACK;
194 } 194 }
195 if (_cancelOnError) { 195 if (_cancelOnError) {
196 _state |= _STATE_WAIT_FOR_CANCEL; 196 _state |= _STATE_WAIT_FOR_CANCEL;
197 _cancel(); 197 _cancel();
198 if (_cancelFuture is Future) { 198 if (_cancelFuture is Future) {
199 _cancelFuture.whenComplete(sendError); 199 _cancelFuture.whenComplete(sendError);
200 } 200 }
201 else { 201 else {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 void _onListen(StreamSubscription subscription) { 275 void _onListen(StreamSubscription subscription) {
276 } 276 }
277 } 277 }
278 typedef _PendingEvents _EventGenerator(); 278 typedef _PendingEvents _EventGenerator();
279 class _GeneratedStreamImpl<T> extends _StreamImpl<T> {final _EventGenerator _pe nding; 279 class _GeneratedStreamImpl<T> extends _StreamImpl<T> {final _EventGenerator _pe nding;
280 bool _isUsed = false; 280 bool _isUsed = false;
281 _GeneratedStreamImpl(this._pending); 281 _GeneratedStreamImpl(this._pending);
282 StreamSubscription _createSubscription(void onData(T data), Function onError, v oid onDone(), bool cancelOnError) { 282 StreamSubscription _createSubscription(void onData(T data), Function onError, v oid onDone(), bool cancelOnError) {
283 if (_isUsed) throw new StateError("Stream has already been listened to."); 283 if (_isUsed) throw new StateError("Stream has already been listened to.");
284 _isUsed = true; 284 _isUsed = true;
285 return new _BufferingStreamSubscription(DDC$RT.wrap((void f(T __u138)) { 285 return new _BufferingStreamSubscription(DDC$RT.wrap((void f(T __u127)) {
286 void c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 516, column 9 of dart:async/stream_impl.dart: """, x0 is T, false)); 286 void c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 516, column 9 of dart:async/stream_impl.dart: """, x0 is T, false));
287 return f == null ? null : c; 287 return f == null ? null : c;
288 } 288 }
289 , onData, DDC$RT.type((__t141<T> _) { 289 , onData, DDC$RT.type((__t130<T> _) {
290 } 290 }
291 ), __t139, "Wrap", """line 516, column 9 of dart:async/stream_impl.dart: """, on Data is __t139), onError, onDone, cancelOnError).._setPendingEvents(_pending()); 291 ), __t128, "Wrap", """line 516, column 9 of dart:async/stream_impl.dart: """, on Data is __t128), onError, onDone, cancelOnError).._setPendingEvents(_pending());
292 } 292 }
293 } 293 }
294 class _IterablePendingEvents<T> extends _PendingEvents {Iterator<T> _iterator; 294 class _IterablePendingEvents<T> extends _PendingEvents {Iterator<T> _iterator;
295 _IterablePendingEvents(Iterable<T> data) : _iterator = data.iterator; 295 _IterablePendingEvents(Iterable<T> data) : _iterator = data.iterator;
296 bool get isEmpty => _iterator == null; 296 bool get isEmpty => _iterator == null;
297 void handleNext(_EventDispatch dispatch) { 297 void handleNext(_EventDispatch dispatch) {
298 if (_iterator == null) { 298 if (_iterator == null) {
299 throw new StateError("No events pending."); 299 throw new StateError("No events pending.");
300 } 300 }
301 bool isDone; 301 bool isDone;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 if (isPaused) return; _state |= _DONE_SENT; 467 if (isPaused) return; _state |= _DONE_SENT;
468 if (_onDone != null) _zone.runGuarded(_onDone); 468 if (_onDone != null) _zone.runGuarded(_onDone);
469 } 469 }
470 } 470 }
471 class _AsBroadcastStream<T> extends Stream<T> {final Stream<T> _source; 471 class _AsBroadcastStream<T> extends Stream<T> {final Stream<T> _source;
472 final _broadcastCallback _onListenHandler; 472 final _broadcastCallback _onListenHandler;
473 final _broadcastCallback _onCancelHandler; 473 final _broadcastCallback _onCancelHandler;
474 final Zone _zone; 474 final Zone _zone;
475 _AsBroadcastStreamController<T> _controller; 475 _AsBroadcastStreamController<T> _controller;
476 StreamSubscription<T> _subscription; 476 StreamSubscription<T> _subscription;
477 _AsBroadcastStream(this._source, void onListenHandler(StreamSubscription subscr iption), void onCancelHandler(StreamSubscription subscription)) : _onListenHandl er = Zone.current.registerUnaryCallback(DDC$RT.wrap((void f(StreamSubscription<d ynamic> __u143)) { 477 _AsBroadcastStream(this._source, void onListenHandler(StreamSubscription subscr iption), void onCancelHandler(StreamSubscription subscription)) : _onListenHandl er = Zone.current.registerUnaryCallback(DDC$RT.wrap((void f(StreamSubscription<d ynamic> __u132)) {
478 void c(StreamSubscription<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type ((StreamSubscription<dynamic> _) { 478 void c(StreamSubscription<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type ((StreamSubscription<dynamic> _) {
479 } 479 }
480 ), "CastParam", """line 813, column 63 of dart:async/stream_impl.dart: """, x0 i s StreamSubscription<dynamic>, true)); 480 ), "CastParam", """line 813, column 63 of dart:async/stream_impl.dart: """, x0 i s StreamSubscription<dynamic>, true));
481 return f == null ? null : c; 481 return f == null ? null : c;
482 } 482 }
483 , onListenHandler, __t144, __t130, "Wrap", """line 813, column 63 of dart:async/ stream_impl.dart: """, onListenHandler is __t130)), _onCancelHandler = Zone.curr ent.registerUnaryCallback(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u146 )) { 483 , onListenHandler, __t133, __t119, "Wrap", """line 813, column 63 of dart:async/ stream_impl.dart: """, onListenHandler is __t119)), _onCancelHandler = Zone.curr ent.registerUnaryCallback(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u135 )) {
484 void c(StreamSubscription<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type ((StreamSubscription<dynamic> _) { 484 void c(StreamSubscription<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type ((StreamSubscription<dynamic> _) {
485 } 485 }
486 ), "CastParam", """line 814, column 63 of dart:async/stream_impl.dart: """, x0 i s StreamSubscription<dynamic>, true)); 486 ), "CastParam", """line 814, column 63 of dart:async/stream_impl.dart: """, x0 i s StreamSubscription<dynamic>, true));
487 return f == null ? null : c; 487 return f == null ? null : c;
488 } 488 }
489 , onCancelHandler, __t144, __t130, "Wrap", """line 814, column 63 of dart:async/ stream_impl.dart: """, onCancelHandler is __t130)), _zone = Zone.current { 489 , onCancelHandler, __t133, __t119, "Wrap", """line 814, column 63 of dart:async/ stream_impl.dart: """, onCancelHandler is __t119)), _zone = Zone.current {
490 _controller = new _AsBroadcastStreamController<T>(_onListen, _onCancel); 490 _controller = new _AsBroadcastStreamController<T>(_onListen, _onCancel);
491 } 491 }
492 bool get isBroadcast => true; 492 bool get isBroadcast => true;
493 StreamSubscription<T> listen(void onData(T data), { 493 StreamSubscription<T> listen(void onData(T data), {
494 Function onError, void onDone(), bool cancelOnError} 494 Function onError, void onDone(), bool cancelOnError}
495 ) { 495 ) {
496 if (_controller == null || _controller.isClosed) { 496 if (_controller == null || _controller.isClosed) {
497 return new _DoneStreamSubscription<T>(onDone); 497 return new _DoneStreamSubscription<T>(onDone);
498 } 498 }
499 if (_subscription == null) { 499 if (_subscription == null) {
500 _subscription = _source.listen(_controller.add, onError: _controller.addError, o nDone: _controller.close); 500 _subscription = _source.listen(_controller.add, onError: _controller.addError, o nDone: _controller.close);
501 } 501 }
502 cancelOnError = identical(true, cancelOnError); 502 cancelOnError = identical(true, cancelOnError);
503 return _controller._subscribe(onData, onError, onDone, cancelOnError); 503 return _controller._subscribe(onData, onError, onDone, cancelOnError);
504 } 504 }
505 void _onCancel() { 505 void _onCancel() {
506 bool shutdown = (_controller == null) || _controller.isClosed; 506 bool shutdown = (_controller == null) || _controller.isClosed;
507 if (_onCancelHandler != null) { 507 if (_onCancelHandler != null) {
508 _zone.runUnary(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u147)) { 508 _zone.runUnary(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u136)) {
509 void c(StreamSubscription<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type ((StreamSubscription<dynamic> _) { 509 void c(StreamSubscription<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type ((StreamSubscription<dynamic> _) {
510 } 510 }
511 ), "CastParam", """line 842, column 22 of dart:async/stream_impl.dart: """, x0 i s StreamSubscription<dynamic>, true)); 511 ), "CastParam", """line 842, column 22 of dart:async/stream_impl.dart: """, x0 i s StreamSubscription<dynamic>, true));
512 return f == null ? null : c; 512 return f == null ? null : c;
513 } 513 }
514 , _onCancelHandler, __t144, __t130, "Wrap", """line 842, column 22 of dart:async /stream_impl.dart: """, _onCancelHandler is __t130), new _BroadcastSubscriptionW rapper(this)); 514 , _onCancelHandler, __t133, __t119, "Wrap", """line 842, column 22 of dart:async /stream_impl.dart: """, _onCancelHandler is __t119), new _BroadcastSubscriptionW rapper(this));
515 } 515 }
516 if (shutdown) { 516 if (shutdown) {
517 if (_subscription != null) { 517 if (_subscription != null) {
518 _subscription.cancel(); 518 _subscription.cancel();
519 _subscription = null; 519 _subscription = null;
520 } 520 }
521 } 521 }
522 } 522 }
523 void _onListen() { 523 void _onListen() {
524 if (_onListenHandler != null) { 524 if (_onListenHandler != null) {
525 _zone.runUnary(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u148)) { 525 _zone.runUnary(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u137)) {
526 void c(StreamSubscription<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type ((StreamSubscription<dynamic> _) { 526 void c(StreamSubscription<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type ((StreamSubscription<dynamic> _) {
527 } 527 }
528 ), "CastParam", """line 854, column 22 of dart:async/stream_impl.dart: """, x0 i s StreamSubscription<dynamic>, true)); 528 ), "CastParam", """line 854, column 22 of dart:async/stream_impl.dart: """, x0 i s StreamSubscription<dynamic>, true));
529 return f == null ? null : c; 529 return f == null ? null : c;
530 } 530 }
531 , _onListenHandler, __t144, __t130, "Wrap", """line 854, column 22 of dart:async /stream_impl.dart: """, _onListenHandler is __t130), new _BroadcastSubscriptionW rapper(this)); 531 , _onListenHandler, __t133, __t119, "Wrap", """line 854, column 22 of dart:async /stream_impl.dart: """, _onListenHandler is __t119), new _BroadcastSubscriptionW rapper(this));
532 } 532 }
533 } 533 }
534 void _cancelSubscription() { 534 void _cancelSubscription() {
535 if (_subscription == null) return; StreamSubscription subscription = _subscripti on; 535 if (_subscription == null) return; StreamSubscription subscription = _subscripti on;
536 _subscription = null; 536 _subscription = null;
537 _controller = null; 537 _controller = null;
538 subscription.cancel(); 538 subscription.cancel();
539 } 539 }
540 void _pauseSubscription(Future resumeSignal) { 540 void _pauseSubscription(Future resumeSignal) {
541 if (_subscription == null) return; _subscription.pause(resumeSignal); 541 if (_subscription == null) return; _subscription.pause(resumeSignal);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 throw new UnsupportedError("Cannot change handlers of asBroadcastStream source s ubscription."); 576 throw new UnsupportedError("Cannot change handlers of asBroadcastStream source s ubscription.");
577 } 577 }
578 } 578 }
579 class _StreamIteratorImpl<T> implements StreamIterator<T> {static const int _ST ATE_FOUND = 0; 579 class _StreamIteratorImpl<T> implements StreamIterator<T> {static const int _ST ATE_FOUND = 0;
580 static const int _STATE_DONE = 1; 580 static const int _STATE_DONE = 1;
581 static const int _STATE_MOVING = 2; 581 static const int _STATE_MOVING = 2;
582 static const int _STATE_EXTRA_DATA = 3; 582 static const int _STATE_EXTRA_DATA = 3;
583 static const int _STATE_EXTRA_ERROR = 4; 583 static const int _STATE_EXTRA_ERROR = 4;
584 static const int _STATE_EXTRA_DONE = 5; 584 static const int _STATE_EXTRA_DONE = 5;
585 StreamSubscription _subscription; 585 StreamSubscription _subscription;
586 T _current = ((__x149) => DDC$RT.cast(__x149, Null, T, "CastLiteral", """line 9 68, column 16 of dart:async/stream_impl.dart: """, __x149 is T, false))(null); 586 T _current = null;
587 var _futureOrPrefetch = null; 587 var _futureOrPrefetch = null;
588 int _state = _STATE_FOUND; 588 int _state = _STATE_FOUND;
589 _StreamIteratorImpl(final Stream<T> stream) { 589 _StreamIteratorImpl(final Stream<T> stream) {
590 _subscription = stream.listen(_onData, onError: _onError, onDone: _onDone, cance lOnError: true); 590 _subscription = stream.listen(_onData, onError: _onError, onDone: _onDone, cance lOnError: true);
591 } 591 }
592 T get current => _current; 592 T get current => _current;
593 Future<bool> moveNext() { 593 Future<bool> moveNext() {
594 if (_state == _STATE_DONE) { 594 if (_state == _STATE_DONE) {
595 return new _Future<bool>.immediate(false); 595 return new _Future<bool>.immediate(false);
596 } 596 }
597 if (_state == _STATE_MOVING) { 597 if (_state == _STATE_MOVING) {
598 throw new StateError("Already waiting for next."); 598 throw new StateError("Already waiting for next.");
599 } 599 }
600 if (_state == _STATE_FOUND) { 600 if (_state == _STATE_FOUND) {
601 _state = _STATE_MOVING; 601 _state = _STATE_MOVING;
602 _current = ((__x150) => DDC$RT.cast(__x150, Null, T, "CastLiteral", """line 998 , column 18 of dart:async/stream_impl.dart: """, __x150 is T, false))(null); 602 _current = null;
603 _futureOrPrefetch = new _Future<bool>(); 603 _futureOrPrefetch = new _Future<bool>();
604 return DDC$RT.cast(_futureOrPrefetch, dynamic, DDC$RT.type((Future<bool> _) { 604 return DDC$RT.cast(_futureOrPrefetch, dynamic, DDC$RT.type((Future<bool> _) {
605 } 605 }
606 ), "CastGeneral", """line 1000, column 14 of dart:async/stream_impl.dart: """, _ futureOrPrefetch is Future<bool>, false); 606 ), "CastGeneral", """line 1000, column 14 of dart:async/stream_impl.dart: """, _ futureOrPrefetch is Future<bool>, false);
607 } 607 }
608 else { 608 else {
609 assert (_state >= _STATE_EXTRA_DATA); switch (_state) {case _STATE_EXTRA_DATA: _ state = _STATE_FOUND; 609 assert (_state >= _STATE_EXTRA_DATA); switch (_state) {case _STATE_EXTRA_DATA: _ state = _STATE_FOUND;
610 _current = DDC$RT.cast(_futureOrPrefetch, dynamic, T, "CastGeneral", """line 10 06, column 22 of dart:async/stream_impl.dart: """, _futureOrPrefetch is T, false ); 610 _current = DDC$RT.cast(_futureOrPrefetch, dynamic, T, "CastGeneral", """line 10 06, column 22 of dart:async/stream_impl.dart: """, _futureOrPrefetch is T, false );
611 _futureOrPrefetch = null; 611 _futureOrPrefetch = null;
612 _subscription.resume(); 612 _subscription.resume();
613 return new _Future<bool>.immediate(true); 613 return new _Future<bool>.immediate(true);
614 case _STATE_EXTRA_ERROR: AsyncError prefetch = DDC$RT.cast(_futureOrPrefetch, d ynamic, AsyncError, "CastGeneral", """line 1011, column 33 of dart:async/stream_ impl.dart: """, _futureOrPrefetch is AsyncError, true); 614 case _STATE_EXTRA_ERROR: AsyncError prefetch = DDC$RT.cast(_futureOrPrefetch, d ynamic, AsyncError, "CastGeneral", """line 1011, column 33 of dart:async/stream_ impl.dart: """, _futureOrPrefetch is AsyncError, true);
615 _clear(); 615 _clear();
616 return new _Future<bool>.immediateError(prefetch.error, prefetch.stackTrace); 616 return new _Future<bool>.immediateError(prefetch.error, prefetch.stackTrace);
617 case _STATE_EXTRA_DONE: _clear(); 617 case _STATE_EXTRA_DONE: _clear();
618 return new _Future<bool>.immediate(false); 618 return new _Future<bool>.immediate(false);
619 } 619 }
620 } 620 }
621 } 621 }
622 void _clear() { 622 void _clear() {
623 _subscription = null; 623 _subscription = null;
624 _futureOrPrefetch = null; 624 _futureOrPrefetch = null;
625 _current = ((__x151) => DDC$RT.cast(__x151, Null, T, "CastLiteral", """line 102 6, column 16 of dart:async/stream_impl.dart: """, __x151 is T, false))(null); 625 _current = null;
626 _state = _STATE_DONE; 626 _state = _STATE_DONE;
627 } 627 }
628 Future cancel() { 628 Future cancel() {
629 StreamSubscription subscription = _subscription; 629 StreamSubscription subscription = _subscription;
630 if (_state == _STATE_MOVING) { 630 if (_state == _STATE_MOVING) {
631 _Future<bool> hasNext = DDC$RT.cast(_futureOrPrefetch, dynamic, DDC$RT.type((_Fu ture<bool> _) { 631 _Future<bool> hasNext = DDC$RT.cast(_futureOrPrefetch, dynamic, DDC$RT.type((_Fu ture<bool> _) {
632 } 632 }
633 ), "CastGeneral", """line 1033, column 31 of dart:async/stream_impl.dart: """, _ futureOrPrefetch is _Future<bool>, false); 633 ), "CastGeneral", """line 1033, column 31 of dart:async/stream_impl.dart: """, _ futureOrPrefetch is _Future<bool>, false);
634 _clear(); 634 _clear();
635 hasNext._complete(false); 635 hasNext._complete(false);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 } 671 }
672 ), "CastGeneral", """line 1073, column 31 of dart:async/stream_impl.dart: """, _ futureOrPrefetch is _Future<bool>, false); 672 ), "CastGeneral", """line 1073, column 31 of dart:async/stream_impl.dart: """, _ futureOrPrefetch is _Future<bool>, false);
673 _clear(); 673 _clear();
674 hasNext._complete(false); 674 hasNext._complete(false);
675 return;} 675 return;}
676 _subscription.pause(); 676 _subscription.pause();
677 _futureOrPrefetch = null; 677 _futureOrPrefetch = null;
678 _state = _STATE_EXTRA_DONE; 678 _state = _STATE_EXTRA_DONE;
679 } 679 }
680 } 680 }
681 typedef dynamic __t130(dynamic __u131); 681 typedef dynamic __t119(dynamic __u120);
682 typedef void __t132<T>(T __u133); 682 typedef void __t121<T>(T __u122);
683 typedef dynamic __t135(dynamic __u136, dynamic __u137); 683 typedef dynamic __t124(dynamic __u125, dynamic __u126);
684 typedef void __t139(dynamic __u140); 684 typedef void __t128(dynamic __u129);
685 typedef void __t141<T>(T __u142); 685 typedef void __t130<T>(T __u131);
686 typedef void __t144(StreamSubscription<dynamic> __u145); 686 typedef void __t133(StreamSubscription<dynamic> __u134);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698