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

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

Issue 1096583002: Reifier hookup (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Address comments 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
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 23 matching lines...) Expand all
34 _state |= _STATE_HAS_PENDING; 34 _state |= _STATE_HAS_PENDING;
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 = DEVC$RT.cast(_nullDataHandler, __t51, DEVC$ RT.type((__t49<T> _) { 44 if (handleData == null) handleData = DEVC$RT.cast(_nullDataHandler, __CastType51 , DEVC$RT.type((__CastType49<T> _) {
45 } 45 }
46 ), "CompositeCast", """line 153, column 42 of dart:async/stream_impl.dart: """, _nullDataHandler is __t49<T>, false); 46 ), "CompositeCast", """line 153, column 42 of dart:async/stream_impl.dart: """, _nullDataHandler is __CastType49<T>, false);
47 _onData = ((__x53) => DEVC$RT.cast(__x53, ZoneUnaryCallback, DEVC$RT.type((_Dat aHandler<T> _) { 47 _onData = ((__x53) => DEVC$RT.cast(__x53, ZoneUnaryCallback, DEVC$RT.type((_Dat aHandler<T> _) {
48 } 48 }
49 ), "CompositeCast", """line 154, column 15 of dart:async/stream_impl.dart: """, __x53 is _DataHandler<T>, false))(_zone.registerUnaryCallback(handleData)); 49 ), "CompositeCast", """line 154, column 15 of dart:async/stream_impl.dart: """, __x53 is _DataHandler<T>, false))(_zone.registerUnaryCallback(handleData));
50 } 50 }
51 void onError(Function handleError) { 51 void onError(Function handleError) {
52 if (handleError == null) handleError = _nullErrorHandler; 52 if (handleError == null) handleError = _nullErrorHandler;
53 _onError = _registerErrorHandler(handleError, _zone); 53 _onError = _registerErrorHandler(handleError, _zone);
54 } 54 }
55 void onDone(void handleDone()) { 55 void onDone(void handleDone()) {
56 if (handleDone == null) handleDone = _nullDoneHandler; 56 if (handleDone == null) handleDone = _nullDoneHandler;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 _state |= _STATE_IN_CALLBACK; 170 _state |= _STATE_IN_CALLBACK;
171 _zone.runUnaryGuarded(_onData, data); 171 _zone.runUnaryGuarded(_onData, data);
172 _state &= ~_STATE_IN_CALLBACK; 172 _state &= ~_STATE_IN_CALLBACK;
173 _checkState(wasInputPaused); 173 _checkState(wasInputPaused);
174 } 174 }
175 void _sendError(var error, StackTrace stackTrace) { 175 void _sendError(var error, StackTrace stackTrace) {
176 assert (!_isCanceled); assert (!_isPaused); assert (!_inCallback); bool wasInput Paused = _isInputPaused; 176 assert (!_isCanceled); assert (!_isPaused); assert (!_inCallback); bool wasInput Paused = _isInputPaused;
177 void sendError() { 177 void sendError() {
178 if (_isCanceled && !_waitsForCancel) return; _state |= _STATE_IN_CALLBACK; 178 if (_isCanceled && !_waitsForCancel) return; _state |= _STATE_IN_CALLBACK;
179 if (_onError is ZoneBinaryCallback) { 179 if (_onError is ZoneBinaryCallback) {
180 _zone.runBinaryGuarded(DEVC$RT.cast(_onError, Function, __t54, "ImplicitCast", """line 358, column 32 of dart:async/stream_impl.dart: """, _onError is __t54, true), error, stackTrace); 180 _zone.runBinaryGuarded(DEVC$RT.cast(_onError, Function, __CastType54, "Implici tCast", """line 358, column 32 of dart:async/stream_impl.dart: """, _onError is __CastType54, true), error, stackTrace);
181 } 181 }
182 else { 182 else {
183 _zone.runUnaryGuarded(DEVC$RT.cast(_onError, Function, __t57, "ImplicitCast", """line 360, column 31 of dart:async/stream_impl.dart: """, _onError is __t57, t rue), error); 183 _zone.runUnaryGuarded(DEVC$RT.cast(_onError, Function, __CastType57, "Implicit Cast", """line 360, column 31 of dart:async/stream_impl.dart: """, _onError is _ _CastType57, true), error);
184 } 184 }
185 _state &= ~_STATE_IN_CALLBACK; 185 _state &= ~_STATE_IN_CALLBACK;
186 } 186 }
187 if (_cancelOnError) { 187 if (_cancelOnError) {
188 _state |= _STATE_WAIT_FOR_CANCEL; 188 _state |= _STATE_WAIT_FOR_CANCEL;
189 _cancel(); 189 _cancel();
190 if (_cancelFuture is Future) { 190 if (_cancelFuture is Future) {
191 _cancelFuture.whenComplete(sendError); 191 _cancelFuture.whenComplete(sendError);
192 } 192 }
193 else { 193 else {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 } 633 }
634 ), "CompositeCast", """line 1073, column 31 of dart:async/stream_impl.dart: """, _futureOrPrefetch is _Future<bool>, false); 634 ), "CompositeCast", """line 1073, column 31 of dart:async/stream_impl.dart: """, _futureOrPrefetch is _Future<bool>, false);
635 _clear(); 635 _clear();
636 hasNext._complete(false); 636 hasNext._complete(false);
637 return;} 637 return;}
638 _subscription.pause(); 638 _subscription.pause();
639 _futureOrPrefetch = null; 639 _futureOrPrefetch = null;
640 _state = _STATE_EXTRA_DONE; 640 _state = _STATE_EXTRA_DONE;
641 } 641 }
642 } 642 }
643 typedef void __t49<T>(T __u50); 643 typedef void __CastType49<T>(T __u50);
644 typedef void __t51(dynamic __u52); 644 typedef void __CastType51(dynamic __u52);
645 typedef dynamic __t54(dynamic __u55, dynamic __u56); 645 typedef dynamic __CastType54(dynamic __u55, dynamic __u56);
646 typedef dynamic __t57(dynamic __u58); 646 typedef dynamic __CastType57(dynamic __u58);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/async/stream.dart ('k') | test/dart_codegen/expect/async/stream_transformers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698