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

Side by Side Diff: test/dart_codegen/expect/async/stream.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 Stream<T> {Stream(); 2 abstract class Stream<T> {Stream();
3 factory Stream.fromFuture(Future<T> future) { 3 factory Stream.fromFuture(Future<T> future) {
4 _StreamController<T> controller = ((__x37) => DDC$RT.cast(__x37, DDC$RT.type(( StreamController<T> _) { 4 _StreamController<T> controller = ((__x37) => DDC$RT.cast(__x37, DDC$RT.type(( StreamController<T> _) {
5 } 5 }
6 ), DDC$RT.type((_StreamController<T> _) { 6 ), DDC$RT.type((_StreamController<T> _) {
7 } 7 }
8 ), "CastExact", """line 87, column 39 of dart:async/stream.dart: """, __x37 is _StreamController<T>, false))(new StreamController<T>(sync: true)); 8 ), "CastExact", """line 87, column 39 of dart:async/stream.dart: """, __x37 is _StreamController<T>, false))(new StreamController<T>(sync: true));
9 future.then((value) { 9 future.then((value) {
10 controller._add(DDC$RT.cast(value, dynamic, T, "CastGeneral", """line 89, co lumn 25 of dart:async/stream.dart: """, value is T, false)); 10 controller._add(DDC$RT.cast(value, dynamic, T, "CastGeneral", """line 89, co lumn 25 of dart:async/stream.dart: """, value is T, false));
11 controller._closeUnchecked(); 11 controller._closeUnchecked();
12 } 12 }
13 , onError: (error, stackTrace) { 13 , onError: (error, stackTrace) {
14 controller._addError(error, DDC$RT.cast(stackTrace, dynamic, StackTrace, "Ca stGeneral", """line 93, column 37 of dart:async/stream.dart: """, stackTrace is StackTrace, true)); 14 controller._addError(error, DDC$RT.cast(stackTrace, dynamic, StackTrace, "Ca stGeneral", """line 93, column 37 of dart:async/stream.dart: """, stackTrace is StackTrace, true));
15 controller._closeUnchecked(); 15 controller._closeUnchecked();
16 } 16 }
17 ); 17 );
18 return controller.stream; 18 return controller.stream;
19 } 19 }
20 factory Stream.fromIterable(Iterable<T> data) { 20 factory Stream.fromIterable(Iterable<T> data) {
21 return new _GeneratedStreamImpl<T>(() => new _IterablePendingEvents<T>(data)); 21 return new _GeneratedStreamImpl<T>(() => new _IterablePendingEvents<T>(data));
22 } 22 }
23 factory Stream.periodic(Duration period, [T computation(int computationCount)]) { 23 factory Stream.periodic(Duration period, [T computation(int computationCount)]) {
24 if (computation == null) computation = ((__x44) => DDC$RT.wrap((dynamic f(dyna mic __u39)) { 24 if (computation == null) computation = ((i) => null);
25 dynamic c(dynamic x0) => ((__x38) => DDC$RT.cast(__x38, Null, T, "CastResult ", """line 126, column 44 of dart:async/stream.dart: """, __x38 is T, false))(f( x0));
26 return f == null ? null : c;
27 }
28 , __x44, __t42, DDC$RT.type((__t40<T> _) {
29 }
30 ), "Wrap", """line 126, column 44 of dart:async/stream.dart: """, __x44 is __t 40<T>))(((i) => null));
31 Timer timer; 25 Timer timer;
32 int computationCount = 0; 26 int computationCount = 0;
33 StreamController<T> controller; 27 StreamController<T> controller;
34 Stopwatch watch = new Stopwatch(); 28 Stopwatch watch = new Stopwatch();
35 void sendEvent() { 29 void sendEvent() {
36 watch.reset(); 30 watch.reset();
37 T data = computation(computationCount++); 31 T data = computation(computationCount++);
38 controller.add(data); 32 controller.add(data);
39 } 33 }
40 void startPeriodicTimer() { 34 void startPeriodicTimer() {
(...skipping 22 matching lines...) Expand all
63 ); 57 );
64 } 58 }
65 , onCancel: () { 59 , onCancel: () {
66 if (timer != null) timer.cancel(); 60 if (timer != null) timer.cancel();
67 timer = null; 61 timer = null;
68 } 62 }
69 ); 63 );
70 return controller.stream; 64 return controller.stream;
71 } 65 }
72 factory Stream.eventTransformed(Stream source, EventSink mapSink(EventSink<T> s ink)) { 66 factory Stream.eventTransformed(Stream source, EventSink mapSink(EventSink<T> s ink)) {
73 return ((__x45) => DDC$RT.cast(__x45, DDC$RT.type((_BoundSinkStream<dynamic, d ynamic> _) { 67 return ((__x38) => DDC$RT.cast(__x38, DDC$RT.type((_BoundSinkStream<dynamic, d ynamic> _) {
74 } 68 }
75 ), DDC$RT.type((Stream<T> _) { 69 ), DDC$RT.type((Stream<T> _) {
76 } 70 }
77 ), "CastExact", """line 216, column 12 of dart:async/stream.dart: """, __x45 i s Stream<T>, false))(new _BoundSinkStream(source, DDC$RT.wrap((EventSink<dynamic > f(EventSink<T> __u46)) { 71 ), "CastExact", """line 216, column 12 of dart:async/stream.dart: """, __x38 i s Stream<T>, false))(new _BoundSinkStream(source, DDC$RT.wrap((EventSink<dynamic > f(EventSink<T> __u39)) {
78 EventSink<dynamic> c(EventSink<T> x0) => f(DDC$RT.cast(x0, DDC$RT.type((Even tSink<dynamic> _) { 72 EventSink<dynamic> c(EventSink<T> x0) => f(DDC$RT.cast(x0, DDC$RT.type((Even tSink<dynamic> _) {
79 } 73 }
80 ), DDC$RT.type((EventSink<T> _) { 74 ), DDC$RT.type((EventSink<T> _) {
81 } 75 }
82 ), "CastParam", """line 216, column 41 of dart:async/stream.dart: """, x0 is EventSink<T>, false)); 76 ), "CastParam", """line 216, column 41 of dart:async/stream.dart: """, x0 is EventSink<T>, false));
83 return f == null ? null : c; 77 return f == null ? null : c;
84 } 78 }
85 , mapSink, DDC$RT.type((__t49<T> _) { 79 , mapSink, DDC$RT.type((__t42<T> _) {
86 } 80 }
87 ), __t47, "Wrap", """line 216, column 41 of dart:async/stream.dart: """, mapSi nk is __t47))); 81 ), __t40, "Wrap", """line 216, column 41 of dart:async/stream.dart: """, mapSi nk is __t40)));
88 } 82 }
89 bool get isBroadcast => false; 83 bool get isBroadcast => false;
90 Stream<T> asBroadcastStream({ 84 Stream<T> asBroadcastStream({
91 void onListen(StreamSubscription<T> subscription), void onCancel(StreamSubscri ption<T> subscription)} 85 void onListen(StreamSubscription<T> subscription), void onCancel(StreamSubscri ption<T> subscription)}
92 ) { 86 ) {
93 return new _AsBroadcastStream<T>(this, DDC$RT.wrap((void f(StreamSubscription< T> __u51)) { 87 return new _AsBroadcastStream<T>(this, DDC$RT.wrap((void f(StreamSubscription< T> __u44)) {
94 void c(StreamSubscription<T> x0) => f(DDC$RT.cast(x0, DDC$RT.type((StreamSub scription<dynamic> _) { 88 void c(StreamSubscription<T> x0) => f(DDC$RT.cast(x0, DDC$RT.type((StreamSub scription<dynamic> _) {
95 } 89 }
96 ), DDC$RT.type((StreamSubscription<T> _) { 90 ), DDC$RT.type((StreamSubscription<T> _) {
97 } 91 }
98 ), "CastParam", """line 248, column 44 of dart:async/stream.dart: """, x0 is StreamSubscription<T>, false)); 92 ), "CastParam", """line 248, column 44 of dart:async/stream.dart: """, x0 is StreamSubscription<T>, false));
99 return f == null ? null : c; 93 return f == null ? null : c;
100 } 94 }
101 , onListen, DDC$RT.type((__t54<T> _) { 95 , onListen, DDC$RT.type((__t47<T> _) {
102 } 96 }
103 ), __t52, "Wrap", """line 248, column 44 of dart:async/stream.dart: """, onLis ten is __t52), DDC$RT.wrap((void f(StreamSubscription<T> __u56)) { 97 ), __t45, "Wrap", """line 248, column 44 of dart:async/stream.dart: """, onLis ten is __t45), DDC$RT.wrap((void f(StreamSubscription<T> __u49)) {
104 void c(StreamSubscription<T> x0) => f(DDC$RT.cast(x0, DDC$RT.type((StreamSub scription<dynamic> _) { 98 void c(StreamSubscription<T> x0) => f(DDC$RT.cast(x0, DDC$RT.type((StreamSub scription<dynamic> _) {
105 } 99 }
106 ), DDC$RT.type((StreamSubscription<T> _) { 100 ), DDC$RT.type((StreamSubscription<T> _) {
107 } 101 }
108 ), "CastParam", """line 248, column 54 of dart:async/stream.dart: """, x0 is StreamSubscription<T>, false)); 102 ), "CastParam", """line 248, column 54 of dart:async/stream.dart: """, x0 is StreamSubscription<T>, false));
109 return f == null ? null : c; 103 return f == null ? null : c;
110 } 104 }
111 , onCancel, DDC$RT.type((__t54<T> _) { 105 , onCancel, DDC$RT.type((__t47<T> _) {
112 } 106 }
113 ), __t52, "Wrap", """line 248, column 54 of dart:async/stream.dart: """, onCan cel is __t52)); 107 ), __t45, "Wrap", """line 248, column 54 of dart:async/stream.dart: """, onCan cel is __t45));
114 } 108 }
115 StreamSubscription<T> listen(void onData(T event), { 109 StreamSubscription<T> listen(void onData(T event), {
116 Function onError, void onDone(), bool cancelOnError} 110 Function onError, void onDone(), bool cancelOnError}
117 ); 111 );
118 Stream<T> where(bool test(T event)) { 112 Stream<T> where(bool test(T event)) {
119 return new _WhereStream<T>(this, test); 113 return new _WhereStream<T>(this, test);
120 } 114 }
121 Stream map(convert(T event)) { 115 Stream map(convert(T event)) {
122 return new _MapStream<T, dynamic>(this, convert); 116 return new _MapStream<T, dynamic>(this, convert);
123 } 117 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 Stream transform(StreamTransformer<T, dynamic> streamTransformer) { 214 Stream transform(StreamTransformer<T, dynamic> streamTransformer) {
221 return streamTransformer.bind(this); 215 return streamTransformer.bind(this);
222 } 216 }
223 Future<T> reduce(T combine(T previous, T element)) { 217 Future<T> reduce(T combine(T previous, T element)) {
224 _Future<T> result = new _Future<T>(); 218 _Future<T> result = new _Future<T>();
225 bool seenFirst = false; 219 bool seenFirst = false;
226 T value; 220 T value;
227 StreamSubscription subscription; 221 StreamSubscription subscription;
228 subscription = this.listen((T element) { 222 subscription = this.listen((T element) {
229 if (seenFirst) { 223 if (seenFirst) {
230 _runUserCode(() => combine(value, element), ((__x62) => DDC$RT.wrap((dynam ic f(T __u57)) { 224 _runUserCode(() => combine(value, element), ((__x55) => DDC$RT.wrap((dynam ic f(T __u50)) {
231 dynamic c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 50 0, column 24 of dart:async/stream.dart: """, x0 is T, false)); 225 dynamic c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 50 0, column 24 of dart:async/stream.dart: """, x0 is T, false));
232 return f == null ? null : c; 226 return f == null ? null : c;
233 } 227 }
234 , __x62, DDC$RT.type((__t60<T> _) { 228 , __x55, DDC$RT.type((__t53<T> _) {
235 } 229 }
236 ), __t58, "WrapLiteral", """line 500, column 24 of dart:async/stream.dart: """, __x62 is __t58))((T newValue) { 230 ), __t51, "WrapLiteral", """line 500, column 24 of dart:async/stream.dart: """, __x55 is __t51))((T newValue) {
237 value = newValue; 231 value = newValue;
238 } 232 }
239 ), ((__x66) => DDC$RT.cast(__x66, dynamic, __t63, "CastGeneral", """line 5 01, column 24 of dart:async/stream.dart: """, __x66 is __t63, false))(_cancelAnd ErrorClosure(subscription, result))); 233 ), ((__x59) => DDC$RT.cast(__x59, dynamic, __t56, "CastGeneral", """line 5 01, column 24 of dart:async/stream.dart: """, __x59 is __t56, false))(_cancelAnd ErrorClosure(subscription, result)));
240 } 234 }
241 else { 235 else {
242 value = element; 236 value = element;
243 seenFirst = true; 237 seenFirst = true;
244 } 238 }
245 } 239 }
246 , onError: result._completeError, onDone: () { 240 , onError: result._completeError, onDone: () {
247 if (!seenFirst) { 241 if (!seenFirst) {
248 try { 242 try {
249 throw IterableElementError.noElement(); 243 throw IterableElementError.noElement();
(...skipping 10 matching lines...) Expand all
260 return result; 254 return result;
261 } 255 }
262 Future fold(var initialValue, combine(var previous, T element)) { 256 Future fold(var initialValue, combine(var previous, T element)) {
263 _Future result = new _Future(); 257 _Future result = new _Future();
264 var value = initialValue; 258 var value = initialValue;
265 StreamSubscription subscription; 259 StreamSubscription subscription;
266 subscription = this.listen((T element) { 260 subscription = this.listen((T element) {
267 _runUserCode(() => combine(value, element), (newValue) { 261 _runUserCode(() => combine(value, element), (newValue) {
268 value = newValue; 262 value = newValue;
269 } 263 }
270 , ((__x67) => DDC$RT.cast(__x67, dynamic, __t63, "CastGeneral", """line 534, column 11 of dart:async/stream.dart: """, __x67 is __t63, false))(_cancelAndErr orClosure(subscription, result))); 264 , ((__x60) => DDC$RT.cast(__x60, dynamic, __t56, "CastGeneral", """line 534, column 11 of dart:async/stream.dart: """, __x60 is __t56, false))(_cancelAndErr orClosure(subscription, result)));
271 } 265 }
272 , onError: (e, st) { 266 , onError: (e, st) {
273 result._completeError(e, DDC$RT.cast(st, dynamic, StackTrace, "CastGeneral", """line 538, column 34 of dart:async/stream.dart: """, st is StackTrace, true)) ; 267 result._completeError(e, DDC$RT.cast(st, dynamic, StackTrace, "CastGeneral", """line 538, column 34 of dart:async/stream.dart: """, st is StackTrace, true)) ;
274 } 268 }
275 , onDone: () { 269 , onDone: () {
276 result._complete(value); 270 result._complete(value);
277 } 271 }
278 , cancelOnError: true); 272 , cancelOnError: true);
279 return result; 273 return result;
280 } 274 }
(...skipping 20 matching lines...) Expand all
301 , onDone: () { 295 , onDone: () {
302 result._complete(buffer.toString()); 296 result._complete(buffer.toString());
303 } 297 }
304 , cancelOnError: true); 298 , cancelOnError: true);
305 return result; 299 return result;
306 } 300 }
307 Future<bool> contains(Object needle) { 301 Future<bool> contains(Object needle) {
308 _Future<bool> future = new _Future<bool>(); 302 _Future<bool> future = new _Future<bool>();
309 StreamSubscription subscription; 303 StreamSubscription subscription;
310 subscription = this.listen((T element) { 304 subscription = this.listen((T element) {
311 _runUserCode(() => (element == needle), ((__x71) => DDC$RT.wrap((dynamic f(b ool __u68)) { 305 _runUserCode(() => (element == needle), ((__x64) => DDC$RT.wrap((dynamic f(b ool __u61)) {
312 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 597, column 13 of dart:async/stream.dart: """, x0 is bool, true)); 306 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 597, column 13 of dart:async/stream.dart: """, x0 is bool, true));
313 return f == null ? null : c; 307 return f == null ? null : c;
314 } 308 }
315 , __x71, __t69, __t58, "WrapLiteral", """line 597, column 13 of dart:async/s tream.dart: """, __x71 is __t58))((bool isMatch) { 309 , __x64, __t62, __t51, "WrapLiteral", """line 597, column 13 of dart:async/s tream.dart: """, __x64 is __t51))((bool isMatch) {
316 if (isMatch) { 310 if (isMatch) {
317 _cancelAndValue(subscription, future, true); 311 _cancelAndValue(subscription, future, true);
318 } 312 }
319 } 313 }
320 ), ((__x72) => DDC$RT.cast(__x72, dynamic, __t63, "CastGeneral", """line 602 , column 13 of dart:async/stream.dart: """, __x72 is __t63, false))(_cancelAndEr rorClosure(subscription, future))); 314 ), ((__x65) => DDC$RT.cast(__x65, dynamic, __t56, "CastGeneral", """line 602 , column 13 of dart:async/stream.dart: """, __x65 is __t56, false))(_cancelAndEr rorClosure(subscription, future)));
321 } 315 }
322 , onError: future._completeError, onDone: () { 316 , onError: future._completeError, onDone: () {
323 future._complete(false); 317 future._complete(false);
324 } 318 }
325 , cancelOnError: true); 319 , cancelOnError: true);
326 return future; 320 return future;
327 } 321 }
328 Future forEach(void action(T element)) { 322 Future forEach(void action(T element)) {
329 _Future future = new _Future(); 323 _Future future = new _Future();
330 StreamSubscription subscription; 324 StreamSubscription subscription;
331 subscription = this.listen((T element) { 325 subscription = this.listen((T element) {
332 _runUserCode(() => action(element), (_) { 326 _runUserCode(() => action(element), (_) {
333 } 327 }
334 , ((__x73) => DDC$RT.cast(__x73, dynamic, __t63, "CastGeneral", """line 628, column 13 of dart:async/stream.dart: """, __x73 is __t63, false))(_cancelAndErr orClosure(subscription, future))); 328 , ((__x66) => DDC$RT.cast(__x66, dynamic, __t56, "CastGeneral", """line 628, column 13 of dart:async/stream.dart: """, __x66 is __t56, false))(_cancelAndErr orClosure(subscription, future)));
335 } 329 }
336 , onError: future._completeError, onDone: () { 330 , onError: future._completeError, onDone: () {
337 future._complete(null); 331 future._complete(null);
338 } 332 }
339 , cancelOnError: true); 333 , cancelOnError: true);
340 return future; 334 return future;
341 } 335 }
342 Future<bool> every(bool test(T element)) { 336 Future<bool> every(bool test(T element)) {
343 _Future<bool> future = new _Future<bool>(); 337 _Future<bool> future = new _Future<bool>();
344 StreamSubscription subscription; 338 StreamSubscription subscription;
345 subscription = this.listen((T element) { 339 subscription = this.listen((T element) {
346 _runUserCode(() => test(element), ((__x75) => DDC$RT.wrap((dynamic f(bool __ u74)) { 340 _runUserCode(() => test(element), ((__x68) => DDC$RT.wrap((dynamic f(bool __ u67)) {
347 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 652, column 13 of dart:async/stream.dart: """, x0 is bool, true)); 341 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 652, column 13 of dart:async/stream.dart: """, x0 is bool, true));
348 return f == null ? null : c; 342 return f == null ? null : c;
349 } 343 }
350 , __x75, __t69, __t58, "WrapLiteral", """line 652, column 13 of dart:async/s tream.dart: """, __x75 is __t58))((bool isMatch) { 344 , __x68, __t62, __t51, "WrapLiteral", """line 652, column 13 of dart:async/s tream.dart: """, __x68 is __t51))((bool isMatch) {
351 if (!isMatch) { 345 if (!isMatch) {
352 _cancelAndValue(subscription, future, false); 346 _cancelAndValue(subscription, future, false);
353 } 347 }
354 } 348 }
355 ), ((__x76) => DDC$RT.cast(__x76, dynamic, __t63, "CastGeneral", """line 657 , column 13 of dart:async/stream.dart: """, __x76 is __t63, false))(_cancelAndEr rorClosure(subscription, future))); 349 ), ((__x69) => DDC$RT.cast(__x69, dynamic, __t56, "CastGeneral", """line 657 , column 13 of dart:async/stream.dart: """, __x69 is __t56, false))(_cancelAndEr rorClosure(subscription, future)));
356 } 350 }
357 , onError: future._completeError, onDone: () { 351 , onError: future._completeError, onDone: () {
358 future._complete(true); 352 future._complete(true);
359 } 353 }
360 , cancelOnError: true); 354 , cancelOnError: true);
361 return future; 355 return future;
362 } 356 }
363 Future<bool> any(bool test(T element)) { 357 Future<bool> any(bool test(T element)) {
364 _Future<bool> future = new _Future<bool>(); 358 _Future<bool> future = new _Future<bool>();
365 StreamSubscription subscription; 359 StreamSubscription subscription;
366 subscription = this.listen((T element) { 360 subscription = this.listen((T element) {
367 _runUserCode(() => test(element), ((__x78) => DDC$RT.wrap((dynamic f(bool __ u77)) { 361 _runUserCode(() => test(element), ((__x71) => DDC$RT.wrap((dynamic f(bool __ u70)) {
368 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 689, column 13 of dart:async/stream.dart: """, x0 is bool, true)); 362 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 689, column 13 of dart:async/stream.dart: """, x0 is bool, true));
369 return f == null ? null : c; 363 return f == null ? null : c;
370 } 364 }
371 , __x78, __t69, __t58, "WrapLiteral", """line 689, column 13 of dart:async/s tream.dart: """, __x78 is __t58))((bool isMatch) { 365 , __x71, __t62, __t51, "WrapLiteral", """line 689, column 13 of dart:async/s tream.dart: """, __x71 is __t51))((bool isMatch) {
372 if (isMatch) { 366 if (isMatch) {
373 _cancelAndValue(subscription, future, true); 367 _cancelAndValue(subscription, future, true);
374 } 368 }
375 } 369 }
376 ), ((__x79) => DDC$RT.cast(__x79, dynamic, __t63, "CastGeneral", """line 694 , column 13 of dart:async/stream.dart: """, __x79 is __t63, false))(_cancelAndEr rorClosure(subscription, future))); 370 ), ((__x72) => DDC$RT.cast(__x72, dynamic, __t56, "CastGeneral", """line 694 , column 13 of dart:async/stream.dart: """, __x72 is __t56, false))(_cancelAndEr rorClosure(subscription, future)));
377 } 371 }
378 , onError: future._completeError, onDone: () { 372 , onError: future._completeError, onDone: () {
379 future._complete(false); 373 future._complete(false);
380 } 374 }
381 , cancelOnError: true); 375 , cancelOnError: true);
382 return future; 376 return future;
383 } 377 }
384 Future<int> get length { 378 Future<int> get length {
385 _Future<int> future = new _Future<int>(); 379 _Future<int> future = new _Future<int>();
386 int count = 0; 380 int count = 0;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 result.add(data); 418 result.add(data);
425 } 419 }
426 , onError: future._completeError, onDone: () { 420 , onError: future._completeError, onDone: () {
427 future._complete(result); 421 future._complete(result);
428 } 422 }
429 , cancelOnError: true); 423 , cancelOnError: true);
430 return future; 424 return future;
431 } 425 }
432 Future drain([var futureValue]) => listen(null, cancelOnError: true).asFuture(f utureValue); 426 Future drain([var futureValue]) => listen(null, cancelOnError: true).asFuture(f utureValue);
433 Stream<T> take(int count) { 427 Stream<T> take(int count) {
434 return ((__x80) => DDC$RT.cast(__x80, DDC$RT.type((_TakeStream<dynamic> _) { 428 return ((__x73) => DDC$RT.cast(__x73, DDC$RT.type((_TakeStream<dynamic> _) {
435 } 429 }
436 ), DDC$RT.type((Stream<T> _) { 430 ), DDC$RT.type((Stream<T> _) {
437 } 431 }
438 ), "CastExact", """line 819, column 12 of dart:async/stream.dart: """, __x80 i s Stream<T>, false))(new _TakeStream(this, count)); 432 ), "CastExact", """line 819, column 12 of dart:async/stream.dart: """, __x73 i s Stream<T>, false))(new _TakeStream(this, count));
439 } 433 }
440 Stream<T> takeWhile(bool test(T element)) { 434 Stream<T> takeWhile(bool test(T element)) {
441 return ((__x81) => DDC$RT.cast(__x81, DDC$RT.type((_TakeWhileStream<dynamic> _ ) { 435 return ((__x74) => DDC$RT.cast(__x74, DDC$RT.type((_TakeWhileStream<dynamic> _ ) {
442 } 436 }
443 ), DDC$RT.type((Stream<T> _) { 437 ), DDC$RT.type((Stream<T> _) {
444 } 438 }
445 ), "CastExact", """line 841, column 12 of dart:async/stream.dart: """, __x81 i s Stream<T>, false))(new _TakeWhileStream(this, DDC$RT.wrap((bool f(T __u82)) { 439 ), "CastExact", """line 841, column 12 of dart:async/stream.dart: """, __x74 i s Stream<T>, false))(new _TakeWhileStream(this, DDC$RT.wrap((bool f(T __u75)) {
446 bool c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 841, colu mn 39 of dart:async/stream.dart: """, x0 is T, false)); 440 bool c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 841, colu mn 39 of dart:async/stream.dart: """, x0 is T, false));
447 return f == null ? null : c; 441 return f == null ? null : c;
448 } 442 }
449 , test, DDC$RT.type((__t85<T> _) { 443 , test, DDC$RT.type((__t78<T> _) {
450 } 444 }
451 ), __t83, "Wrap", """line 841, column 39 of dart:async/stream.dart: """, test is __t83))); 445 ), __t76, "Wrap", """line 841, column 39 of dart:async/stream.dart: """, test is __t76)));
452 } 446 }
453 Stream<T> skip(int count) { 447 Stream<T> skip(int count) {
454 return ((__x87) => DDC$RT.cast(__x87, DDC$RT.type((_SkipStream<dynamic> _) { 448 return ((__x80) => DDC$RT.cast(__x80, DDC$RT.type((_SkipStream<dynamic> _) {
455 } 449 }
456 ), DDC$RT.type((Stream<T> _) { 450 ), DDC$RT.type((Stream<T> _) {
457 } 451 }
458 ), "CastExact", """line 852, column 12 of dart:async/stream.dart: """, __x87 i s Stream<T>, false))(new _SkipStream(this, count)); 452 ), "CastExact", """line 852, column 12 of dart:async/stream.dart: """, __x80 i s Stream<T>, false))(new _SkipStream(this, count));
459 } 453 }
460 Stream<T> skipWhile(bool test(T element)) { 454 Stream<T> skipWhile(bool test(T element)) {
461 return ((__x88) => DDC$RT.cast(__x88, DDC$RT.type((_SkipWhileStream<dynamic> _ ) { 455 return ((__x81) => DDC$RT.cast(__x81, DDC$RT.type((_SkipWhileStream<dynamic> _ ) {
462 } 456 }
463 ), DDC$RT.type((Stream<T> _) { 457 ), DDC$RT.type((Stream<T> _) {
464 } 458 }
465 ), "CastExact", """line 868, column 12 of dart:async/stream.dart: """, __x88 i s Stream<T>, false))(new _SkipWhileStream(this, DDC$RT.wrap((bool f(T __u89)) { 459 ), "CastExact", """line 868, column 12 of dart:async/stream.dart: """, __x81 i s Stream<T>, false))(new _SkipWhileStream(this, DDC$RT.wrap((bool f(T __u82)) {
466 bool c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 868, colu mn 39 of dart:async/stream.dart: """, x0 is T, false)); 460 bool c(T x0) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 868, colu mn 39 of dart:async/stream.dart: """, x0 is T, false));
467 return f == null ? null : c; 461 return f == null ? null : c;
468 } 462 }
469 , test, DDC$RT.type((__t85<T> _) { 463 , test, DDC$RT.type((__t78<T> _) {
470 } 464 }
471 ), __t83, "Wrap", """line 868, column 39 of dart:async/stream.dart: """, test is __t83))); 465 ), __t76, "Wrap", """line 868, column 39 of dart:async/stream.dart: """, test is __t76)));
472 } 466 }
473 Stream<T> distinct([bool equals(T previous, T next)]) { 467 Stream<T> distinct([bool equals(T previous, T next)]) {
474 return ((__x90) => DDC$RT.cast(__x90, DDC$RT.type((_DistinctStream<dynamic> _) { 468 return ((__x83) => DDC$RT.cast(__x83, DDC$RT.type((_DistinctStream<dynamic> _) {
475 } 469 }
476 ), DDC$RT.type((Stream<T> _) { 470 ), DDC$RT.type((Stream<T> _) {
477 } 471 }
478 ), "CastExact", """line 885, column 12 of dart:async/stream.dart: """, __x90 i s Stream<T>, false))(new _DistinctStream(this, DDC$RT.wrap((bool f(T __u91, T __ u92)) { 472 ), "CastExact", """line 885, column 12 of dart:async/stream.dart: """, __x83 i s Stream<T>, false))(new _DistinctStream(this, DDC$RT.wrap((bool f(T __u84, T __ u85)) {
479 bool c(T x0, T x1) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 885 , column 38 of dart:async/stream.dart: """, x0 is T, false), DDC$RT.cast(x1, dyn amic, T, "CastParam", """line 885, column 38 of dart:async/stream.dart: """, x1 is T, false)); 473 bool c(T x0, T x1) => f(DDC$RT.cast(x0, dynamic, T, "CastParam", """line 885 , column 38 of dart:async/stream.dart: """, x0 is T, false), DDC$RT.cast(x1, dyn amic, T, "CastParam", """line 885, column 38 of dart:async/stream.dart: """, x1 is T, false));
480 return f == null ? null : c; 474 return f == null ? null : c;
481 } 475 }
482 , equals, DDC$RT.type((__t96<T> _) { 476 , equals, DDC$RT.type((__t89<T> _) {
483 } 477 }
484 ), __t93, "Wrap", """line 885, column 38 of dart:async/stream.dart: """, equal s is __t93))); 478 ), __t86, "Wrap", """line 885, column 38 of dart:async/stream.dart: """, equal s is __t86)));
485 } 479 }
486 Future<T> get first { 480 Future<T> get first {
487 _Future<T> future = new _Future<T>(); 481 _Future<T> future = new _Future<T>();
488 StreamSubscription subscription; 482 StreamSubscription subscription;
489 subscription = this.listen((T value) { 483 subscription = this.listen((T value) {
490 _cancelAndValue(subscription, future, value); 484 _cancelAndValue(subscription, future, value);
491 } 485 }
492 , onError: future._completeError, onDone: () { 486 , onError: future._completeError, onDone: () {
493 try { 487 try {
494 throw IterableElementError.noElement(); 488 throw IterableElementError.noElement();
495 } 489 }
496 catch (e, s) { 490 catch (e, s) {
497 _completeWithErrorCallback(future, e, s); 491 _completeWithErrorCallback(future, e, s);
498 } 492 }
499 } 493 }
500 , cancelOnError: true); 494 , cancelOnError: true);
501 return future; 495 return future;
502 } 496 }
503 Future<T> get last { 497 Future<T> get last {
504 _Future<T> future = new _Future<T>(); 498 _Future<T> future = new _Future<T>();
505 T result = ((__x99) => DDC$RT.cast(__x99, Null, T, "CastLiteral", """line 936 , column 16 of dart:async/stream.dart: """, __x99 is T, false))(null); 499 T result = null;
506 bool foundResult = false; 500 bool foundResult = false;
507 StreamSubscription subscription; 501 StreamSubscription subscription;
508 subscription = this.listen((T value) { 502 subscription = this.listen((T value) {
509 foundResult = true; 503 foundResult = true;
510 result = value; 504 result = value;
511 } 505 }
512 , onError: future._completeError, onDone: () { 506 , onError: future._completeError, onDone: () {
513 if (foundResult) { 507 if (foundResult) {
514 future._complete(result); 508 future._complete(result);
515 return;} 509 return;}
516 try { 510 try {
517 throw IterableElementError.noElement(); 511 throw IterableElementError.noElement();
518 } 512 }
519 catch (e, s) { 513 catch (e, s) {
520 _completeWithErrorCallback(future, e, s); 514 _completeWithErrorCallback(future, e, s);
521 } 515 }
522 } 516 }
523 , cancelOnError: true); 517 , cancelOnError: true);
524 return future; 518 return future;
525 } 519 }
526 Future<T> get single { 520 Future<T> get single {
527 _Future<T> future = new _Future<T>(); 521 _Future<T> future = new _Future<T>();
528 T result = ((__x100) => DDC$RT.cast(__x100, Null, T, "CastLiteral", """line 9 70, column 16 of dart:async/stream.dart: """, __x100 is T, false))(null); 522 T result = null;
529 bool foundResult = false; 523 bool foundResult = false;
530 StreamSubscription subscription; 524 StreamSubscription subscription;
531 subscription = this.listen((T value) { 525 subscription = this.listen((T value) {
532 if (foundResult) { 526 if (foundResult) {
533 try { 527 try {
534 throw IterableElementError.tooMany(); 528 throw IterableElementError.tooMany();
535 } 529 }
536 catch (e, s) { 530 catch (e, s) {
537 _cancelAndErrorWithReplacement(subscription, future, e, s); 531 _cancelAndErrorWithReplacement(subscription, future, e, s);
538 } 532 }
(...skipping 14 matching lines...) Expand all
553 } 547 }
554 , cancelOnError: true); 548 , cancelOnError: true);
555 return future; 549 return future;
556 } 550 }
557 Future<dynamic> firstWhere(bool test(T element), { 551 Future<dynamic> firstWhere(bool test(T element), {
558 Object defaultValue()} 552 Object defaultValue()}
559 ) { 553 ) {
560 _Future<dynamic> future = new _Future(); 554 _Future<dynamic> future = new _Future();
561 StreamSubscription subscription; 555 StreamSubscription subscription;
562 subscription = this.listen((T value) { 556 subscription = this.listen((T value) {
563 _runUserCode(() => test(value), ((__x102) => DDC$RT.wrap((dynamic f(bool __u 101)) { 557 _runUserCode(() => test(value), ((__x93) => DDC$RT.wrap((dynamic f(bool __u9 2)) {
564 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 1031, column 11 of dart:async/stream.dart: """, x0 is bool, true)); 558 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 1031, column 11 of dart:async/stream.dart: """, x0 is bool, true));
565 return f == null ? null : c; 559 return f == null ? null : c;
566 } 560 }
567 , __x102, __t69, __t58, "WrapLiteral", """line 1031, column 11 of dart:async /stream.dart: """, __x102 is __t58))((bool isMatch) { 561 , __x93, __t62, __t51, "WrapLiteral", """line 1031, column 11 of dart:async/ stream.dart: """, __x93 is __t51))((bool isMatch) {
568 if (isMatch) { 562 if (isMatch) {
569 _cancelAndValue(subscription, future, value); 563 _cancelAndValue(subscription, future, value);
570 } 564 }
571 } 565 }
572 ), ((__x103) => DDC$RT.cast(__x103, dynamic, __t63, "CastGeneral", """line 1 036, column 11 of dart:async/stream.dart: """, __x103 is __t63, false))(_cancelA ndErrorClosure(subscription, future))); 566 ), ((__x94) => DDC$RT.cast(__x94, dynamic, __t56, "CastGeneral", """line 103 6, column 11 of dart:async/stream.dart: """, __x94 is __t56, false))(_cancelAndE rrorClosure(subscription, future)));
573 } 567 }
574 , onError: future._completeError, onDone: () { 568 , onError: future._completeError, onDone: () {
575 if (defaultValue != null) { 569 if (defaultValue != null) {
576 _runUserCode(defaultValue, future._complete, future._completeError); 570 _runUserCode(defaultValue, future._complete, future._completeError);
577 return;} 571 return;}
578 try { 572 try {
579 throw IterableElementError.noElement(); 573 throw IterableElementError.noElement();
580 } 574 }
581 catch (e, s) { 575 catch (e, s) {
582 _completeWithErrorCallback(future, e, s); 576 _completeWithErrorCallback(future, e, s);
583 } 577 }
584 } 578 }
585 , cancelOnError: true); 579 , cancelOnError: true);
586 return future; 580 return future;
587 } 581 }
588 Future<dynamic> lastWhere(bool test(T element), { 582 Future<dynamic> lastWhere(bool test(T element), {
589 Object defaultValue()} 583 Object defaultValue()}
590 ) { 584 ) {
591 _Future<dynamic> future = new _Future(); 585 _Future<dynamic> future = new _Future();
592 T result = ((__x104) => DDC$RT.cast(__x104, Null, T, "CastLiteral", """line 1 064, column 16 of dart:async/stream.dart: """, __x104 is T, false))(null); 586 T result = null;
593 bool foundResult = false; 587 bool foundResult = false;
594 StreamSubscription subscription; 588 StreamSubscription subscription;
595 subscription = this.listen((T value) { 589 subscription = this.listen((T value) {
596 _runUserCode(() => true == test(value), ((__x106) => DDC$RT.wrap((dynamic f( bool __u105)) { 590 _runUserCode(() => true == test(value), ((__x96) => DDC$RT.wrap((dynamic f(b ool __u95)) {
597 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 1071, column 11 of dart:async/stream.dart: """, x0 is bool, true)); 591 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 1071, column 11 of dart:async/stream.dart: """, x0 is bool, true));
598 return f == null ? null : c; 592 return f == null ? null : c;
599 } 593 }
600 , __x106, __t69, __t58, "WrapLiteral", """line 1071, column 11 of dart:async /stream.dart: """, __x106 is __t58))((bool isMatch) { 594 , __x96, __t62, __t51, "WrapLiteral", """line 1071, column 11 of dart:async/ stream.dart: """, __x96 is __t51))((bool isMatch) {
601 if (isMatch) { 595 if (isMatch) {
602 foundResult = true; 596 foundResult = true;
603 result = value; 597 result = value;
604 } 598 }
605 } 599 }
606 ), ((__x107) => DDC$RT.cast(__x107, dynamic, __t63, "CastGeneral", """line 1 077, column 11 of dart:async/stream.dart: """, __x107 is __t63, false))(_cancelA ndErrorClosure(subscription, future))); 600 ), ((__x97) => DDC$RT.cast(__x97, dynamic, __t56, "CastGeneral", """line 107 7, column 11 of dart:async/stream.dart: """, __x97 is __t56, false))(_cancelAndE rrorClosure(subscription, future)));
607 } 601 }
608 , onError: future._completeError, onDone: () { 602 , onError: future._completeError, onDone: () {
609 if (foundResult) { 603 if (foundResult) {
610 future._complete(result); 604 future._complete(result);
611 return;} 605 return;}
612 if (defaultValue != null) { 606 if (defaultValue != null) {
613 _runUserCode(defaultValue, future._complete, future._completeError); 607 _runUserCode(defaultValue, future._complete, future._completeError);
614 return;} 608 return;}
615 try { 609 try {
616 throw IterableElementError.noElement(); 610 throw IterableElementError.noElement();
617 } 611 }
618 catch (e, s) { 612 catch (e, s) {
619 _completeWithErrorCallback(future, e, s); 613 _completeWithErrorCallback(future, e, s);
620 } 614 }
621 } 615 }
622 , cancelOnError: true); 616 , cancelOnError: true);
623 return future; 617 return future;
624 } 618 }
625 Future<T> singleWhere(bool test(T element)) { 619 Future<T> singleWhere(bool test(T element)) {
626 _Future<T> future = new _Future<T>(); 620 _Future<T> future = new _Future<T>();
627 T result = ((__x108) => DDC$RT.cast(__x108, Null, T, "CastLiteral", """line 1 108, column 16 of dart:async/stream.dart: """, __x108 is T, false))(null); 621 T result = null;
628 bool foundResult = false; 622 bool foundResult = false;
629 StreamSubscription subscription; 623 StreamSubscription subscription;
630 subscription = this.listen((T value) { 624 subscription = this.listen((T value) {
631 _runUserCode(() => true == test(value), ((__x110) => DDC$RT.wrap((dynamic f( bool __u109)) { 625 _runUserCode(() => true == test(value), ((__x99) => DDC$RT.wrap((dynamic f(b ool __u98)) {
632 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 1115, column 11 of dart:async/stream.dart: """, x0 is bool, true)); 626 dynamic c(bool x0) => f(DDC$RT.cast(x0, dynamic, bool, "CastParam", """lin e 1115, column 11 of dart:async/stream.dart: """, x0 is bool, true));
633 return f == null ? null : c; 627 return f == null ? null : c;
634 } 628 }
635 , __x110, __t69, __t58, "WrapLiteral", """line 1115, column 11 of dart:async /stream.dart: """, __x110 is __t58))((bool isMatch) { 629 , __x99, __t62, __t51, "WrapLiteral", """line 1115, column 11 of dart:async/ stream.dart: """, __x99 is __t51))((bool isMatch) {
636 if (isMatch) { 630 if (isMatch) {
637 if (foundResult) { 631 if (foundResult) {
638 try { 632 try {
639 throw IterableElementError.tooMany(); 633 throw IterableElementError.tooMany();
640 } 634 }
641 catch (e, s) { 635 catch (e, s) {
642 _cancelAndErrorWithReplacement(subscription, future, e, s); 636 _cancelAndErrorWithReplacement(subscription, future, e, s);
643 } 637 }
644 return;} 638 return;}
645 foundResult = true; 639 foundResult = true;
646 result = value; 640 result = value;
647 } 641 }
648 } 642 }
649 ), ((__x111) => DDC$RT.cast(__x111, dynamic, __t63, "CastGeneral", """line 1 129, column 11 of dart:async/stream.dart: """, __x111 is __t63, false))(_cancelA ndErrorClosure(subscription, future))); 643 ), ((__x100) => DDC$RT.cast(__x100, dynamic, __t56, "CastGeneral", """line 1 129, column 11 of dart:async/stream.dart: """, __x100 is __t56, false))(_cancelA ndErrorClosure(subscription, future)));
650 } 644 }
651 , onError: future._completeError, onDone: () { 645 , onError: future._completeError, onDone: () {
652 if (foundResult) { 646 if (foundResult) {
653 future._complete(result); 647 future._complete(result);
654 return;} 648 return;}
655 try { 649 try {
656 throw IterableElementError.noElement(); 650 throw IterableElementError.noElement();
657 } 651 }
658 catch (e, s) { 652 catch (e, s) {
659 _completeWithErrorCallback(future, e, s); 653 _completeWithErrorCallback(future, e, s);
(...skipping 23 matching lines...) Expand all
683 void onTimeout(EventSink sink)} 677 void onTimeout(EventSink sink)}
684 ) { 678 ) {
685 StreamController controller; 679 StreamController controller;
686 StreamSubscription<T> subscription; 680 StreamSubscription<T> subscription;
687 Timer timer; 681 Timer timer;
688 Zone zone; 682 Zone zone;
689 Function timeout; 683 Function timeout;
690 void onData(T event) { 684 void onData(T event) {
691 timer.cancel(); 685 timer.cancel();
692 controller.add(event); 686 controller.add(event);
693 timer = zone.createTimer(timeLimit, DDC$RT.cast(timeout, Function, __t112, "CastGeneral", """line 1219, column 43 of dart:async/stream.dart: """, timeout i s __t112, false)); 687 timer = zone.createTimer(timeLimit, DDC$RT.cast(timeout, Function, __t101, "CastGeneral", """line 1219, column 43 of dart:async/stream.dart: """, timeout i s __t101, false));
694 } 688 }
695 void onError(error, StackTrace stackTrace) { 689 void onError(error, StackTrace stackTrace) {
696 timer.cancel(); 690 timer.cancel();
697 assert (controller is _StreamController || controller is _BroadcastStreamCo ntroller); var eventSink = controller; 691 assert (controller is _StreamController || controller is _BroadcastStreamCo ntroller); var eventSink = controller;
698 eventSink._addError(error, stackTrace); 692 eventSink._addError(error, stackTrace);
699 timer = zone.createTimer(timeLimit, DDC$RT.cast(timeout, Function, __t112, "CastGeneral", """line 1227, column 43 of dart:async/stream.dart: """, timeout i s __t112, false)); 693 timer = zone.createTimer(timeLimit, DDC$RT.cast(timeout, Function, __t101, "CastGeneral", """line 1227, column 43 of dart:async/stream.dart: """, timeout i s __t101, false));
700 } 694 }
701 void onDone() { 695 void onDone() {
702 timer.cancel(); 696 timer.cancel();
703 controller.close(); 697 controller.close();
704 } 698 }
705 void onListen() { 699 void onListen() {
706 zone = Zone.current; 700 zone = Zone.current;
707 if (onTimeout == null) { 701 if (onTimeout == null) {
708 timeout = () { 702 timeout = () {
709 controller.addError(new TimeoutException("No stream event", timeLimit), null); 703 controller.addError(new TimeoutException("No stream event", timeLimit), null);
710 } 704 }
711 ; 705 ;
712 } 706 }
713 else { 707 else {
714 onTimeout = zone.registerUnaryCallback(DDC$RT.wrap((void f(EventSink<dynam ic> __u113)) { 708 onTimeout = zone.registerUnaryCallback(DDC$RT.wrap((void f(EventSink<dynam ic> __u102)) {
715 void c(EventSink<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type( (EventSink<dynamic> _) { 709 void c(EventSink<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type( (EventSink<dynamic> _) {
716 } 710 }
717 ), "CastParam", """line 1245, column 48 of dart:async/stream.dart: """, x0 is EventSink<dynamic>, true)); 711 ), "CastParam", """line 1245, column 48 of dart:async/stream.dart: """, x0 is EventSink<dynamic>, true));
718 return f == null ? null : c; 712 return f == null ? null : c;
719 } 713 }
720 , onTimeout, __t114, __t58, "Wrap", """line 1245, column 48 of dart:async/ stream.dart: """, onTimeout is __t58)); 714 , onTimeout, __t103, __t51, "Wrap", """line 1245, column 48 of dart:async/ stream.dart: """, onTimeout is __t51));
721 _ControllerEventSinkWrapper wrapper = new _ControllerEventSinkWrapper(nul l); 715 _ControllerEventSinkWrapper wrapper = new _ControllerEventSinkWrapper(nul l);
722 timeout = () { 716 timeout = () {
723 wrapper._sink = controller; 717 wrapper._sink = controller;
724 zone.runUnaryGuarded(DDC$RT.wrap((void f(EventSink<dynamic> __u116)) { 718 zone.runUnaryGuarded(DDC$RT.wrap((void f(EventSink<dynamic> __u105)) {
725 void c(EventSink<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.typ e((EventSink<dynamic> _) { 719 void c(EventSink<dynamic> x0) => f(DDC$RT.cast(x0, dynamic, DDC$RT.typ e((EventSink<dynamic> _) {
726 } 720 }
727 ), "CastParam", """line 1250, column 32 of dart:async/stream.dart: """ , x0 is EventSink<dynamic>, true)); 721 ), "CastParam", """line 1250, column 32 of dart:async/stream.dart: """ , x0 is EventSink<dynamic>, true));
728 return f == null ? null : c; 722 return f == null ? null : c;
729 } 723 }
730 , onTimeout, __t114, __t58, "Wrap", """line 1250, column 32 of dart:asyn c/stream.dart: """, onTimeout is __t58), wrapper); 724 , onTimeout, __t103, __t51, "Wrap", """line 1250, column 32 of dart:asyn c/stream.dart: """, onTimeout is __t51), wrapper);
731 wrapper._sink = null; 725 wrapper._sink = null;
732 } 726 }
733 ; 727 ;
734 } 728 }
735 subscription = this.listen(onData, onError: onError, onDone: onDone); 729 subscription = this.listen(onData, onError: onError, onDone: onDone);
736 timer = zone.createTimer(timeLimit, DDC$RT.cast(timeout, Function, __t112, "CastGeneral", """line 1256, column 43 of dart:async/stream.dart: """, timeout i s __t112, false)); 730 timer = zone.createTimer(timeLimit, DDC$RT.cast(timeout, Function, __t101, "CastGeneral", """line 1256, column 43 of dart:async/stream.dart: """, timeout i s __t101, false));
737 } 731 }
738 Future onCancel() { 732 Future onCancel() {
739 timer.cancel(); 733 timer.cancel();
740 Future result = subscription.cancel(); 734 Future result = subscription.cancel();
741 subscription = null; 735 subscription = null;
742 return result; 736 return result;
743 } 737 }
744 controller = isBroadcast ? new _SyncBroadcastStreamController(onListen, onCan cel) : new _SyncStreamController(onListen, () { 738 controller = isBroadcast ? new _SyncBroadcastStreamController(onListen, onCan cel) : new _SyncStreamController(onListen, () {
745 timer.cancel(); 739 timer.cancel();
746 subscription.pause(); 740 subscription.pause();
747 } 741 }
748 , () { 742 , () {
749 subscription.resume(); 743 subscription.resume();
750 timer = zone.createTimer(timeLimit, DDC$RT.cast(timeout, Function, __t112, "CastGeneral", """line 1275, column 53 of dart:async/stream.dart: """, timeout i s __t112, false)); 744 timer = zone.createTimer(timeLimit, DDC$RT.cast(timeout, Function, __t101, "CastGeneral", """line 1275, column 53 of dart:async/stream.dart: """, timeout i s __t101, false));
751 } 745 }
752 , onCancel); 746 , onCancel);
753 return controller.stream; 747 return controller.stream;
754 } 748 }
755 } 749 }
756 abstract class StreamSubscription<T> {Future cancel(); 750 abstract class StreamSubscription<T> {Future cancel();
757 void onData(void handleData(T data)); 751 void onData(void handleData(T data));
758 void onError(Function handleError); 752 void onError(Function handleError);
759 void onDone(void handleDone()); 753 void onDone(void handleDone());
760 void pause([Future resumeSignal]); 754 void pause([Future resumeSignal]);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 void add(T data) { 794 void add(T data) {
801 _sink.add(data); 795 _sink.add(data);
802 } 796 }
803 void addError(error, [StackTrace stackTrace]) { 797 void addError(error, [StackTrace stackTrace]) {
804 _sink.addError(error, stackTrace); 798 _sink.addError(error, stackTrace);
805 } 799 }
806 void close() { 800 void close() {
807 _sink.close(); 801 _sink.close();
808 } 802 }
809 } 803 }
810 typedef T __t40<T>(int __u41); 804 typedef EventSink<dynamic> __t40(EventSink<dynamic> __u41);
811 typedef dynamic __t42(dynamic __u43); 805 typedef EventSink<dynamic> __t42<T>(EventSink<T> __u43);
812 typedef EventSink<dynamic> __t47(EventSink<dynamic> __u48); 806 typedef void __t45(StreamSubscription<dynamic> __u46);
813 typedef EventSink<dynamic> __t49<T>(EventSink<T> __u50); 807 typedef void __t47<T>(StreamSubscription<T> __u48);
814 typedef void __t52(StreamSubscription<dynamic> __u53); 808 typedef dynamic __t51(dynamic __u52);
815 typedef void __t54<T>(StreamSubscription<T> __u55); 809 typedef dynamic __t53<T>(T __u54);
816 typedef dynamic __t58(dynamic __u59); 810 typedef dynamic __t56(dynamic __u57, StackTrace __u58);
817 typedef dynamic __t60<T>(T __u61); 811 typedef dynamic __t62(bool __u63);
818 typedef dynamic __t63(dynamic __u64, StackTrace __u65); 812 typedef bool __t76(dynamic __u77);
819 typedef dynamic __t69(bool __u70); 813 typedef bool __t78<T>(T __u79);
820 typedef bool __t83(dynamic __u84); 814 typedef bool __t86(dynamic __u87, dynamic __u88);
821 typedef bool __t85<T>(T __u86); 815 typedef bool __t89<T>(T __u90, T __u91);
822 typedef bool __t93(dynamic __u94, dynamic __u95); 816 typedef void __t101();
823 typedef bool __t96<T>(T __u97, T __u98); 817 typedef void __t103(EventSink<dynamic> __u104);
824 typedef void __t112();
825 typedef void __t114(EventSink<dynamic> __u115);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698