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

Side by Side Diff: test/dart_codegen/expect/async/timer.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 abstract class Timer {factory Timer(Duration duration, void callback()) { 2 abstract class Timer {factory Timer(Duration duration, void callback()) {
3 if (Zone.current == Zone.ROOT) { 3 if (Zone.current == Zone.ROOT) {
4 return Zone.current.createTimer(duration, callback); 4 return Zone.current.createTimer(duration, callback);
5 } 5 }
6 return Zone.current.createTimer(duration, Zone.current.bindCallback(callback, runGuarded: true)); 6 return Zone.current.createTimer(duration, Zone.current.bindCallback(callback, runGuarded: true));
7 } 7 }
8 factory Timer.periodic(Duration duration, void callback(Timer timer)) { 8 factory Timer.periodic(Duration duration, void callback(Timer timer)) {
9 if (Zone.current == Zone.ROOT) { 9 if (Zone.current == Zone.ROOT) {
10 return Zone.current.createPeriodicTimer(duration, callback); 10 return Zone.current.createPeriodicTimer(duration, callback);
11 } 11 }
12 return Zone.current.createPeriodicTimer(duration, ((__x83) => DEVC$RT.cast(__ x83, ZoneUnaryCallback, __CastType81, "CompositeCast", """line 80, column 19 of dart:async/timer.dart: """, __x83 is __CastType81, false))(Zone.current.bindUnar yCallback(callback, runGuarded: true))); 12 return Zone.current.createPeriodicTimer(duration, ((__x78) => DEVC$RT.cast(__ x78, ZoneUnaryCallback, __CastType76, "CompositeCast", """line 80, column 19 of dart:async/timer.dart: """, __x78 is __CastType76, false))(Zone.current.bindUnar yCallback(callback, runGuarded: true)));
13 } 13 }
14 static void run(void callback()) { 14 static void run(void callback()) {
15 new Timer(Duration.ZERO, callback); 15 new Timer(Duration.ZERO, callback);
16 } 16 }
17 void cancel(); 17 void cancel();
18 bool get isActive; 18 bool get isActive;
19 external static Timer _createTimer(Duration duration, void callback()); 19 external static Timer _createTimer(Duration duration, void callback());
20 external static Timer _createPeriodicTimer(Duration duration, void callback(Tim er timer)); 20 external static Timer _createPeriodicTimer(Duration duration, void callback(Tim er timer));
21 } 21 }
22 typedef void __CastType81(Timer __u82); 22 typedef void __CastType76(Timer __u77);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/async/stream_transformers.dart ('k') | test/dart_codegen/expect/async/zone.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698