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

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

Issue 1021273004: Allow arity checks on dynamic function types (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 _state |= _STATE_IN_CALLBACK; 178 _state |= _STATE_IN_CALLBACK;
179 _zone.runUnaryGuarded(_onData, data); 179 _zone.runUnaryGuarded(_onData, 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(DEVC$RT.cast(_onError, Function, __t95, "CastGeneral", """line 358, column 32 of dart:async/stream_impl.dart: """, _onError is __t95, f alse), error, stackTrace); 188 _zone.runBinaryGuarded(DEVC$RT.cast(_onError, Function, __t95, "CastGeneral", """line 358, column 32 of dart:async/stream_impl.dart: """, _onError is __t95, t rue), error, stackTrace);
189 } 189 }
190 else { 190 else {
191 _zone.runUnaryGuarded(DEVC$RT.cast(_onError, Function, __t92, "CastGeneral", " ""line 360, column 31 of dart:async/stream_impl.dart: """, _onError is __t92, fa lse), error); 191 _zone.runUnaryGuarded(DEVC$RT.cast(_onError, Function, __t92, "CastGeneral", " ""line 360, column 31 of dart:async/stream_impl.dart: """, _onError is __t92, tr ue), 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 _subscription.pause(); 654 _subscription.pause();
655 _futureOrPrefetch = null; 655 _futureOrPrefetch = null;
656 _state = _STATE_EXTRA_DONE; 656 _state = _STATE_EXTRA_DONE;
657 } 657 }
658 } 658 }
659 typedef void __t87<T>(T __u88); 659 typedef void __t87<T>(T __u88);
660 typedef void __t89(dynamic __u90); 660 typedef void __t89(dynamic __u90);
661 typedef dynamic __t92(dynamic __u93); 661 typedef dynamic __t92(dynamic __u93);
662 typedef dynamic __t95(dynamic __u96, dynamic __u97); 662 typedef dynamic __t95(dynamic __u96, dynamic __u97);
663 typedef void __t99(StreamSubscription<dynamic> __u100); 663 typedef void __t99(StreamSubscription<dynamic> __u100);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698