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

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

Issue 1038583004: Rationalize coercions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase 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 typedef dynamic ZoneCallback(); 2 typedef dynamic ZoneCallback();
3 typedef dynamic ZoneUnaryCallback(arg); 3 typedef dynamic ZoneUnaryCallback(arg);
4 typedef dynamic ZoneBinaryCallback(arg1, arg2); 4 typedef dynamic ZoneBinaryCallback(arg1, arg2);
5 typedef dynamic HandleUncaughtErrorHandler(Zone self, ZoneDelegate parent, Zone zone, error, StackTrace stackTrace); 5 typedef dynamic HandleUncaughtErrorHandler(Zone self, ZoneDelegate parent, Zone zone, error, StackTrace stackTrace);
6 typedef dynamic RunHandler(Zone self, ZoneDelegate parent, Zone zone, f()); 6 typedef dynamic RunHandler(Zone self, ZoneDelegate parent, Zone zone, f());
7 typedef dynamic RunUnaryHandler(Zone self, ZoneDelegate parent, Zone zone, f(ar g), arg); 7 typedef dynamic RunUnaryHandler(Zone self, ZoneDelegate parent, Zone zone, f(ar g), arg);
8 typedef dynamic RunBinaryHandler(Zone self, ZoneDelegate parent, Zone zone, f(a rg1, arg2), arg1, arg2); 8 typedef dynamic RunBinaryHandler(Zone self, ZoneDelegate parent, Zone zone, f(a rg1, arg2), arg1, arg2);
9 typedef ZoneCallback RegisterCallbackHandler(Zone self, ZoneDelegate parent, Zo ne zone, f()); 9 typedef ZoneCallback RegisterCallbackHandler(Zone self, ZoneDelegate parent, Zo ne zone, f());
10 typedef ZoneUnaryCallback RegisterUnaryCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, f(arg)); 10 typedef ZoneUnaryCallback RegisterUnaryCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, f(arg));
11 typedef ZoneBinaryCallback RegisterBinaryCallbackHandler(Zone self, ZoneDelegat e parent, Zone zone, f(arg1, arg2)); 11 typedef ZoneBinaryCallback RegisterBinaryCallbackHandler(Zone self, ZoneDelegat e parent, Zone zone, f(arg1, arg2));
12 typedef AsyncError ErrorCallbackHandler(Zone self, ZoneDelegate parent, Zone zo ne, Object error, StackTrace stackTrace); 12 typedef AsyncError ErrorCallbackHandler(Zone self, ZoneDelegate parent, Zone zo ne, Object error, StackTrace stackTrace);
13 typedef void ScheduleMicrotaskHandler(Zone self, ZoneDelegate parent, Zone zone , f()); 13 typedef void ScheduleMicrotaskHandler(Zone self, ZoneDelegate parent, Zone zone , f());
14 typedef Timer CreateTimerHandler(Zone self, ZoneDelegate parent, Zone zone, Dur ation duration, void f()); 14 typedef Timer CreateTimerHandler(Zone self, ZoneDelegate parent, Zone zone, Dur ation duration, void f());
15 typedef Timer CreatePeriodicTimerHandler(Zone self, ZoneDelegate parent, Zone z one, Duration period, void f(Timer timer)); 15 typedef Timer CreatePeriodicTimerHandler(Zone self, ZoneDelegate parent, Zone z one, Duration period, void f(Timer timer));
16 typedef void PrintHandler(Zone self, ZoneDelegate parent, Zone zone, String lin e); 16 typedef void PrintHandler(Zone self, ZoneDelegate parent, Zone zone, String lin e);
17 typedef Zone ForkHandler(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecifi cation specification, Map zoneValues); 17 typedef Zone ForkHandler(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecifi cation specification, Map zoneValues);
18 class AsyncError implements Error {final error; 18 class AsyncError implements Error {final error;
19 final StackTrace stackTrace; 19 final StackTrace stackTrace;
20 AsyncError(this.error, this.stackTrace); 20 AsyncError(this.error, this.stackTrace);
21 String toString() => ((__x143) => DEVC$RT.cast(__x143, dynamic, String, "CastGe neral", """line 46, column 24 of dart:async/zone.dart: """, __x143 is String, tr ue))(error.toString()); 21 String toString() => ((__x143) => DEVC$RT.cast(__x143, dynamic, String, "Dynami cCast", """line 46, column 24 of dart:async/zone.dart: """, __x143 is String, tr ue))(error.toString());
22 } 22 }
23 class _ZoneFunction {final _Zone zone; 23 class _ZoneFunction {final _Zone zone;
24 final Function function; 24 final Function function;
25 const _ZoneFunction(this.zone, this.function); 25 const _ZoneFunction(this.zone, this.function);
26 } 26 }
27 abstract class ZoneSpecification {const factory ZoneSpecification({ 27 abstract class ZoneSpecification {const factory ZoneSpecification({
28 dynamic handleUncaughtError(Zone self, ZoneDelegate parent, Zone zone, error, St ackTrace stackTrace), dynamic run(Zone self, ZoneDelegate parent, Zone zone, f() ), dynamic runUnary(Zone self, ZoneDelegate parent, Zone zone, f(arg), arg), dyn amic runBinary(Zone self, ZoneDelegate parent, Zone zone, f(arg1, arg2), arg1, a rg2), ZoneCallback registerCallback(Zone self, ZoneDelegate parent, Zone zone, f ()), ZoneUnaryCallback registerUnaryCallback(Zone self, ZoneDelegate parent, Zon e zone, f(arg)), ZoneBinaryCallback registerBinaryCallback(Zone self, ZoneDelega te parent, Zone zone, f(arg1, arg2)), AsyncError errorCallback(Zone self, ZoneDe legate parent, Zone zone, Object error, StackTrace stackTrace), void scheduleMic rotask(Zone self, ZoneDelegate parent, Zone zone, f()), Timer createTimer(Zone s elf, ZoneDelegate parent, Zone zone, Duration duration, void f()), Timer createP eriodicTimer(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f( Timer timer)), void print(Zone self, ZoneDelegate parent, Zone zone, String line ), Zone fork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification specif ication, Map zoneValues)} 28 dynamic handleUncaughtError(Zone self, ZoneDelegate parent, Zone zone, error, St ackTrace stackTrace), dynamic run(Zone self, ZoneDelegate parent, Zone zone, f() ), dynamic runUnary(Zone self, ZoneDelegate parent, Zone zone, f(arg), arg), dyn amic runBinary(Zone self, ZoneDelegate parent, Zone zone, f(arg1, arg2), arg1, a rg2), ZoneCallback registerCallback(Zone self, ZoneDelegate parent, Zone zone, f ()), ZoneUnaryCallback registerUnaryCallback(Zone self, ZoneDelegate parent, Zon e zone, f(arg)), ZoneBinaryCallback registerBinaryCallback(Zone self, ZoneDelega te parent, Zone zone, f(arg1, arg2)), AsyncError errorCallback(Zone self, ZoneDe legate parent, Zone zone, Object error, StackTrace stackTrace), void scheduleMic rotask(Zone self, ZoneDelegate parent, Zone zone, f()), Timer createTimer(Zone s elf, ZoneDelegate parent, Zone zone, Duration duration, void f()), Timer createP eriodicTimer(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f( Timer timer)), void print(Zone self, ZoneDelegate parent, Zone zone, String line ), Zone fork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification specif ication, Map zoneValues)}
29 ) = _ZoneSpecification; 29 ) = _ZoneSpecification;
30 factory ZoneSpecification.from(ZoneSpecification other, { 30 factory ZoneSpecification.from(ZoneSpecification other, {
31 dynamic handleUncaughtError(Zone self, ZoneDelegate parent, Zone zone, error, St ackTrace stackTrace) : null, dynamic run(Zone self, ZoneDelegate parent, Zone zo ne, f()) : null, dynamic runUnary(Zone self, ZoneDelegate parent, Zone zone, f(a rg), arg) : null, dynamic runBinary(Zone self, ZoneDelegate parent, Zone zone, f (arg1, arg2), arg1, arg2) : null, ZoneCallback registerCallback(Zone self, ZoneD elegate parent, Zone zone, f()) : null, ZoneUnaryCallback registerUnaryCallback( Zone self, ZoneDelegate parent, Zone zone, f(arg)) : null, ZoneBinaryCallback re gisterBinaryCallback(Zone self, ZoneDelegate parent, Zone zone, f(arg1, arg2)) : null, AsyncError errorCallback(Zone self, ZoneDelegate parent, Zone zone, Objec t error, StackTrace stackTrace), void scheduleMicrotask(Zone self, ZoneDelegate parent, Zone zone, f()) : null, Timer createTimer(Zone self, ZoneDelegate parent , Zone zone, Duration duration, void f()) : null, Timer createPeriodicTimer(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer)) : n ull, void print(Zone self, ZoneDelegate parent, Zone zone, String line) : null, Zone fork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification specifica tion, Map zoneValues) : null} 31 dynamic handleUncaughtError(Zone self, ZoneDelegate parent, Zone zone, error, St ackTrace stackTrace) : null, dynamic run(Zone self, ZoneDelegate parent, Zone zo ne, f()) : null, dynamic runUnary(Zone self, ZoneDelegate parent, Zone zone, f(a rg), arg) : null, dynamic runBinary(Zone self, ZoneDelegate parent, Zone zone, f (arg1, arg2), arg1, arg2) : null, ZoneCallback registerCallback(Zone self, ZoneD elegate parent, Zone zone, f()) : null, ZoneUnaryCallback registerUnaryCallback( Zone self, ZoneDelegate parent, Zone zone, f(arg)) : null, ZoneBinaryCallback re gisterBinaryCallback(Zone self, ZoneDelegate parent, Zone zone, f(arg1, arg2)) : null, AsyncError errorCallback(Zone self, ZoneDelegate parent, Zone zone, Objec t error, StackTrace stackTrace), void scheduleMicrotask(Zone self, ZoneDelegate parent, Zone zone, f()) : null, Timer createTimer(Zone self, ZoneDelegate parent , Zone zone, Duration duration, void f()) : null, Timer createPeriodicTimer(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer)) : n ull, void print(Zone self, ZoneDelegate parent, Zone zone, String line) : null, Zone fork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification specifica tion, Map zoneValues) : null}
32 ) { 32 ) {
33 return new ZoneSpecification(handleUncaughtError: ((__x150) => DEVC$RT.cast(__x1 50, dynamic, __t144, "CastGeneral", """line 138, column 28 of dart:async/zone.da rt: """, __x150 is __t144, false))(handleUncaughtError != null ? handleUncaughtE rror : other.handleUncaughtError), run: ((__x156) => DEVC$RT.cast(__x156, dynami c, __t151, "CastGeneral", """line 141, column 12 of dart:async/zone.dart: """, _ _x156 is __t151, false))(run != null ? run : other.run), runUnary: ((__x164) => DEVC$RT.cast(__x164, dynamic, __t157, "CastGeneral", """line 142, column 17 of d art:async/zone.dart: """, __x164 is __t157, false))(runUnary != null ? runUnary : other.runUnary), runBinary: ((__x174) => DEVC$RT.cast(__x174, dynamic, __t165, "CastGeneral", """line 143, column 18 of dart:async/zone.dart: """, __x174 is _ _t165, false))(runBinary != null ? runBinary : other.runBinary), registerCallbac k: ((__x181) => DEVC$RT.cast(__x181, dynamic, __t175, "CastGeneral", """line 144 , column 25 of dart:async/zone.dart: """, __x181 is __t175, false))(registerCall back != null ? registerCallback : other.registerCallback), registerUnaryCallback : ((__x190) => DEVC$RT.cast(__x190, dynamic, __t182, "CastGeneral", """line 147, column 30 of dart:async/zone.dart: """, __x190 is __t182, false))(registerUnary Callback != null ? registerUnaryCallback : other.registerUnaryCallback), registe rBinaryCallback: ((__x201) => DEVC$RT.cast(__x201, dynamic, __t191, "CastGeneral ", """line 150, column 31 of dart:async/zone.dart: """, __x201 is __t191, false) )(registerBinaryCallback != null ? registerBinaryCallback : other.registerBinary Callback), errorCallback: ((__x208) => DEVC$RT.cast(__x208, dynamic, __t202, "Ca stGeneral", """line 153, column 22 of dart:async/zone.dart: """, __x208 is __t20 2, false))(errorCallback != null ? errorCallback : other.errorCallback), schedul eMicrotask: ((__x214) => DEVC$RT.cast(__x214, dynamic, __t209, "CastGeneral", "" "line 156, column 26 of dart:async/zone.dart: """, __x214 is __t209, false))(sch eduleMicrotask != null ? scheduleMicrotask : other.scheduleMicrotask), createTim er: ((__x221) => DEVC$RT.cast(__x221, dynamic, __t215, "CastGeneral", """line 15 9, column 21 of dart:async/zone.dart: """, __x221 is __t215, false))(createTimer != null ? createTimer : other.createTimer), createPeriodicTimer: ((__x229) => D EVC$RT.cast(__x229, dynamic, __t222, "CastGeneral", """line 160, column 28 of da rt:async/zone.dart: """, __x229 is __t222, false))(createPeriodicTimer != null ? createPeriodicTimer : other.createPeriodicTimer), print: ((__x235) => DEVC$RT.c ast(__x235, dynamic, __t230, "CastGeneral", """line 163, column 15 of dart:async /zone.dart: """, __x235 is __t230, false))(print != null ? print : other.print), fork: ((__x242) => DEVC$RT.cast(__x242, dynamic, __t236, "CastGeneral", """line 164, column 13 of dart:async/zone.dart: """, __x242 is __t236, false))(fork != null ? fork : other.fork)); 33 return new ZoneSpecification(handleUncaughtError: ((__x150) => DEVC$RT.cast(__x1 50, dynamic, __t144, "CompositeCast", """line 138, column 28 of dart:async/zone. dart: """, __x150 is __t144, false))(handleUncaughtError != null ? handleUncaugh tError : other.handleUncaughtError), run: ((__x156) => DEVC$RT.cast(__x156, dyna mic, __t151, "CompositeCast", """line 141, column 12 of dart:async/zone.dart: "" ", __x156 is __t151, false))(run != null ? run : other.run), runUnary: ((__x164) => DEVC$RT.cast(__x164, dynamic, __t157, "CompositeCast", """line 142, column 1 7 of dart:async/zone.dart: """, __x164 is __t157, false))(runUnary != null ? run Unary : other.runUnary), runBinary: ((__x174) => DEVC$RT.cast(__x174, dynamic, _ _t165, "CompositeCast", """line 143, column 18 of dart:async/zone.dart: """, __x 174 is __t165, false))(runBinary != null ? runBinary : other.runBinary), registe rCallback: ((__x181) => DEVC$RT.cast(__x181, dynamic, __t175, "CompositeCast", " ""line 144, column 25 of dart:async/zone.dart: """, __x181 is __t175, false))(re gisterCallback != null ? registerCallback : other.registerCallback), registerUna ryCallback: ((__x190) => DEVC$RT.cast(__x190, dynamic, __t182, "CompositeCast", """line 147, column 30 of dart:async/zone.dart: """, __x190 is __t182, false))(r egisterUnaryCallback != null ? registerUnaryCallback : other.registerUnaryCallba ck), registerBinaryCallback: ((__x201) => DEVC$RT.cast(__x201, dynamic, __t191, "CompositeCast", """line 150, column 31 of dart:async/zone.dart: """, __x201 is __t191, false))(registerBinaryCallback != null ? registerBinaryCallback : other. registerBinaryCallback), errorCallback: ((__x208) => DEVC$RT.cast(__x208, dynami c, __t202, "CompositeCast", """line 153, column 22 of dart:async/zone.dart: """, __x208 is __t202, false))(errorCallback != null ? errorCallback : other.errorCa llback), scheduleMicrotask: ((__x214) => DEVC$RT.cast(__x214, dynamic, __t209, " CompositeCast", """line 156, column 26 of dart:async/zone.dart: """, __x214 is _ _t209, false))(scheduleMicrotask != null ? scheduleMicrotask : other.scheduleMic rotask), createTimer: ((__x221) => DEVC$RT.cast(__x221, dynamic, __t215, "Compos iteCast", """line 159, column 21 of dart:async/zone.dart: """, __x221 is __t215, false))(createTimer != null ? createTimer : other.createTimer), createPeriodicT imer: ((__x229) => DEVC$RT.cast(__x229, dynamic, __t222, "CompositeCast", """lin e 160, column 28 of dart:async/zone.dart: """, __x229 is __t222, false))(createP eriodicTimer != null ? createPeriodicTimer : other.createPeriodicTimer), print: ((__x235) => DEVC$RT.cast(__x235, dynamic, __t230, "CompositeCast", """line 163, column 15 of dart:async/zone.dart: """, __x235 is __t230, false))(print != null ? print : other.print), fork: ((__x242) => DEVC$RT.cast(__x242, dynamic, __t236 , "CompositeCast", """line 164, column 13 of dart:async/zone.dart: """, __x242 i s __t236, false))(fork != null ? fork : other.fork));
34 } 34 }
35 HandleUncaughtErrorHandler get handleUncaughtError; 35 HandleUncaughtErrorHandler get handleUncaughtError;
36 RunHandler get run; 36 RunHandler get run;
37 RunUnaryHandler get runUnary; 37 RunUnaryHandler get runUnary;
38 RunBinaryHandler get runBinary; 38 RunBinaryHandler get runBinary;
39 RegisterCallbackHandler get registerCallback; 39 RegisterCallbackHandler get registerCallback;
40 RegisterUnaryCallbackHandler get registerUnaryCallback; 40 RegisterUnaryCallbackHandler get registerUnaryCallback;
41 RegisterBinaryCallbackHandler get registerBinaryCallback; 41 RegisterBinaryCallbackHandler get registerBinaryCallback;
42 ErrorCallbackHandler get errorCallback; 42 ErrorCallbackHandler get errorCallback;
43 ScheduleMicrotaskHandler get scheduleMicrotask; 43 ScheduleMicrotaskHandler get scheduleMicrotask;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return (implementation.function)(implZone, _parentDelegate(implZone), zone, f, arg); 143 return (implementation.function)(implZone, _parentDelegate(implZone), zone, f, arg);
144 } 144 }
145 dynamic runBinary(Zone zone, f(arg1, arg2), arg1, arg2) { 145 dynamic runBinary(Zone zone, f(arg1, arg2), arg1, arg2) {
146 _ZoneFunction implementation = _delegationTarget._runBinary; 146 _ZoneFunction implementation = _delegationTarget._runBinary;
147 _Zone implZone = implementation.zone; 147 _Zone implZone = implementation.zone;
148 return (implementation.function)(implZone, _parentDelegate(implZone), zone, f, arg1, arg2); 148 return (implementation.function)(implZone, _parentDelegate(implZone), zone, f, arg1, arg2);
149 } 149 }
150 ZoneCallback registerCallback(Zone zone, f()) { 150 ZoneCallback registerCallback(Zone zone, f()) {
151 _ZoneFunction implementation = _delegationTarget._registerCallback; 151 _ZoneFunction implementation = _delegationTarget._registerCallback;
152 _Zone implZone = implementation.zone; 152 _Zone implZone = implementation.zone;
153 return ((__x243) => DEVC$RT.cast(__x243, dynamic, __t180, "CastGeneral", """lin e 522, column 12 of dart:async/zone.dart: """, __x243 is __t180, true))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f)); 153 return ((__x243) => DEVC$RT.cast(__x243, dynamic, __t180, "DynamicCast", """lin e 522, column 12 of dart:async/zone.dart: """, __x243 is __t180, true))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f));
154 } 154 }
155 ZoneUnaryCallback registerUnaryCallback(Zone zone, f(arg)) { 155 ZoneUnaryCallback registerUnaryCallback(Zone zone, f(arg)) {
156 _ZoneFunction implementation = _delegationTarget._registerUnaryCallback; 156 _ZoneFunction implementation = _delegationTarget._registerUnaryCallback;
157 _Zone implZone = implementation.zone; 157 _Zone implZone = implementation.zone;
158 return ((__x244) => DEVC$RT.cast(__x244, dynamic, __t188, "CastGeneral", """lin e 529, column 12 of dart:async/zone.dart: """, __x244 is __t188, true))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f)); 158 return ((__x244) => DEVC$RT.cast(__x244, dynamic, __t188, "DynamicCast", """lin e 529, column 12 of dart:async/zone.dart: """, __x244 is __t188, true))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f));
159 } 159 }
160 ZoneBinaryCallback registerBinaryCallback(Zone zone, f(arg1, arg2)) { 160 ZoneBinaryCallback registerBinaryCallback(Zone zone, f(arg1, arg2)) {
161 _ZoneFunction implementation = _delegationTarget._registerBinaryCallback; 161 _ZoneFunction implementation = _delegationTarget._registerBinaryCallback;
162 _Zone implZone = implementation.zone; 162 _Zone implZone = implementation.zone;
163 return ((__x245) => DEVC$RT.cast(__x245, dynamic, __t198, "CastGeneral", """lin e 536, column 12 of dart:async/zone.dart: """, __x245 is __t198, true))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f)); 163 return ((__x245) => DEVC$RT.cast(__x245, dynamic, __t198, "DynamicCast", """lin e 536, column 12 of dart:async/zone.dart: """, __x245 is __t198, true))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f));
164 } 164 }
165 AsyncError errorCallback(Zone zone, Object error, StackTrace stackTrace) { 165 AsyncError errorCallback(Zone zone, Object error, StackTrace stackTrace) {
166 _ZoneFunction implementation = _delegationTarget._errorCallback; 166 _ZoneFunction implementation = _delegationTarget._errorCallback;
167 _Zone implZone = implementation.zone; 167 _Zone implZone = implementation.zone;
168 if (identical(implZone, _ROOT_ZONE)) return null; 168 if (identical(implZone, _ROOT_ZONE)) return null;
169 return ((__x246) => DEVC$RT.cast(__x246, dynamic, AsyncError, "CastGeneral", "" "line 544, column 12 of dart:async/zone.dart: """, __x246 is AsyncError, true))( (implementation.function)(implZone, _parentDelegate(implZone), zone, error, stac kTrace)); 169 return ((__x246) => DEVC$RT.cast(__x246, dynamic, AsyncError, "DynamicCast", "" "line 544, column 12 of dart:async/zone.dart: """, __x246 is AsyncError, true))( (implementation.function)(implZone, _parentDelegate(implZone), zone, error, stac kTrace));
170 } 170 }
171 void scheduleMicrotask(Zone zone, f()) { 171 void scheduleMicrotask(Zone zone, f()) {
172 _ZoneFunction implementation = _delegationTarget._scheduleMicrotask; 172 _ZoneFunction implementation = _delegationTarget._scheduleMicrotask;
173 _Zone implZone = implementation.zone; 173 _Zone implZone = implementation.zone;
174 (implementation.function)(implZone, _parentDelegate(implZone), zone, f); 174 (implementation.function)(implZone, _parentDelegate(implZone), zone, f);
175 } 175 }
176 Timer createTimer(Zone zone, Duration duration, void f()) { 176 Timer createTimer(Zone zone, Duration duration, void f()) {
177 _ZoneFunction implementation = _delegationTarget._createTimer; 177 _ZoneFunction implementation = _delegationTarget._createTimer;
178 _Zone implZone = implementation.zone; 178 _Zone implZone = implementation.zone;
179 return ((__x247) => DEVC$RT.cast(__x247, dynamic, Timer, "CastGeneral", """line 558, column 12 of dart:async/zone.dart: """, __x247 is Timer, true))((implement ation.function)(implZone, _parentDelegate(implZone), zone, duration, f)); 179 return ((__x247) => DEVC$RT.cast(__x247, dynamic, Timer, "DynamicCast", """line 558, column 12 of dart:async/zone.dart: """, __x247 is Timer, true))((implement ation.function)(implZone, _parentDelegate(implZone), zone, duration, f));
180 } 180 }
181 Timer createPeriodicTimer(Zone zone, Duration period, void f(Timer timer)) { 181 Timer createPeriodicTimer(Zone zone, Duration period, void f(Timer timer)) {
182 _ZoneFunction implementation = _delegationTarget._createPeriodicTimer; 182 _ZoneFunction implementation = _delegationTarget._createPeriodicTimer;
183 _Zone implZone = implementation.zone; 183 _Zone implZone = implementation.zone;
184 return ((__x248) => DEVC$RT.cast(__x248, dynamic, Timer, "CastGeneral", """line 565, column 12 of dart:async/zone.dart: """, __x248 is Timer, true))((implement ation.function)(implZone, _parentDelegate(implZone), zone, period, f)); 184 return ((__x248) => DEVC$RT.cast(__x248, dynamic, Timer, "DynamicCast", """line 565, column 12 of dart:async/zone.dart: """, __x248 is Timer, true))((implement ation.function)(implZone, _parentDelegate(implZone), zone, period, f));
185 } 185 }
186 void print(Zone zone, String line) { 186 void print(Zone zone, String line) {
187 _ZoneFunction implementation = _delegationTarget._print; 187 _ZoneFunction implementation = _delegationTarget._print;
188 _Zone implZone = implementation.zone; 188 _Zone implZone = implementation.zone;
189 (implementation.function)(implZone, _parentDelegate(implZone), zone, line); 189 (implementation.function)(implZone, _parentDelegate(implZone), zone, line);
190 } 190 }
191 Zone fork(Zone zone, ZoneSpecification specification, Map zoneValues) { 191 Zone fork(Zone zone, ZoneSpecification specification, Map zoneValues) {
192 _ZoneFunction implementation = _delegationTarget._fork; 192 _ZoneFunction implementation = _delegationTarget._fork;
193 _Zone implZone = implementation.zone; 193 _Zone implZone = implementation.zone;
194 return ((__x249) => DEVC$RT.cast(__x249, dynamic, Zone, "CastGeneral", """line 580, column 12 of dart:async/zone.dart: """, __x249 is Zone, true))((implementat ion.function)(implZone, _parentDelegate(implZone), zone, specification, zoneValu es)); 194 return ((__x249) => DEVC$RT.cast(__x249, dynamic, Zone, "DynamicCast", """line 580, column 12 of dart:async/zone.dart: """, __x249 is Zone, true))((implementat ion.function)(implZone, _parentDelegate(implZone), zone, specification, zoneValu es));
195 } 195 }
196 } 196 }
197 abstract class _Zone implements Zone {const _Zone(); 197 abstract class _Zone implements Zone {const _Zone();
198 _ZoneFunction get _runUnary; 198 _ZoneFunction get _runUnary;
199 _ZoneFunction get _run; 199 _ZoneFunction get _run;
200 _ZoneFunction get _runBinary; 200 _ZoneFunction get _runBinary;
201 _ZoneFunction get _registerCallback; 201 _ZoneFunction get _registerCallback;
202 _ZoneFunction get _registerUnaryCallback; 202 _ZoneFunction get _registerUnaryCallback;
203 _ZoneFunction get _registerBinaryCallback; 203 _ZoneFunction get _registerBinaryCallback;
204 _ZoneFunction get _errorCallback; 204 _ZoneFunction get _errorCallback;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 dynamic handleUncaughtError(error, StackTrace stackTrace) { 324 dynamic handleUncaughtError(error, StackTrace stackTrace) {
325 _ZoneFunction implementation = this._handleUncaughtError; 325 _ZoneFunction implementation = this._handleUncaughtError;
326 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 326 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
327 return (implementation.function)(implementation.zone, parentDelegate, this, err or, stackTrace); 327 return (implementation.function)(implementation.zone, parentDelegate, this, err or, stackTrace);
328 } 328 }
329 Zone fork({ 329 Zone fork({
330 ZoneSpecification specification, Map zoneValues} 330 ZoneSpecification specification, Map zoneValues}
331 ) { 331 ) {
332 _ZoneFunction implementation = this._fork; 332 _ZoneFunction implementation = this._fork;
333 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 333 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
334 return ((__x250) => DEVC$RT.cast(__x250, dynamic, Zone, "CastGeneral", """line 787, column 12 of dart:async/zone.dart: """, __x250 is Zone, true))((implementat ion.function)(implementation.zone, parentDelegate, this, specification, zoneValu es)); 334 return ((__x250) => DEVC$RT.cast(__x250, dynamic, Zone, "DynamicCast", """line 787, column 12 of dart:async/zone.dart: """, __x250 is Zone, true))((implementat ion.function)(implementation.zone, parentDelegate, this, specification, zoneValu es));
335 } 335 }
336 dynamic run(f()) { 336 dynamic run(f()) {
337 _ZoneFunction implementation = this._run; 337 _ZoneFunction implementation = this._run;
338 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 338 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
339 return (implementation.function)(implementation.zone, parentDelegate, this, f); 339 return (implementation.function)(implementation.zone, parentDelegate, this, f);
340 } 340 }
341 dynamic runUnary(f(arg), arg) { 341 dynamic runUnary(f(arg), arg) {
342 _ZoneFunction implementation = this._runUnary; 342 _ZoneFunction implementation = this._runUnary;
343 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 343 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
344 return (implementation.function)(implementation.zone, parentDelegate, this, f, arg); 344 return (implementation.function)(implementation.zone, parentDelegate, this, f, arg);
345 } 345 }
346 dynamic runBinary(f(arg1, arg2), arg1, arg2) { 346 dynamic runBinary(f(arg1, arg2), arg1, arg2) {
347 _ZoneFunction implementation = this._runBinary; 347 _ZoneFunction implementation = this._runBinary;
348 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 348 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
349 return (implementation.function)(implementation.zone, parentDelegate, this, f, arg1, arg2); 349 return (implementation.function)(implementation.zone, parentDelegate, this, f, arg1, arg2);
350 } 350 }
351 ZoneCallback registerCallback(f()) { 351 ZoneCallback registerCallback(f()) {
352 _ZoneFunction implementation = this._registerCallback; 352 _ZoneFunction implementation = this._registerCallback;
353 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 353 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
354 return ((__x251) => DEVC$RT.cast(__x251, dynamic, __t180, "CastGeneral", """lin e 820, column 12 of dart:async/zone.dart: """, __x251 is __t180, true))((impleme ntation.function)(implementation.zone, parentDelegate, this, f)); 354 return ((__x251) => DEVC$RT.cast(__x251, dynamic, __t180, "DynamicCast", """lin e 820, column 12 of dart:async/zone.dart: """, __x251 is __t180, true))((impleme ntation.function)(implementation.zone, parentDelegate, this, f));
355 } 355 }
356 ZoneUnaryCallback registerUnaryCallback(f(arg)) { 356 ZoneUnaryCallback registerUnaryCallback(f(arg)) {
357 _ZoneFunction implementation = this._registerUnaryCallback; 357 _ZoneFunction implementation = this._registerUnaryCallback;
358 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 358 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
359 return ((__x252) => DEVC$RT.cast(__x252, dynamic, __t188, "CastGeneral", """lin e 828, column 12 of dart:async/zone.dart: """, __x252 is __t188, true))((impleme ntation.function)(implementation.zone, parentDelegate, this, f)); 359 return ((__x252) => DEVC$RT.cast(__x252, dynamic, __t188, "DynamicCast", """lin e 828, column 12 of dart:async/zone.dart: """, __x252 is __t188, true))((impleme ntation.function)(implementation.zone, parentDelegate, this, f));
360 } 360 }
361 ZoneBinaryCallback registerBinaryCallback(f(arg1, arg2)) { 361 ZoneBinaryCallback registerBinaryCallback(f(arg1, arg2)) {
362 _ZoneFunction implementation = this._registerBinaryCallback; 362 _ZoneFunction implementation = this._registerBinaryCallback;
363 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 363 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
364 return ((__x253) => DEVC$RT.cast(__x253, dynamic, __t198, "CastGeneral", """lin e 836, column 12 of dart:async/zone.dart: """, __x253 is __t198, true))((impleme ntation.function)(implementation.zone, parentDelegate, this, f)); 364 return ((__x253) => DEVC$RT.cast(__x253, dynamic, __t198, "DynamicCast", """lin e 836, column 12 of dart:async/zone.dart: """, __x253 is __t198, true))((impleme ntation.function)(implementation.zone, parentDelegate, this, f));
365 } 365 }
366 AsyncError errorCallback(Object error, StackTrace stackTrace) { 366 AsyncError errorCallback(Object error, StackTrace stackTrace) {
367 final _ZoneFunction implementation = this._errorCallback; 367 final _ZoneFunction implementation = this._errorCallback;
368 assert (implementation != null); final Zone implementationZone = implementation .zone; 368 assert (implementation != null); final Zone implementationZone = implementation .zone;
369 if (identical(implementationZone, _ROOT_ZONE)) return null; 369 if (identical(implementationZone, _ROOT_ZONE)) return null;
370 final ZoneDelegate parentDelegate = _parentDelegate(DEVC$RT.cast(implementation Zone, Zone, _Zone, "CastGeneral", """line 845, column 57 of dart:async/zone.dart : """, implementationZone is _Zone, true)); 370 final ZoneDelegate parentDelegate = _parentDelegate(DEVC$RT.cast(implementation Zone, Zone, _Zone, "ImplicitCast", """line 845, column 57 of dart:async/zone.dar t: """, implementationZone is _Zone, true));
371 return ((__x254) => DEVC$RT.cast(__x254, dynamic, AsyncError, "CastGeneral", "" "line 846, column 12 of dart:async/zone.dart: """, __x254 is AsyncError, true))( (implementation.function)(implementationZone, parentDelegate, this, error, stack Trace)); 371 return ((__x254) => DEVC$RT.cast(__x254, dynamic, AsyncError, "DynamicCast", "" "line 846, column 12 of dart:async/zone.dart: """, __x254 is AsyncError, true))( (implementation.function)(implementationZone, parentDelegate, this, error, stack Trace));
372 } 372 }
373 void scheduleMicrotask(void f()) { 373 void scheduleMicrotask(void f()) {
374 _ZoneFunction implementation = this._scheduleMicrotask; 374 _ZoneFunction implementation = this._scheduleMicrotask;
375 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 375 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
376 return (implementation.function)(implementation.zone, parentDelegate, this, f); 376 return (implementation.function)(implementation.zone, parentDelegate, this, f);
377 } 377 }
378 Timer createTimer(Duration duration, void f()) { 378 Timer createTimer(Duration duration, void f()) {
379 _ZoneFunction implementation = this._createTimer; 379 _ZoneFunction implementation = this._createTimer;
380 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 380 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
381 return ((__x255) => DEVC$RT.cast(__x255, dynamic, Timer, "CastGeneral", """line 862, column 12 of dart:async/zone.dart: """, __x255 is Timer, true))((implement ation.function)(implementation.zone, parentDelegate, this, duration, f)); 381 return ((__x255) => DEVC$RT.cast(__x255, dynamic, Timer, "DynamicCast", """line 862, column 12 of dart:async/zone.dart: """, __x255 is Timer, true))((implement ation.function)(implementation.zone, parentDelegate, this, duration, f));
382 } 382 }
383 Timer createPeriodicTimer(Duration duration, void f(Timer timer)) { 383 Timer createPeriodicTimer(Duration duration, void f(Timer timer)) {
384 _ZoneFunction implementation = this._createPeriodicTimer; 384 _ZoneFunction implementation = this._createPeriodicTimer;
385 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 385 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
386 return ((__x256) => DEVC$RT.cast(__x256, dynamic, Timer, "CastGeneral", """line 870, column 12 of dart:async/zone.dart: """, __x256 is Timer, true))((implement ation.function)(implementation.zone, parentDelegate, this, duration, f)); 386 return ((__x256) => DEVC$RT.cast(__x256, dynamic, Timer, "DynamicCast", """line 870, column 12 of dart:async/zone.dart: """, __x256 is Timer, true))((implement ation.function)(implementation.zone, parentDelegate, this, duration, f));
387 } 387 }
388 void print(String line) { 388 void print(String line) {
389 _ZoneFunction implementation = this._print; 389 _ZoneFunction implementation = this._print;
390 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone); 390 assert (implementation != null); ZoneDelegate parentDelegate = _parentDelegate( implementation.zone);
391 return (implementation.function)(implementation.zone, parentDelegate, this, lin e); 391 return (implementation.function)(implementation.zone, parentDelegate, this, lin e);
392 } 392 }
393 } 393 }
394 void _rootHandleUncaughtError(Zone self, ZoneDelegate parent, Zone zone, error, StackTrace stackTrace) { 394 void _rootHandleUncaughtError(Zone self, ZoneDelegate parent, Zone zone, error, StackTrace stackTrace) {
395 _schedulePriorityAsyncCallback(() { 395 _schedulePriorityAsyncCallback(() {
396 throw new _UncaughtAsyncError(error, stackTrace); 396 throw new _UncaughtAsyncError(error, stackTrace);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 if (zone is _Zone) { 479 if (zone is _Zone) {
480 valueMap = zone._map; 480 valueMap = zone._map;
481 } 481 }
482 else { 482 else {
483 valueMap = new HashMap(); 483 valueMap = new HashMap();
484 } 484 }
485 } 485 }
486 else { 486 else {
487 valueMap = new HashMap.from(zoneValues); 487 valueMap = new HashMap.from(zoneValues);
488 } 488 }
489 return new _CustomZone(DEVC$RT.cast(zone, Zone, _Zone, "CastGeneral", """line 9 99, column 26 of dart:async/zone.dart: """, zone is _Zone, true), specification, valueMap); 489 return new _CustomZone(DEVC$RT.cast(zone, Zone, _Zone, "ImplicitCast", """line 999, column 26 of dart:async/zone.dart: """, zone is _Zone, true), specification , valueMap);
490 } 490 }
491 class _RootZoneSpecification implements ZoneSpecification {HandleUncaughtErrorH andler get handleUncaughtError => _rootHandleUncaughtError; 491 class _RootZoneSpecification implements ZoneSpecification {HandleUncaughtErrorH andler get handleUncaughtError => _rootHandleUncaughtError;
492 RunHandler get run => _rootRun; 492 RunHandler get run => _rootRun;
493 RunUnaryHandler get runUnary => _rootRunUnary; 493 RunUnaryHandler get runUnary => _rootRunUnary;
494 RunBinaryHandler get runBinary => _rootRunBinary; 494 RunBinaryHandler get runBinary => _rootRunBinary;
495 RegisterCallbackHandler get registerCallback => _rootRegisterCallback; 495 RegisterCallbackHandler get registerCallback => _rootRegisterCallback;
496 RegisterUnaryCallbackHandler get registerUnaryCallback => _rootRegisterUnaryCal lback; 496 RegisterUnaryCallbackHandler get registerUnaryCallback => _rootRegisterUnaryCal lback;
497 RegisterBinaryCallbackHandler get registerBinaryCallback => _rootRegisterBinary Callback; 497 RegisterBinaryCallbackHandler get registerBinaryCallback => _rootRegisterBinary Callback;
498 ErrorCallbackHandler get errorCallback => _rootErrorCallback; 498 ErrorCallbackHandler get errorCallback => _rootErrorCallback;
499 ScheduleMicrotaskHandler get scheduleMicrotask => _rootScheduleMicrotask; 499 ScheduleMicrotaskHandler get scheduleMicrotask => _rootScheduleMicrotask;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 dynamic runZoned(body(), { 630 dynamic runZoned(body(), {
631 Map zoneValues, ZoneSpecification zoneSpecification, Function onError} 631 Map zoneValues, ZoneSpecification zoneSpecification, Function onError}
632 ) { 632 ) {
633 HandleUncaughtErrorHandler errorHandler; 633 HandleUncaughtErrorHandler errorHandler;
634 if (onError != null) { 634 if (onError != null) {
635 errorHandler = (Zone self, ZoneDelegate parent, Zone zone, error, StackTrace sta ckTrace) { 635 errorHandler = (Zone self, ZoneDelegate parent, Zone zone, error, StackTrace sta ckTrace) {
636 try { 636 try {
637 if (onError is ZoneBinaryCallback) { 637 if (onError is ZoneBinaryCallback) {
638 return self.parent.runBinary(onError, error, stackTrace); 638 return self.parent.runBinary(onError, error, stackTrace);
639 } 639 }
640 return self.parent.runUnary(DEVC$RT.cast(onError, Function, __t188, "CastGenera l", """line 1228, column 37 of dart:async/zone.dart: """, onError is __t188, tru e), error); 640 return self.parent.runUnary(DEVC$RT.cast(onError, Function, __t188, "ImplicitCa st", """line 1228, column 37 of dart:async/zone.dart: """, onError is __t188, tr ue), error);
641 } 641 }
642 catch (e, s) { 642 catch (e, s) {
643 if (identical(e, error)) { 643 if (identical(e, error)) {
644 return parent.handleUncaughtError(zone, error, stackTrace); 644 return parent.handleUncaughtError(zone, error, stackTrace);
645 } 645 }
646 else { 646 else {
647 return parent.handleUncaughtError(zone, e, s); 647 return parent.handleUncaughtError(zone, e, s);
648 } 648 }
649 } 649 }
650 } 650 }
(...skipping 23 matching lines...) Expand all
674 typedef __t188 __t182(Zone __u183, ZoneDelegate __u184, Zone __u185, dynamic __ u186(dynamic __u187)); 674 typedef __t188 __t182(Zone __u183, ZoneDelegate __u184, Zone __u185, dynamic __ u186(dynamic __u187));
675 typedef dynamic __t198(dynamic __u199, dynamic __u200); 675 typedef dynamic __t198(dynamic __u199, dynamic __u200);
676 typedef __t198 __t191(Zone __u192, ZoneDelegate __u193, Zone __u194, dynamic __ u195(dynamic __u196, dynamic __u197)); 676 typedef __t198 __t191(Zone __u192, ZoneDelegate __u193, Zone __u194, dynamic __ u195(dynamic __u196, dynamic __u197));
677 typedef AsyncError __t202(Zone __u203, ZoneDelegate __u204, Zone __u205, Object __u206, StackTrace __u207); 677 typedef AsyncError __t202(Zone __u203, ZoneDelegate __u204, Zone __u205, Object __u206, StackTrace __u207);
678 typedef void __t209(Zone __u210, ZoneDelegate __u211, Zone __u212, dynamic __u2 13()); 678 typedef void __t209(Zone __u210, ZoneDelegate __u211, Zone __u212, dynamic __u2 13());
679 typedef Timer __t215(Zone __u216, ZoneDelegate __u217, Zone __u218, Duration __ u219, void __u220()); 679 typedef Timer __t215(Zone __u216, ZoneDelegate __u217, Zone __u218, Duration __ u219, void __u220());
680 typedef Timer __t222(Zone __u223, ZoneDelegate __u224, Zone __u225, Duration __ u226, void __u227(Timer __u228)); 680 typedef Timer __t222(Zone __u223, ZoneDelegate __u224, Zone __u225, Duration __ u226, void __u227(Timer __u228));
681 typedef void __t230(Zone __u231, ZoneDelegate __u232, Zone __u233, String __u23 4); 681 typedef void __t230(Zone __u231, ZoneDelegate __u232, Zone __u233, String __u23 4);
682 typedef Zone __t236(Zone __u237, ZoneDelegate __u238, Zone __u239, ZoneSpecific ation __u240, Map<dynamic, dynamic> __u241); 682 typedef Zone __t236(Zone __u237, ZoneDelegate __u238, Zone __u239, ZoneSpecific ation __u240, Map<dynamic, dynamic> __u241);
683 typedef void __t258(Timer __u259); 683 typedef void __t258(Timer __u259);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/async/stream_transformers.dart ('k') | test/dart_codegen/expect/c/c.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698