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

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

Issue 959003003: Typecheck constructor initializers properly (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() => ((__x131) => DDC$RT.cast(__x131, dynamic, String, "CastGen eral", """line 46, column 24 of dart:async/zone.dart: """, __x131 is String, tru e))(error.toString()); 21 String toString() => ((__x181) => DDC$RT.cast(__x181, dynamic, String, "CastGen eral", """line 46, column 24 of dart:async/zone.dart: """, __x181 is String, tru e))(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: handleUncaughtError != null ? handleUncaughtError : other.handleUncaughtError, run: run != null ? run : other. run, runUnary: runUnary != null ? runUnary : other.runUnary, runBinary: runBinar y != null ? runBinary : other.runBinary, registerCallback: registerCallback != n ull ? registerCallback : other.registerCallback, registerUnaryCallback: register UnaryCallback != null ? registerUnaryCallback : other.registerUnaryCallback, reg isterBinaryCallback: registerBinaryCallback != null ? registerBinaryCallback : o ther.registerBinaryCallback, errorCallback: errorCallback != null ? errorCallbac k : other.errorCallback, scheduleMicrotask: scheduleMicrotask != null ? schedule Microtask : other.scheduleMicrotask, createTimer: createTimer != null ? createTi mer : other.createTimer, createPeriodicTimer: createPeriodicTimer != null ? crea tePeriodicTimer : other.createPeriodicTimer, print: print != null ? print : othe r.print, fork: fork != null ? fork : other.fork); 33 return new ZoneSpecification(handleUncaughtError: ((__x188) => DDC$RT.cast(__x18 8, dynamic, __t182, "CastGeneral", """line 138, column 28 of dart:async/zone.dar t: """, __x188 is __t182, false))(handleUncaughtError != null ? handleUncaughtEr ror : other.handleUncaughtError), run: ((__x194) => DDC$RT.cast(__x194, dynamic, __t189, "CastGeneral", """line 141, column 12 of dart:async/zone.dart: """, __x 194 is __t189, false))(run != null ? run : other.run), runUnary: ((__x202) => DD C$RT.cast(__x202, dynamic, __t195, "CastGeneral", """line 142, column 17 of dart :async/zone.dart: """, __x202 is __t195, false))(runUnary != null ? runUnary : o ther.runUnary), runBinary: ((__x212) => DDC$RT.cast(__x212, dynamic, __t203, "Ca stGeneral", """line 143, column 18 of dart:async/zone.dart: """, __x212 is __t20 3, false))(runBinary != null ? runBinary : other.runBinary), registerCallback: ( (__x219) => DDC$RT.cast(__x219, dynamic, __t213, "CastGeneral", """line 144, col umn 25 of dart:async/zone.dart: """, __x219 is __t213, false))(registerCallback != null ? registerCallback : other.registerCallback), registerUnaryCallback: ((_ _x228) => DDC$RT.cast(__x228, dynamic, __t220, "CastGeneral", """line 147, colum n 30 of dart:async/zone.dart: """, __x228 is __t220, false))(registerUnaryCallba ck != null ? registerUnaryCallback : other.registerUnaryCallback), registerBinar yCallback: ((__x239) => DDC$RT.cast(__x239, dynamic, __t229, "CastGeneral", """l ine 150, column 31 of dart:async/zone.dart: """, __x239 is __t229, false))(regis terBinaryCallback != null ? registerBinaryCallback : other.registerBinaryCallbac k), errorCallback: ((__x246) => DDC$RT.cast(__x246, dynamic, __t240, "CastGenera l", """line 153, column 22 of dart:async/zone.dart: """, __x246 is __t240, false ))(errorCallback != null ? errorCallback : other.errorCallback), scheduleMicrota sk: ((__x252) => DDC$RT.cast(__x252, dynamic, __t247, "CastGeneral", """line 156 , column 26 of dart:async/zone.dart: """, __x252 is __t247, false))(scheduleMicr otask != null ? scheduleMicrotask : other.scheduleMicrotask), createTimer: ((__x 259) => DDC$RT.cast(__x259, dynamic, __t253, "CastGeneral", """line 159, column 21 of dart:async/zone.dart: """, __x259 is __t253, false))(createTimer != null ? createTimer : other.createTimer), createPeriodicTimer: ((__x267) => DDC$RT.cast (__x267, dynamic, __t260, "CastGeneral", """line 160, column 28 of dart:async/zo ne.dart: """, __x267 is __t260, false))(createPeriodicTimer != null ? createPeri odicTimer : other.createPeriodicTimer), print: ((__x273) => DDC$RT.cast(__x273, dynamic, __t268, "CastGeneral", """line 163, column 15 of dart:async/zone.dart: """, __x273 is __t268, false))(print != null ? print : other.print), fork: ((__x 280) => DDC$RT.cast(__x280, dynamic, __t274, "CastGeneral", """line 164, column 13 of dart:async/zone.dart: """, __x280 is __t274, 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 ((__x133) => DDC$RT.cast(__x133, dynamic, __t132, "CastGeneral", """line 522, column 12 of dart:async/zone.dart: """, __x133 is __t132, false))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f)); 153 return ((__x281) => DDC$RT.cast(__x281, dynamic, __t218, "CastGeneral", """line 522, column 12 of dart:async/zone.dart: """, __x281 is __t218, false))((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 ((__x136) => DDC$RT.cast(__x136, dynamic, __t134, "CastGeneral", """line 529, column 12 of dart:async/zone.dart: """, __x136 is __t134, false))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f)); 158 return ((__x282) => DDC$RT.cast(__x282, dynamic, __t226, "CastGeneral", """line 529, column 12 of dart:async/zone.dart: """, __x282 is __t226, false))((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 ((__x140) => DDC$RT.cast(__x140, dynamic, __t137, "CastGeneral", """line 536, column 12 of dart:async/zone.dart: """, __x140 is __t137, false))((impleme ntation.function)(implZone, _parentDelegate(implZone), zone, f)); 163 return ((__x283) => DDC$RT.cast(__x283, dynamic, __t236, "CastGeneral", """line 536, column 12 of dart:async/zone.dart: """, __x283 is __t236, false))((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 ((__x141) => DDC$RT.cast(__x141, dynamic, AsyncError, "CastGeneral", """ line 544, column 12 of dart:async/zone.dart: """, __x141 is AsyncError, true))(( implementation.function)(implZone, _parentDelegate(implZone), zone, error, stack Trace)); 169 return ((__x284) => DDC$RT.cast(__x284, dynamic, AsyncError, "CastGeneral", """ line 544, column 12 of dart:async/zone.dart: """, __x284 is AsyncError, true))(( implementation.function)(implZone, _parentDelegate(implZone), zone, error, stack Trace));
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 ((__x142) => DDC$RT.cast(__x142, dynamic, Timer, "CastGeneral", """line 558, column 12 of dart:async/zone.dart: """, __x142 is Timer, true))((implementa tion.function)(implZone, _parentDelegate(implZone), zone, duration, f)); 179 return ((__x285) => DDC$RT.cast(__x285, dynamic, Timer, "CastGeneral", """line 558, column 12 of dart:async/zone.dart: """, __x285 is Timer, true))((implementa tion.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 ((__x143) => DDC$RT.cast(__x143, dynamic, Timer, "CastGeneral", """line 565, column 12 of dart:async/zone.dart: """, __x143 is Timer, true))((implementa tion.function)(implZone, _parentDelegate(implZone), zone, period, f)); 184 return ((__x286) => DDC$RT.cast(__x286, dynamic, Timer, "CastGeneral", """line 565, column 12 of dart:async/zone.dart: """, __x286 is Timer, true))((implementa tion.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 ((__x144) => DDC$RT.cast(__x144, dynamic, Zone, "CastGeneral", """line 5 80, column 12 of dart:async/zone.dart: """, __x144 is Zone, true))((implementati on.function)(implZone, _parentDelegate(implZone), zone, specification, zoneValue s)); 194 return ((__x287) => DDC$RT.cast(__x287, dynamic, Zone, "CastGeneral", """line 5 80, column 12 of dart:async/zone.dart: """, __x287 is Zone, true))((implementati on.function)(implZone, _parentDelegate(implZone), zone, specification, zoneValue s));
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 ((__x145) => DDC$RT.cast(__x145, dynamic, Zone, "CastGeneral", """line 7 87, column 12 of dart:async/zone.dart: """, __x145 is Zone, true))((implementati on.function)(implementation.zone, parentDelegate, this, specification, zoneValue s)); 334 return ((__x288) => DDC$RT.cast(__x288, dynamic, Zone, "CastGeneral", """line 7 87, column 12 of dart:async/zone.dart: """, __x288 is Zone, true))((implementati on.function)(implementation.zone, parentDelegate, this, specification, zoneValue s));
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 ((__x146) => DDC$RT.cast(__x146, dynamic, __t132, "CastGeneral", """line 820, column 12 of dart:async/zone.dart: """, __x146 is __t132, false))((impleme ntation.function)(implementation.zone, parentDelegate, this, f)); 354 return ((__x289) => DDC$RT.cast(__x289, dynamic, __t218, "CastGeneral", """line 820, column 12 of dart:async/zone.dart: """, __x289 is __t218, false))((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 ((__x147) => DDC$RT.cast(__x147, dynamic, __t134, "CastGeneral", """line 828, column 12 of dart:async/zone.dart: """, __x147 is __t134, false))((impleme ntation.function)(implementation.zone, parentDelegate, this, f)); 359 return ((__x290) => DDC$RT.cast(__x290, dynamic, __t226, "CastGeneral", """line 828, column 12 of dart:async/zone.dart: """, __x290 is __t226, false))((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 ((__x148) => DDC$RT.cast(__x148, dynamic, __t137, "CastGeneral", """line 836, column 12 of dart:async/zone.dart: """, __x148 is __t137, false))((impleme ntation.function)(implementation.zone, parentDelegate, this, f)); 364 return ((__x291) => DDC$RT.cast(__x291, dynamic, __t236, "CastGeneral", """line 836, column 12 of dart:async/zone.dart: """, __x291 is __t236, false))((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(DDC$RT.cast(implementationZ one, Zone, _Zone, "CastGeneral", """line 845, column 57 of dart:async/zone.dart: """, implementationZone is _Zone, true)); 370 final ZoneDelegate parentDelegate = _parentDelegate(DDC$RT.cast(implementationZ one, Zone, _Zone, "CastGeneral", """line 845, column 57 of dart:async/zone.dart: """, implementationZone is _Zone, true));
371 return ((__x149) => DDC$RT.cast(__x149, dynamic, AsyncError, "CastGeneral", """ line 846, column 12 of dart:async/zone.dart: """, __x149 is AsyncError, true))(( implementation.function)(implementationZone, parentDelegate, this, error, stackT race)); 371 return ((__x292) => DDC$RT.cast(__x292, dynamic, AsyncError, "CastGeneral", """ line 846, column 12 of dart:async/zone.dart: """, __x292 is AsyncError, true))(( implementation.function)(implementationZone, parentDelegate, this, error, stackT race));
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 ((__x150) => DDC$RT.cast(__x150, dynamic, Timer, "CastGeneral", """line 862, column 12 of dart:async/zone.dart: """, __x150 is Timer, true))((implementa tion.function)(implementation.zone, parentDelegate, this, duration, f)); 381 return ((__x293) => DDC$RT.cast(__x293, dynamic, Timer, "CastGeneral", """line 862, column 12 of dart:async/zone.dart: """, __x293 is Timer, true))((implementa tion.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 ((__x151) => DDC$RT.cast(__x151, dynamic, Timer, "CastGeneral", """line 870, column 12 of dart:async/zone.dart: """, __x151 is Timer, true))((implementa tion.function)(implementation.zone, parentDelegate, this, duration, f)); 386 return ((__x294) => DDC$RT.cast(__x294, dynamic, Timer, "CastGeneral", """line 870, column 12 of dart:async/zone.dart: """, __x294 is Timer, true))((implementa tion.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 _scheduleAsyncCallback(f); 445 _scheduleAsyncCallback(f);
446 } 446 }
447 Timer _rootCreateTimer(Zone self, ZoneDelegate parent, Zone zone, Duration dura tion, void callback()) { 447 Timer _rootCreateTimer(Zone self, ZoneDelegate parent, Zone zone, Duration dura tion, void callback()) {
448 if (!identical(_ROOT_ZONE, zone)) { 448 if (!identical(_ROOT_ZONE, zone)) {
449 callback = zone.bindCallback(callback); 449 callback = zone.bindCallback(callback);
450 } 450 }
451 return Timer._createTimer(duration, callback); 451 return Timer._createTimer(duration, callback);
452 } 452 }
453 Timer _rootCreatePeriodicTimer(Zone self, ZoneDelegate parent, Zone zone, Durat ion duration, void callback(Timer timer)) { 453 Timer _rootCreatePeriodicTimer(Zone self, ZoneDelegate parent, Zone zone, Durat ion duration, void callback(Timer timer)) {
454 if (!identical(_ROOT_ZONE, zone)) { 454 if (!identical(_ROOT_ZONE, zone)) {
455 callback = zone.bindUnaryCallback(DDC$RT.wrap((void f(Timer __u152)) { 455 callback = zone.bindUnaryCallback(DDC$RT.wrap((void f(Timer __u295)) {
456 void c(Timer x0) => f(DDC$RT.cast(x0, dynamic, Timer, "CastParam", """line 962, column 39 of dart:async/zone.dart: """, x0 is Timer, true)); 456 void c(Timer x0) => f(DDC$RT.cast(x0, dynamic, Timer, "CastParam", """line 962, column 39 of dart:async/zone.dart: """, x0 is Timer, true));
457 return f == null ? null : c; 457 return f == null ? null : c;
458 } 458 }
459 , callback, __t153, __t134, "Wrap", """line 962, column 39 of dart:async/zone.da rt: """, callback is __t134)); 459 , callback, __t296, __t226, "Wrap", """line 962, column 39 of dart:async/zone.da rt: """, callback is __t226));
460 } 460 }
461 return Timer._createPeriodicTimer(duration, callback); 461 return Timer._createPeriodicTimer(duration, callback);
462 } 462 }
463 void _rootPrint(Zone self, ZoneDelegate parent, Zone zone, String line) { 463 void _rootPrint(Zone self, ZoneDelegate parent, Zone zone, String line) {
464 printToConsole(line); 464 printToConsole(line);
465 } 465 }
466 void _printToZone(String line) { 466 void _printToZone(String line) {
467 Zone.current.print(line); 467 Zone.current.print(line);
468 } 468 }
469 Zone _rootFork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification spe cification, Map zoneValues) { 469 Zone _rootFork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification spe cification, Map zoneValues) {
470 printToZone = _printToZone; 470 printToZone = _printToZone;
471 if (specification == null) { 471 if (specification == null) {
472 specification = const ZoneSpecification(); 472 specification = const ZoneSpecification();
473 } 473 }
474 else if (specification is! _ZoneSpecification) { 474 else if (specification is! _ZoneSpecification) {
475 throw new ArgumentError("ZoneSpecifications must be instantiated" " with the pro vided constructor."); 475 throw new ArgumentError("ZoneSpecifications must be instantiated" " with the pro vided constructor.");
476 } 476 }
477 Map valueMap; 477 Map valueMap;
478 if (zoneValues == null) { 478 if (zoneValues == null) {
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(zone, specification, valueMap); 489 return new _CustomZone(DDC$RT.cast(zone, Zone, _Zone, "CastGeneral", """line 99 9, 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(DDC$RT.cast(onError, Function, __t134, "CastGeneral ", """line 1228, column 37 of dart:async/zone.dart: """, onError is __t134, fals e), error); 640 return self.parent.runUnary(DDC$RT.cast(onError, Function, __t226, "CastGeneral ", """line 1228, column 37 of dart:async/zone.dart: """, onError is __t226, fals e), 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 }
651 ; 651 ;
652 } 652 }
653 if (zoneSpecification == null) { 653 if (zoneSpecification == null) {
654 zoneSpecification = new ZoneSpecification(handleUncaughtError: errorHandler); 654 zoneSpecification = new ZoneSpecification(handleUncaughtError: errorHandler);
655 } 655 }
656 else if (errorHandler != null) { 656 else if (errorHandler != null) {
657 zoneSpecification = new ZoneSpecification.from(zoneSpecification, handleUncaught Error: errorHandler); 657 zoneSpecification = new ZoneSpecification.from(zoneSpecification, handleUncaught Error: errorHandler);
658 } 658 }
659 Zone zone = Zone.current.fork(specification: zoneSpecification, zoneValues: zon eValues); 659 Zone zone = Zone.current.fork(specification: zoneSpecification, zoneValues: zon eValues);
660 if (onError != null) { 660 if (onError != null) {
661 return zone.runGuarded(body); 661 return zone.runGuarded(body);
662 } 662 }
663 else { 663 else {
664 return zone.run(body); 664 return zone.run(body);
665 } 665 }
666 } 666 }
667 typedef dynamic __t132(); 667 typedef dynamic __t182(Zone __u183, ZoneDelegate __u184, Zone __u185, dynamic _ _u186, StackTrace __u187);
668 typedef dynamic __t134(dynamic __u135); 668 typedef dynamic __t189(Zone __u190, ZoneDelegate __u191, Zone __u192, dynamic _ _u193());
669 typedef dynamic __t137(dynamic __u138, dynamic __u139); 669 typedef dynamic __t195(Zone __u196, ZoneDelegate __u197, Zone __u198, dynamic _ _u199(dynamic __u200), dynamic __u201);
670 typedef void __t153(Timer __u154); 670 typedef dynamic __t203(Zone __u204, ZoneDelegate __u205, Zone __u206, dynamic _ _u207(dynamic __u208, dynamic __u209), dynamic __u210, dynamic __u211);
671 typedef dynamic __t218();
672 typedef __t218 __t213(Zone __u214, ZoneDelegate __u215, Zone __u216, dynamic __ u217());
673 typedef dynamic __t226(dynamic __u227);
674 typedef __t226 __t220(Zone __u221, ZoneDelegate __u222, Zone __u223, dynamic __ u224(dynamic __u225));
675 typedef dynamic __t236(dynamic __u237, dynamic __u238);
676 typedef __t236 __t229(Zone __u230, ZoneDelegate __u231, Zone __u232, dynamic __ u233(dynamic __u234, dynamic __u235));
677 typedef AsyncError __t240(Zone __u241, ZoneDelegate __u242, Zone __u243, Object __u244, StackTrace __u245);
678 typedef void __t247(Zone __u248, ZoneDelegate __u249, Zone __u250, dynamic __u2 51());
679 typedef Timer __t253(Zone __u254, ZoneDelegate __u255, Zone __u256, Duration __ u257, void __u258());
680 typedef Timer __t260(Zone __u261, ZoneDelegate __u262, Zone __u263, Duration __ u264, void __u265(Timer __u266));
681 typedef void __t268(Zone __u269, ZoneDelegate __u270, Zone __u271, String __u27 2);
682 typedef Zone __t274(Zone __u275, ZoneDelegate __u276, Zone __u277, ZoneSpecific ation __u278, Map<dynamic, dynamic> __u279);
683 typedef void __t296(Timer __u297);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/async/timer.dart ('k') | test/dart_codegen/expect/collection/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698