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

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

Issue 1038213003: Downward inference (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Rebase 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 class _BroadcastStream<T> extends _ControllerStream<T> {_BroadcastStream(_Strea mControllerLifecycle controller) : super(DEVC$RT.cast(controller, DEVC$RT.type(( _StreamControllerLifecycle<dynamic> _) { 2 class _BroadcastStream<T> extends _ControllerStream<T> {_BroadcastStream(_Strea mControllerLifecycle controller) : super(DEVC$RT.cast(controller, DEVC$RT.type(( _StreamControllerLifecycle<dynamic> _) {
3 } 3 }
4 ), DEVC$RT.type((_StreamControllerLifecycle<T> _) { 4 ), DEVC$RT.type((_StreamControllerLifecycle<T> _) {
5 } 5 }
6 ), "CompositeCast", """line 8, column 67 of dart:async/broadcast_stream_controll er.dart: """, controller is _StreamControllerLifecycle<T>, false)); 6 ), "CompositeCast", """line 8, column 67 of dart:async/broadcast_stream_controll er.dart: """, controller is _StreamControllerLifecycle<T>, false));
7 bool get isBroadcast => true; 7 bool get isBroadcast => true;
8 } 8 }
9 abstract class _BroadcastSubscriptionLink {_BroadcastSubscriptionLink _next; 9 abstract class _BroadcastSubscriptionLink {_BroadcastSubscriptionLink _next;
10 _BroadcastSubscriptionLink _previous; 10 _BroadcastSubscriptionLink _previous;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 Future doneFuture = _ensureDoneFuture(); 152 Future doneFuture = _ensureDoneFuture();
153 _sendDone(); 153 _sendDone();
154 return doneFuture; 154 return doneFuture;
155 } 155 }
156 Future get done => _ensureDoneFuture(); 156 Future get done => _ensureDoneFuture();
157 Future addStream(Stream<T> stream, { 157 Future addStream(Stream<T> stream, {
158 bool cancelOnError : true} 158 bool cancelOnError : true}
159 ) { 159 ) {
160 if (!_mayAddEvent) throw _addEventError(); 160 if (!_mayAddEvent) throw _addEventError();
161 _state |= _STATE_ADDSTREAM; 161 _state |= _STATE_ADDSTREAM;
162 _addStreamState = ((__x3) => DEVC$RT.cast(__x3, DEVC$RT.type((_AddStreamState<d ynamic> _) { 162 _addStreamState = new _AddStreamState<T>(this, stream, cancelOnError);
163 }
164 ), DEVC$RT.type((_AddStreamState<T> _) {
165 }
166 ), "InferableAllocation", """line 268, column 23 of dart:async/broadcast_stream_ controller.dart: """, __x3 is _AddStreamState<T>, false))(new _AddStreamState(th is, stream, cancelOnError));
167 return _addStreamState.addStreamFuture; 163 return _addStreamState.addStreamFuture;
168 } 164 }
169 void _add(T data) { 165 void _add(T data) {
170 _sendData(data); 166 _sendData(data);
171 } 167 }
172 void _addError(Object error, StackTrace stackTrace) { 168 void _addError(Object error, StackTrace stackTrace) {
173 _sendError(error, stackTrace); 169 _sendError(error, stackTrace);
174 } 170 }
175 void _close() { 171 void _close() {
176 assert (_isAddingStream); _AddStreamState addState = _addStreamState; 172 assert (_isAddingStream); _AddStreamState addState = _addStreamState;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 ); 230 );
235 } 231 }
236 void _sendError(Object error, StackTrace stackTrace) { 232 void _sendError(Object error, StackTrace stackTrace) {
237 if (_isEmpty) return; _forEachListener((_BufferingStreamSubscription<T> subscrip tion) { 233 if (_isEmpty) return; _forEachListener((_BufferingStreamSubscription<T> subscrip tion) {
238 subscription._addError(error, stackTrace); 234 subscription._addError(error, stackTrace);
239 } 235 }
240 ); 236 );
241 } 237 }
242 void _sendDone() { 238 void _sendDone() {
243 if (!_isEmpty) { 239 if (!_isEmpty) {
244 _forEachListener(((__x9) => DEVC$RT.wrap((dynamic f(_BroadcastSubscription<T> __ u4)) { 240 _forEachListener(((__x8) => DEVC$RT.wrap((dynamic f(_BroadcastSubscription<T> __ u3)) {
245 dynamic c(_BroadcastSubscription<T> x0) => f(DEVC$RT.cast(x0, DEVC$RT.type((_Buf feringStreamSubscription<T> _) { 241 dynamic c(_BroadcastSubscription<T> x0) => f(DEVC$RT.cast(x0, DEVC$RT.type((_Buf feringStreamSubscription<T> _) {
246 } 242 }
247 ), DEVC$RT.type((_BroadcastSubscription<T> _) { 243 ), DEVC$RT.type((_BroadcastSubscription<T> _) {
248 } 244 }
249 ), "CastParam", """line 372, column 24 of dart:async/broadcast_stream_controller .dart: """, x0 is _BroadcastSubscription<T>, false)); 245 ), "CastParam", """line 372, column 24 of dart:async/broadcast_stream_controller .dart: """, x0 is _BroadcastSubscription<T>, false));
250 return f == null ? null : c; 246 return f == null ? null : c;
251 } 247 }
252 , __x9, DEVC$RT.type((__t7<T> _) { 248 , __x8, DEVC$RT.type((__t6<T> _) {
253 } 249 }
254 ), DEVC$RT.type((__t5<T> _) { 250 ), DEVC$RT.type((__t4<T> _) {
255 } 251 }
256 ), "WrapLiteral", """line 372, column 24 of dart:async/broadcast_stream_controll er.dart: """, __x9 is __t5<T>))((_BroadcastSubscription<T> subscription) { 252 ), "WrapLiteral", """line 372, column 24 of dart:async/broadcast_stream_controll er.dart: """, __x8 is __t4<T>))((_BroadcastSubscription<T> subscription) {
257 subscription._close(); 253 subscription._close();
258 } 254 }
259 )); 255 ));
260 } 256 }
261 else { 257 else {
262 assert (_doneFuture != null); assert (_doneFuture._mayComplete); _doneFuture._as yncComplete(null); 258 assert (_doneFuture != null); assert (_doneFuture._mayComplete); _doneFuture._as yncComplete(null);
263 } 259 }
264 } 260 }
265 } 261 }
266 class _AsyncBroadcastStreamController<T> extends _BroadcastStreamController<T> {_AsyncBroadcastStreamController(void onListen(), void onCancel()) : super(onLis ten, onCancel); 262 class _AsyncBroadcastStreamController<T> extends _BroadcastStreamController<T> {_AsyncBroadcastStreamController(void onListen(), void onCancel()) : super(onLis ten, onCancel);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 351 }
356 void _resume(_) { 352 void _resume(_) {
357 if (_pauseCount > 0) _pauseCount--; 353 if (_pauseCount > 0) _pauseCount--;
358 } 354 }
359 Future cancel() { 355 Future cancel() {
360 return new _Future.immediate(null); 356 return new _Future.immediate(null);
361 } 357 }
362 bool get isPaused => _pauseCount > 0; 358 bool get isPaused => _pauseCount > 0;
363 Future asFuture([Object value]) => new _Future(); 359 Future asFuture([Object value]) => new _Future();
364 } 360 }
365 typedef void __t5<T>(_BufferingStreamSubscription<T> __u6); 361 typedef void __t4<T>(_BufferingStreamSubscription<T> __u5);
366 typedef dynamic __t7<T>(_BroadcastSubscription<T> __u8); 362 typedef dynamic __t6<T>(_BroadcastSubscription<T> __u7);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/_internal/iterable.dart ('k') | test/dart_codegen/expect/async/future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698