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

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

Issue 961493003: don't run dart gen on JS patch code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 2
3 abstract class Timer { 3 abstract class Timer {
4 factory Timer(Duration duration, void callback()) { 4 factory Timer(Duration duration, void callback()) {
5 if (Zone.current == Zone.ROOT) { 5 if (Zone.current == Zone.ROOT) {
6 return Zone.current.createTimer(duration, callback); 6 return Zone.current.createTimer(duration, callback);
7 } 7 }
8 return Zone.current.createTimer( 8 return Zone.current.createTimer(
9 duration, Zone.current.bindCallback(callback, runGuarded: true)); 9 duration, Zone.current.bindCallback(callback, runGuarded: true));
10 } 10 }
11 factory Timer.periodic(Duration duration, void callback(Timer timer)) { 11 factory Timer.periodic(Duration duration, void callback(Timer timer)) {
12 if (Zone.current == Zone.ROOT) { 12 if (Zone.current == Zone.ROOT) {
13 return Zone.current.createPeriodicTimer(duration, callback); 13 return Zone.current.createPeriodicTimer(duration, callback);
14 } 14 }
15 return Zone.current.createPeriodicTimer(duration, Zone.current 15 return Zone.current.createPeriodicTimer(duration, Zone.current
16 .bindUnaryCallback(DDC$RT.wrap((void f(Timer __u126)) { 16 .bindUnaryCallback(DDC$RT.wrap((void f(Timer __u126)) {
17 void c(Timer x0) => f(DDC$RT.cast(x0, dynamic, Timer, "CastParam", 17 void c(Timer x0) => f(DDC$RT.cast(x0, dynamic, Timer, "CastParam",
18 """line 80, column 50 of dart:async/timer.dart: """, x0 is Timer, 18 """line 80, column 50 of dart:async/timer.dart: """, x0 is Timer,
19 true)); 19 true));
20 return f == null ? null : c; 20 return f == null ? null : c;
21 }, callback, __t129, __t127, "Wrap", 21 }, callback, __t129, __t127, "Wrap",
22 """line 80, column 50 of dart:async/timer.dart: """, 22 """line 80, column 50 of dart:async/timer.dart: """,
23 callback is __t127), runGuarded: true)); 23 callback is __t127), runGuarded: true));
24 } 24 }
25 static void run(void callback()) { 25 static void run(void callback()) {
26 new Timer(Duration.ZERO, callback); 26 new Timer(Duration.ZERO, callback);
27 } 27 }
28 void cancel(); 28 void cancel();
29 bool get isActive; 29 bool get isActive;
30 static Timer _createTimer(Duration duration, void callback()) { 30 external static Timer _createTimer(Duration duration, void callback());
31 int milliseconds = duration.inMilliseconds; 31 external static Timer _createPeriodicTimer(
32 if (milliseconds < 0) milliseconds = 0; 32 Duration duration, void callback(Timer timer));
33 return ((__x131) => DDC$RT.cast(__x131, dynamic, Timer, "CastExact",
34 """line 110, column 12 of dart:async/timer.dart: """, __x131 is Timer,
35 true))(new TimerImpl(milliseconds, callback));
36 }
37 static Timer _createPeriodicTimer(
38 Duration duration, void callback(Timer timer)) {
39 int milliseconds = duration.inMilliseconds;
40 if (milliseconds < 0) milliseconds = 0;
41 return ((__x132) => DDC$RT.cast(__x132, dynamic, Timer, "CastExact",
42 """line 116, column 12 of dart:async/timer.dart: """, __x132 is Timer,
43 true))(new TimerImpl.periodic(milliseconds, callback));
44 }
45 } 33 }
46 typedef dynamic __t127(dynamic __u128); 34 typedef dynamic __t127(dynamic __u128);
47 typedef void __t129(Timer __u130); 35 typedef void __t129(Timer __u130);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/async/schedule_microtask.dart ('k') | test/dart_codegen/expect/async/zone.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698