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

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

Issue 1122313002: Typing fixes to eliminate casts/dcalls (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 7 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));
(...skipping 132 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 ((__x84) => DEVC$RT.cast(__x84, dynamic, ZoneCallback, "DynamicCast", "" "line 522, column 12 of dart:async/zone.dart: """, __x84 is ZoneCallback, true)) ((implementation.function)(implZone, _parentDelegate(implZone), zone, f)); 153 return ((__x79) => DEVC$RT.cast(__x79, dynamic, ZoneCallback, "DynamicCast", "" "line 522, column 12 of dart:async/zone.dart: """, __x79 is ZoneCallback, true)) ((implementation.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 ((__x85) => DEVC$RT.cast(__x85, dynamic, ZoneUnaryCallback, "DynamicCast ", """line 529, column 12 of dart:async/zone.dart: """, __x85 is ZoneUnaryCallba ck, true))((implementation.function)(implZone, _parentDelegate(implZone), zone, f)); 158 return ((__x80) => DEVC$RT.cast(__x80, dynamic, ZoneUnaryCallback, "DynamicCast ", """line 529, column 12 of dart:async/zone.dart: """, __x80 is ZoneUnaryCallba ck, true))((implementation.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 ((__x86) => DEVC$RT.cast(__x86, dynamic, ZoneBinaryCallback, "DynamicCas t", """line 536, column 12 of dart:async/zone.dart: """, __x86 is ZoneBinaryCall back, true))((implementation.function)(implZone, _parentDelegate(implZone), zone , f)); 163 return ((__x81) => DEVC$RT.cast(__x81, dynamic, ZoneBinaryCallback, "DynamicCas t", """line 536, column 12 of dart:async/zone.dart: """, __x81 is ZoneBinaryCall back, true))((implementation.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 ((__x87) => DEVC$RT.cast(__x87, dynamic, AsyncError, "DynamicCast", """l ine 544, column 12 of dart:async/zone.dart: """, __x87 is AsyncError, true))((im plementation.function)(implZone, _parentDelegate(implZone), zone, error, stackTr ace)); 169 return ((__x82) => DEVC$RT.cast(__x82, dynamic, AsyncError, "DynamicCast", """l ine 544, column 12 of dart:async/zone.dart: """, __x82 is AsyncError, true))((im plementation.function)(implZone, _parentDelegate(implZone), zone, error, stackTr ace));
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 ((__x88) => DEVC$RT.cast(__x88, dynamic, Timer, "DynamicCast", """line 5 58, column 12 of dart:async/zone.dart: """, __x88 is Timer, true))((implementati on.function)(implZone, _parentDelegate(implZone), zone, duration, f)); 179 return ((__x83) => DEVC$RT.cast(__x83, dynamic, Timer, "DynamicCast", """line 5 58, column 12 of dart:async/zone.dart: """, __x83 is Timer, true))((implementati on.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 ((__x89) => DEVC$RT.cast(__x89, dynamic, Timer, "DynamicCast", """line 5 65, column 12 of dart:async/zone.dart: """, __x89 is Timer, true))((implementati on.function)(implZone, _parentDelegate(implZone), zone, period, f)); 184 return ((__x84) => DEVC$RT.cast(__x84, dynamic, Timer, "DynamicCast", """line 5 65, column 12 of dart:async/zone.dart: """, __x84 is Timer, true))((implementati on.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 ((__x90) => DEVC$RT.cast(__x90, dynamic, Zone, "DynamicCast", """line 58 0, column 12 of dart:async/zone.dart: """, __x90 is Zone, true))((implementation .function)(implZone, _parentDelegate(implZone), zone, specification, zoneValues) ); 194 return ((__x85) => DEVC$RT.cast(__x85, dynamic, Zone, "DynamicCast", """line 58 0, column 12 of dart:async/zone.dart: """, __x85 is Zone, true))((implementation .function)(implZone, _parentDelegate(implZone), zone, specification, zoneValues) );
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 ((__x91) => DEVC$RT.cast(__x91, dynamic, Zone, "DynamicCast", """line 78 7, column 12 of dart:async/zone.dart: """, __x91 is Zone, true))((implementation .function)(implementation.zone, parentDelegate, this, specification, zoneValues) ); 334 return ((__x86) => DEVC$RT.cast(__x86, dynamic, Zone, "DynamicCast", """line 78 7, column 12 of dart:async/zone.dart: """, __x86 is Zone, true))((implementation .function)(implementation.zone, parentDelegate, this, specification, zoneValues) );
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 ((__x92) => DEVC$RT.cast(__x92, dynamic, ZoneCallback, "DynamicCast", "" "line 820, column 12 of dart:async/zone.dart: """, __x92 is ZoneCallback, true)) ((implementation.function)(implementation.zone, parentDelegate, this, f)); 354 return ((__x87) => DEVC$RT.cast(__x87, dynamic, ZoneCallback, "DynamicCast", "" "line 820, column 12 of dart:async/zone.dart: """, __x87 is ZoneCallback, true)) ((implementation.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 ((__x93) => DEVC$RT.cast(__x93, dynamic, ZoneUnaryCallback, "DynamicCast ", """line 828, column 12 of dart:async/zone.dart: """, __x93 is ZoneUnaryCallba ck, true))((implementation.function)(implementation.zone, parentDelegate, this, f)); 359 return ((__x88) => DEVC$RT.cast(__x88, dynamic, ZoneUnaryCallback, "DynamicCast ", """line 828, column 12 of dart:async/zone.dart: """, __x88 is ZoneUnaryCallba ck, true))((implementation.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 ((__x94) => DEVC$RT.cast(__x94, dynamic, ZoneBinaryCallback, "DynamicCas t", """line 836, column 12 of dart:async/zone.dart: """, __x94 is ZoneBinaryCall back, true))((implementation.function)(implementation.zone, parentDelegate, this , f)); 364 return ((__x89) => DEVC$RT.cast(__x89, dynamic, ZoneBinaryCallback, "DynamicCas t", """line 836, column 12 of dart:async/zone.dart: """, __x89 is ZoneBinaryCall back, true))((implementation.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, "ImplicitCast", """line 845, column 57 of dart:async/zone.dar t: """, 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 ((__x95) => DEVC$RT.cast(__x95, dynamic, AsyncError, "DynamicCast", """l ine 846, column 12 of dart:async/zone.dart: """, __x95 is AsyncError, true))((im plementation.function)(implementationZone, parentDelegate, this, error, stackTra ce)); 371 return ((__x90) => DEVC$RT.cast(__x90, dynamic, AsyncError, "DynamicCast", """l ine 846, column 12 of dart:async/zone.dart: """, __x90 is AsyncError, true))((im plementation.function)(implementationZone, parentDelegate, this, error, stackTra ce));
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 ((__x96) => DEVC$RT.cast(__x96, dynamic, Timer, "DynamicCast", """line 8 62, column 12 of dart:async/zone.dart: """, __x96 is Timer, true))((implementati on.function)(implementation.zone, parentDelegate, this, duration, f)); 381 return ((__x91) => DEVC$RT.cast(__x91, dynamic, Timer, "DynamicCast", """line 8 62, column 12 of dart:async/zone.dart: """, __x91 is Timer, true))((implementati on.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 ((__x97) => DEVC$RT.cast(__x97, dynamic, Timer, "DynamicCast", """line 8 70, column 12 of dart:async/zone.dart: """, __x97 is Timer, true))((implementati on.function)(implementation.zone, parentDelegate, this, duration, f)); 386 return ((__x92) => DEVC$RT.cast(__x92, dynamic, Timer, "DynamicCast", """line 8 70, column 12 of dart:async/zone.dart: """, __x92 is Timer, true))((implementati on.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 = ((__x100) => DEVC$RT.cast(__x100, ZoneUnaryCallback, __CastType98, "C ompositeCast", """line 962, column 16 of dart:async/zone.dart: """, __x100 is __ CastType98, false))(zone.bindUnaryCallback(callback)); 455 callback = ((__x95) => DEVC$RT.cast(__x95, ZoneUnaryCallback, __CastType93, "Com positeCast", """line 962, column 16 of dart:async/zone.dart: """, __x95 is __Cas tType93, false))(zone.bindUnaryCallback(callback));
456 } 456 }
457 return Timer._createPeriodicTimer(duration, callback); 457 return Timer._createPeriodicTimer(duration, callback);
458 } 458 }
459 void _rootPrint(Zone self, ZoneDelegate parent, Zone zone, String line) { 459 void _rootPrint(Zone self, ZoneDelegate parent, Zone zone, String line) {
460 printToConsole(line); 460 printToConsole(line);
461 } 461 }
462 void _printToZone(String line) { 462 void _printToZone(String line) {
463 Zone.current.print(line); 463 Zone.current.print(line);
464 } 464 }
465 Zone _rootFork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification spe cification, Map zoneValues) { 465 Zone _rootFork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification spe cification, Map zoneValues) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 dynamic runZoned(body(), { 626 dynamic runZoned(body(), {
627 Map zoneValues, ZoneSpecification zoneSpecification, Function onError} 627 Map zoneValues, ZoneSpecification zoneSpecification, Function onError}
628 ) { 628 ) {
629 HandleUncaughtErrorHandler errorHandler; 629 HandleUncaughtErrorHandler errorHandler;
630 if (onError != null) { 630 if (onError != null) {
631 errorHandler = (Zone self, ZoneDelegate parent, Zone zone, error, StackTrace sta ckTrace) { 631 errorHandler = (Zone self, ZoneDelegate parent, Zone zone, error, StackTrace sta ckTrace) {
632 try { 632 try {
633 if (onError is ZoneBinaryCallback) { 633 if (onError is ZoneBinaryCallback) {
634 return self.parent.runBinary(onError, error, stackTrace); 634 return self.parent.runBinary(onError, error, stackTrace);
635 } 635 }
636 return self.parent.runUnary(DEVC$RT.cast(onError, Function, __CastType101, "Imp licitCast", """line 1228, column 37 of dart:async/zone.dart: """, onError is __C astType101, true), error); 636 return self.parent.runUnary(DEVC$RT.cast(onError, Function, __CastType96, "Impl icitCast", """line 1228, column 37 of dart:async/zone.dart: """, onError is __Ca stType96, true), error);
637 } 637 }
638 catch (e, s) { 638 catch (e, s) {
639 if (identical(e, error)) { 639 if (identical(e, error)) {
640 return parent.handleUncaughtError(zone, error, stackTrace); 640 return parent.handleUncaughtError(zone, error, stackTrace);
641 } 641 }
642 else { 642 else {
643 return parent.handleUncaughtError(zone, e, s); 643 return parent.handleUncaughtError(zone, e, s);
644 } 644 }
645 } 645 }
646 } 646 }
647 ; 647 ;
648 } 648 }
649 if (zoneSpecification == null) { 649 if (zoneSpecification == null) {
650 zoneSpecification = new ZoneSpecification(handleUncaughtError: errorHandler); 650 zoneSpecification = new ZoneSpecification(handleUncaughtError: errorHandler);
651 } 651 }
652 else if (errorHandler != null) { 652 else if (errorHandler != null) {
653 zoneSpecification = new ZoneSpecification.from(zoneSpecification, handleUncaught Error: errorHandler); 653 zoneSpecification = new ZoneSpecification.from(zoneSpecification, handleUncaught Error: errorHandler);
654 } 654 }
655 Zone zone = Zone.current.fork(specification: zoneSpecification, zoneValues: zon eValues); 655 Zone zone = Zone.current.fork(specification: zoneSpecification, zoneValues: zon eValues);
656 if (onError != null) { 656 if (onError != null) {
657 return zone.runGuarded(body); 657 return zone.runGuarded(body);
658 } 658 }
659 else { 659 else {
660 return zone.run(body); 660 return zone.run(body);
661 } 661 }
662 } 662 }
663 typedef void __CastType98(Timer __u99); 663 typedef void __CastType93(Timer __u94);
664 typedef dynamic __CastType101(dynamic __u102); 664 typedef dynamic __CastType96(dynamic __u97);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/async/timer.dart ('k') | test/dart_codegen/expect/collection/hash_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698