| OLD | NEW |
| 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 Loading... |
| 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 __u99)) { | 45 _onData = _zone.registerUnaryCallback(DDC$RT.wrap((void f(T __u129)) { |
| 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((__t102<T> _) { | 49 , handleData, DDC$RT.type((__t132<T> _) { |
| 50 } | 50 } |
| 51 ), __t100, "Wrap", """line 154, column 43 of dart:async/stream_impl.dart: """, h
andleData is __t100)); | 51 ), __t130, "Wrap", """line 154, column 43 of dart:async/stream_impl.dart: """, h
andleData is __t130)); |
| 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 Loading... |
| 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 __u104)) { | 173 _zone.runUnaryGuarded(DDC$RT.wrap((void f(T __u134)) { |
| 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((__t102<T> _) { | 177 , _onData, DDC$RT.type((__t132<T> _) { |
| 178 } | 178 } |
| 179 ), __t100, "Wrap", """line 341, column 27 of dart:async/stream_impl.dart: """, _
onData is __t100), data); | 179 ), __t130, "Wrap", """line 341, column 27 of dart:async/stream_impl.dart: """, _
onData is __t130), 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, __t105, "CastGeneral",
"""line 358, column 32 of dart:async/stream_impl.dart: """, _onError is __t105,
false), error, stackTrace); | 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); |
| 189 } | 189 } |
| 190 else { | 190 else { |
| 191 _zone.runUnaryGuarded(DDC$RT.cast(_onError, Function, __t100, "CastGeneral", "
""line 360, column 31 of dart:async/stream_impl.dart: """, _onError is __t100, f
alse), error); | 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); |
| 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 Loading... |
| 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(onData, onError, onDone, cancelOnError)
.._setPendingEvents(_pending()); | 285 return new _BufferingStreamSubscription(DDC$RT.wrap((void f(T __u138)) { |
| 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; |
| 288 } |
| 289 , onData, DDC$RT.type((__t141<T> _) { |
| 290 } |
| 291 ), __t139, "Wrap", """line 516, column 9 of dart:async/stream_impl.dart: """, on
Data is __t139), onError, onDone, cancelOnError).._setPendingEvents(_pending()); |
| 286 } | 292 } |
| 287 } | 293 } |
| 288 class _IterablePendingEvents<T> extends _PendingEvents {Iterator<T> _iterator; | 294 class _IterablePendingEvents<T> extends _PendingEvents {Iterator<T> _iterator; |
| 289 _IterablePendingEvents(Iterable<T> data) : _iterator = data.iterator; | 295 _IterablePendingEvents(Iterable<T> data) : _iterator = data.iterator; |
| 290 bool get isEmpty => _iterator == null; | 296 bool get isEmpty => _iterator == null; |
| 291 void handleNext(_EventDispatch dispatch) { | 297 void handleNext(_EventDispatch dispatch) { |
| 292 if (_iterator == null) { | 298 if (_iterator == null) { |
| 293 throw new StateError("No events pending."); | 299 throw new StateError("No events pending."); |
| 294 } | 300 } |
| 295 bool isDone; | 301 bool isDone; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 if (isPaused) return; _state |= _DONE_SENT; | 467 if (isPaused) return; _state |= _DONE_SENT; |
| 462 if (_onDone != null) _zone.runGuarded(_onDone); | 468 if (_onDone != null) _zone.runGuarded(_onDone); |
| 463 } | 469 } |
| 464 } | 470 } |
| 465 class _AsBroadcastStream<T> extends Stream<T> {final Stream<T> _source; | 471 class _AsBroadcastStream<T> extends Stream<T> {final Stream<T> _source; |
| 466 final _broadcastCallback _onListenHandler; | 472 final _broadcastCallback _onListenHandler; |
| 467 final _broadcastCallback _onCancelHandler; | 473 final _broadcastCallback _onCancelHandler; |
| 468 final Zone _zone; | 474 final Zone _zone; |
| 469 _AsBroadcastStreamController<T> _controller; | 475 _AsBroadcastStreamController<T> _controller; |
| 470 StreamSubscription<T> _subscription; | 476 StreamSubscription<T> _subscription; |
| 471 _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> __u108)) { | 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)) { |
| 472 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> _) { |
| 473 } | 479 } |
| 474 ), "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)); |
| 475 return f == null ? null : c; | 481 return f == null ? null : c; |
| 476 } | 482 } |
| 477 , onListenHandler, __t109, __t100, "Wrap", """line 813, column 63 of dart:async/
stream_impl.dart: """, onListenHandler is __t100)), _onCancelHandler = Zone.curr
ent.registerUnaryCallback(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u111
)) { | 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
)) { |
| 478 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> _) { |
| 479 } | 485 } |
| 480 ), "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)); |
| 481 return f == null ? null : c; | 487 return f == null ? null : c; |
| 482 } | 488 } |
| 483 , onCancelHandler, __t109, __t100, "Wrap", """line 814, column 63 of dart:async/
stream_impl.dart: """, onCancelHandler is __t100)), _zone = Zone.current { | 489 , onCancelHandler, __t144, __t130, "Wrap", """line 814, column 63 of dart:async/
stream_impl.dart: """, onCancelHandler is __t130)), _zone = Zone.current { |
| 484 _controller = new _AsBroadcastStreamController<T>(_onListen, _onCancel); | 490 _controller = new _AsBroadcastStreamController<T>(_onListen, _onCancel); |
| 485 } | 491 } |
| 486 bool get isBroadcast => true; | 492 bool get isBroadcast => true; |
| 487 StreamSubscription<T> listen(void onData(T data), { | 493 StreamSubscription<T> listen(void onData(T data), { |
| 488 Function onError, void onDone(), bool cancelOnError} | 494 Function onError, void onDone(), bool cancelOnError} |
| 489 ) { | 495 ) { |
| 490 if (_controller == null || _controller.isClosed) { | 496 if (_controller == null || _controller.isClosed) { |
| 491 return new _DoneStreamSubscription<T>(onDone); | 497 return new _DoneStreamSubscription<T>(onDone); |
| 492 } | 498 } |
| 493 if (_subscription == null) { | 499 if (_subscription == null) { |
| 494 _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); |
| 495 } | 501 } |
| 496 cancelOnError = identical(true, cancelOnError); | 502 cancelOnError = identical(true, cancelOnError); |
| 497 return _controller._subscribe(onData, onError, onDone, cancelOnError); | 503 return _controller._subscribe(onData, onError, onDone, cancelOnError); |
| 498 } | 504 } |
| 499 void _onCancel() { | 505 void _onCancel() { |
| 500 bool shutdown = (_controller == null) || _controller.isClosed; | 506 bool shutdown = (_controller == null) || _controller.isClosed; |
| 501 if (_onCancelHandler != null) { | 507 if (_onCancelHandler != null) { |
| 502 _zone.runUnary(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u112)) { | 508 _zone.runUnary(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u147)) { |
| 503 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> _) { |
| 504 } | 510 } |
| 505 ), "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)); |
| 506 return f == null ? null : c; | 512 return f == null ? null : c; |
| 507 } | 513 } |
| 508 , _onCancelHandler, __t109, __t100, "Wrap", """line 842, column 22 of dart:async
/stream_impl.dart: """, _onCancelHandler is __t100), new _BroadcastSubscriptionW
rapper(this)); | 514 , _onCancelHandler, __t144, __t130, "Wrap", """line 842, column 22 of dart:async
/stream_impl.dart: """, _onCancelHandler is __t130), new _BroadcastSubscriptionW
rapper(this)); |
| 509 } | 515 } |
| 510 if (shutdown) { | 516 if (shutdown) { |
| 511 if (_subscription != null) { | 517 if (_subscription != null) { |
| 512 _subscription.cancel(); | 518 _subscription.cancel(); |
| 513 _subscription = null; | 519 _subscription = null; |
| 514 } | 520 } |
| 515 } | 521 } |
| 516 } | 522 } |
| 517 void _onListen() { | 523 void _onListen() { |
| 518 if (_onListenHandler != null) { | 524 if (_onListenHandler != null) { |
| 519 _zone.runUnary(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u113)) { | 525 _zone.runUnary(DDC$RT.wrap((void f(StreamSubscription<dynamic> __u148)) { |
| 520 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> _) { |
| 521 } | 527 } |
| 522 ), "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)); |
| 523 return f == null ? null : c; | 529 return f == null ? null : c; |
| 524 } | 530 } |
| 525 , _onListenHandler, __t109, __t100, "Wrap", """line 854, column 22 of dart:async
/stream_impl.dart: """, _onListenHandler is __t100), new _BroadcastSubscriptionW
rapper(this)); | 531 , _onListenHandler, __t144, __t130, "Wrap", """line 854, column 22 of dart:async
/stream_impl.dart: """, _onListenHandler is __t130), new _BroadcastSubscriptionW
rapper(this)); |
| 526 } | 532 } |
| 527 } | 533 } |
| 528 void _cancelSubscription() { | 534 void _cancelSubscription() { |
| 529 if (_subscription == null) return; StreamSubscription subscription = _subscripti
on; | 535 if (_subscription == null) return; StreamSubscription subscription = _subscripti
on; |
| 530 _subscription = null; | 536 _subscription = null; |
| 531 _controller = null; | 537 _controller = null; |
| 532 subscription.cancel(); | 538 subscription.cancel(); |
| 533 } | 539 } |
| 534 void _pauseSubscription(Future resumeSignal) { | 540 void _pauseSubscription(Future resumeSignal) { |
| 535 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 Loading... |
| 570 throw new UnsupportedError("Cannot change handlers of asBroadcastStream source s
ubscription."); | 576 throw new UnsupportedError("Cannot change handlers of asBroadcastStream source s
ubscription."); |
| 571 } | 577 } |
| 572 } | 578 } |
| 573 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; |
| 574 static const int _STATE_DONE = 1; | 580 static const int _STATE_DONE = 1; |
| 575 static const int _STATE_MOVING = 2; | 581 static const int _STATE_MOVING = 2; |
| 576 static const int _STATE_EXTRA_DATA = 3; | 582 static const int _STATE_EXTRA_DATA = 3; |
| 577 static const int _STATE_EXTRA_ERROR = 4; | 583 static const int _STATE_EXTRA_ERROR = 4; |
| 578 static const int _STATE_EXTRA_DONE = 5; | 584 static const int _STATE_EXTRA_DONE = 5; |
| 579 StreamSubscription _subscription; | 585 StreamSubscription _subscription; |
| 580 T _current = ((__x114) => DDC$RT.cast(__x114, Null, T, "CastLiteral", """line 9
68, column 16 of dart:async/stream_impl.dart: """, __x114 is T, false))(null); | 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); |
| 581 var _futureOrPrefetch = null; | 587 var _futureOrPrefetch = null; |
| 582 int _state = _STATE_FOUND; | 588 int _state = _STATE_FOUND; |
| 583 _StreamIteratorImpl(final Stream<T> stream) { | 589 _StreamIteratorImpl(final Stream<T> stream) { |
| 584 _subscription = stream.listen(_onData, onError: _onError, onDone: _onDone, cance
lOnError: true); | 590 _subscription = stream.listen(_onData, onError: _onError, onDone: _onDone, cance
lOnError: true); |
| 585 } | 591 } |
| 586 T get current => _current; | 592 T get current => _current; |
| 587 Future<bool> moveNext() { | 593 Future<bool> moveNext() { |
| 588 if (_state == _STATE_DONE) { | 594 if (_state == _STATE_DONE) { |
| 589 return new _Future<bool>.immediate(false); | 595 return new _Future<bool>.immediate(false); |
| 590 } | 596 } |
| 591 if (_state == _STATE_MOVING) { | 597 if (_state == _STATE_MOVING) { |
| 592 throw new StateError("Already waiting for next."); | 598 throw new StateError("Already waiting for next."); |
| 593 } | 599 } |
| 594 if (_state == _STATE_FOUND) { | 600 if (_state == _STATE_FOUND) { |
| 595 _state = _STATE_MOVING; | 601 _state = _STATE_MOVING; |
| 596 _current = ((__x115) => DDC$RT.cast(__x115, Null, T, "CastLiteral", """line 998
, column 18 of dart:async/stream_impl.dart: """, __x115 is T, false))(null); | 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); |
| 597 _futureOrPrefetch = new _Future<bool>(); | 603 _futureOrPrefetch = new _Future<bool>(); |
| 598 return DDC$RT.cast(_futureOrPrefetch, dynamic, DDC$RT.type((Future<bool> _) { | 604 return DDC$RT.cast(_futureOrPrefetch, dynamic, DDC$RT.type((Future<bool> _) { |
| 599 } | 605 } |
| 600 ), "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); |
| 601 } | 607 } |
| 602 else { | 608 else { |
| 603 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; |
| 604 _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
); |
| 605 _futureOrPrefetch = null; | 611 _futureOrPrefetch = null; |
| 606 _subscription.resume(); | 612 _subscription.resume(); |
| 607 return new _Future<bool>.immediate(true); | 613 return new _Future<bool>.immediate(true); |
| 608 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); |
| 609 _clear(); | 615 _clear(); |
| 610 return new _Future<bool>.immediateError(prefetch.error, prefetch.stackTrace); | 616 return new _Future<bool>.immediateError(prefetch.error, prefetch.stackTrace); |
| 611 case _STATE_EXTRA_DONE: _clear(); | 617 case _STATE_EXTRA_DONE: _clear(); |
| 612 return new _Future<bool>.immediate(false); | 618 return new _Future<bool>.immediate(false); |
| 613 } | 619 } |
| 614 } | 620 } |
| 615 } | 621 } |
| 616 void _clear() { | 622 void _clear() { |
| 617 _subscription = null; | 623 _subscription = null; |
| 618 _futureOrPrefetch = null; | 624 _futureOrPrefetch = null; |
| 619 _current = ((__x116) => DDC$RT.cast(__x116, Null, T, "CastLiteral", """line 102
6, column 16 of dart:async/stream_impl.dart: """, __x116 is T, false))(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); |
| 620 _state = _STATE_DONE; | 626 _state = _STATE_DONE; |
| 621 } | 627 } |
| 622 Future cancel() { | 628 Future cancel() { |
| 623 StreamSubscription subscription = _subscription; | 629 StreamSubscription subscription = _subscription; |
| 624 if (_state == _STATE_MOVING) { | 630 if (_state == _STATE_MOVING) { |
| 625 _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> _) { |
| 626 } | 632 } |
| 627 ), "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); |
| 628 _clear(); | 634 _clear(); |
| 629 hasNext._complete(false); | 635 hasNext._complete(false); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 } | 671 } |
| 666 ), "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); |
| 667 _clear(); | 673 _clear(); |
| 668 hasNext._complete(false); | 674 hasNext._complete(false); |
| 669 return;} | 675 return;} |
| 670 _subscription.pause(); | 676 _subscription.pause(); |
| 671 _futureOrPrefetch = null; | 677 _futureOrPrefetch = null; |
| 672 _state = _STATE_EXTRA_DONE; | 678 _state = _STATE_EXTRA_DONE; |
| 673 } | 679 } |
| 674 } | 680 } |
| 675 typedef dynamic __t100(dynamic __u101); | 681 typedef dynamic __t130(dynamic __u131); |
| 676 typedef void __t102<T>(T __u103); | 682 typedef void __t132<T>(T __u133); |
| 677 typedef dynamic __t105(dynamic __u106, dynamic __u107); | 683 typedef dynamic __t135(dynamic __u136, dynamic __u137); |
| 678 typedef void __t109(StreamSubscription<dynamic> __u110); | 684 typedef void __t139(dynamic __u140); |
| 685 typedef void __t141<T>(T __u142); |
| 686 typedef void __t144(StreamSubscription<dynamic> __u145); |
| OLD | NEW |