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

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

Issue 1038583004: Rationalize coercions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 part of dart.async; 1 part of dart.async;
2 class _EventSinkWrapper<T> implements EventSink<T> {_EventSink _sink; 2 class _EventSinkWrapper<T> implements EventSink<T> {_EventSink _sink;
3 _EventSinkWrapper(this._sink); 3 _EventSinkWrapper(this._sink);
4 void add(T data) { 4 void add(T data) {
5 _sink._add(data); 5 _sink._add(data);
6 } 6 }
7 void addError(error, [StackTrace stackTrace]) { 7 void addError(error, [StackTrace stackTrace]) {
8 _sink._addError(error, stackTrace); 8 _sink._addError(error, stackTrace);
9 } 9 }
10 void close() { 10 void close() {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void _handleData(S data) { 54 void _handleData(S data) {
55 try { 55 try {
56 _transformerSink.add(data); 56 _transformerSink.add(data);
57 } 57 }
58 catch (e, s) { 58 catch (e, s) {
59 _addError(e, s); 59 _addError(e, s);
60 } 60 }
61 } 61 }
62 void _handleError(error, [stackTrace]) { 62 void _handleError(error, [stackTrace]) {
63 try { 63 try {
64 _transformerSink.addError(error, DEVC$RT.cast(stackTrace, dynamic, StackTrace, "CastGeneral", """line 127, column 40 of dart:async/stream_transformers.dart: " "", stackTrace is StackTrace, true)); 64 _transformerSink.addError(error, DEVC$RT.cast(stackTrace, dynamic, StackTrace, "DynamicCast", """line 127, column 40 of dart:async/stream_transformers.dart: " "", stackTrace is StackTrace, true));
65 } 65 }
66 catch (e, s) { 66 catch (e, s) {
67 if (identical(e, error)) { 67 if (identical(e, error)) {
68 _addError(error, DEVC$RT.cast(stackTrace, dynamic, StackTrace, "CastGeneral" , """line 130, column 26 of dart:async/stream_transformers.dart: """, stackTrace is StackTrace, true)); 68 _addError(error, DEVC$RT.cast(stackTrace, dynamic, StackTrace, "DynamicCast" , """line 130, column 26 of dart:async/stream_transformers.dart: """, stackTrace is StackTrace, true));
69 } 69 }
70 else { 70 else {
71 _addError(e, s); 71 _addError(e, s);
72 } 72 }
73 } 73 }
74 } 74 }
75 void _handleDone() { 75 void _handleDone() {
76 try { 76 try {
77 _subscription = null; 77 _subscription = null;
78 _transformerSink.close(); 78 _transformerSink.close();
(...skipping 13 matching lines...) Expand all
92 bool get isBroadcast => _stream.isBroadcast; 92 bool get isBroadcast => _stream.isBroadcast;
93 _BoundSinkStream(this._stream, this._sinkMapper); 93 _BoundSinkStream(this._stream, this._sinkMapper);
94 StreamSubscription<T> listen(void onData(T event), { 94 StreamSubscription<T> listen(void onData(T event), {
95 Function onError, void onDone(), bool cancelOnError} 95 Function onError, void onDone(), bool cancelOnError}
96 ) { 96 ) {
97 cancelOnError = identical(true, cancelOnError); 97 cancelOnError = identical(true, cancelOnError);
98 StreamSubscription<T> subscription = ((__x105) => DEVC$RT.cast(__x105, DEVC$RT. type((_SinkTransformerStreamSubscription<dynamic, dynamic> _) { 98 StreamSubscription<T> subscription = ((__x105) => DEVC$RT.cast(__x105, DEVC$RT. type((_SinkTransformerStreamSubscription<dynamic, dynamic> _) {
99 } 99 }
100 ), DEVC$RT.type((StreamSubscription<T> _) { 100 ), DEVC$RT.type((StreamSubscription<T> _) {
101 } 101 }
102 ), "CastExact", """line 186, column 42 of dart:async/stream_transformers.dart: " "", __x105 is StreamSubscription<T>, false))(new _SinkTransformerStreamSubscript ion(_stream, DEVC$RT.wrap((EventSink<S> f(EventSink<T> __u106)) { 102 ), "InferableAllocation", """line 186, column 42 of dart:async/stream_transforme rs.dart: """, __x105 is StreamSubscription<T>, false))(new _SinkTransformerStrea mSubscription(_stream, DEVC$RT.wrap((EventSink<S> f(EventSink<T> __u106)) {
103 EventSink<S> c(EventSink<T> x0) => f(DEVC$RT.cast(x0, DEVC$RT.type((EventSink<dy namic> _) { 103 EventSink<S> c(EventSink<T> x0) => f(DEVC$RT.cast(x0, DEVC$RT.type((EventSink<dy namic> _) {
104 } 104 }
105 ), DEVC$RT.type((EventSink<T> _) { 105 ), DEVC$RT.type((EventSink<T> _) {
106 } 106 }
107 ), "CastParam", """line 187, column 18 of dart:async/stream_transformers.dart: " "", x0 is EventSink<T>, false)); 107 ), "CastParam", """line 187, column 18 of dart:async/stream_transformers.dart: " "", x0 is EventSink<T>, false));
108 return f == null ? null : c; 108 return f == null ? null : c;
109 } 109 }
110 , _sinkMapper, DEVC$RT.type((__t109<T, S> _) { 110 , _sinkMapper, DEVC$RT.type((__t109<T, S> _) {
111 } 111 }
112 ), __t107, "Wrap", """line 187, column 18 of dart:async/stream_transformers.dart : """, _sinkMapper is __t107), onData, onError, onDone, cancelOnError)); 112 ), __t107, "Wrap", """line 187, column 18 of dart:async/stream_transformers.dart : """, _sinkMapper is __t107), onData, onError, onDone, cancelOnError));
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 } 190 }
191 typedef EventSink<dynamic> __t107(EventSink<dynamic> __u108); 191 typedef EventSink<dynamic> __t107(EventSink<dynamic> __u108);
192 typedef EventSink<S> __t109<T, S>(EventSink<T> __u110); 192 typedef EventSink<S> __t109<T, S>(EventSink<T> __u110);
193 typedef EventSink<S> __t113<T, S>(EventSink<T> __u114); 193 typedef EventSink<S> __t113<T, S>(EventSink<T> __u114);
194 typedef dynamic __t115<T>(EventSink<T> __u116); 194 typedef dynamic __t115<T>(EventSink<T> __u116);
195 typedef void __t120<S, T>(S __u121, EventSink<T> __u122); 195 typedef void __t120<S, T>(S __u121, EventSink<T> __u122);
196 typedef void __t123(dynamic __u124, EventSink<dynamic> __u125); 196 typedef void __t123(dynamic __u124, EventSink<dynamic> __u125);
197 typedef void __t129<T>(Object __u130, StackTrace __u131, EventSink<T> __u132); 197 typedef void __t129<T>(Object __u130, StackTrace __u131, EventSink<T> __u132);
198 typedef void __t133(dynamic __u134, StackTrace __u135, EventSink<dynamic> __u13 6); 198 typedef void __t133(dynamic __u134, StackTrace __u135, EventSink<dynamic> __u13 6);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/async/stream_pipe.dart ('k') | test/dart_codegen/expect/async/zone.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698