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