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

Side by Side Diff: test/dart_codegen/expect/core/stopwatch.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
« no previous file with comments | « test/dart_codegen/expect/core/regexp.dart ('k') | test/dart_codegen/expect/core/string.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of dart.core; 1 part of dart.core;
2 2
3 class Stopwatch { 3 class Stopwatch {
4 int get frequency => _frequency; 4 int get frequency => _frequency;
5 num _start; 5 num _start;
6 num _stop; 6 num _stop;
7 Stopwatch() { 7 Stopwatch() {
8 _initTicker(); 8 _initTicker();
9 } 9 }
10 void start() { 10 void start() {
(...skipping 13 matching lines...) Expand all
24 if (_start == null) return; 24 if (_start == null) return;
25 _start = _now(); 25 _start = _now();
26 if (_stop != null) { 26 if (_stop != null) {
27 _stop = _start; 27 _stop = _start;
28 } 28 }
29 } 29 }
30 int get elapsedTicks { 30 int get elapsedTicks {
31 if (_start == null) { 31 if (_start == null) {
32 return 0; 32 return 0;
33 } 33 }
34 return ((__x34) => DDC$RT.cast(__x34, num, int, "CastGeneral", 34 return ((__x8) => DDC$RT.cast(__x8, num, int, "CastGeneral",
35 """line 102, column 12 of dart:core/stopwatch.dart: """, __x34 is int, 35 """line 102, column 12 of dart:core/stopwatch.dart: """, __x8 is int,
36 true))((_stop == null) ? (_now() - _start) : (_stop - _start)); 36 true))((_stop == null) ? (_now() - _start) : (_stop - _start));
37 } 37 }
38 Duration get elapsed { 38 Duration get elapsed {
39 return new Duration(microseconds: elapsedMicroseconds); 39 return new Duration(microseconds: elapsedMicroseconds);
40 } 40 }
41 int get elapsedMicroseconds { 41 int get elapsedMicroseconds {
42 return (elapsedTicks * 1000000) ~/ frequency; 42 return (elapsedTicks * 1000000) ~/ frequency;
43 } 43 }
44 int get elapsedMilliseconds { 44 int get elapsedMilliseconds {
45 return (elapsedTicks * 1000) ~/ frequency; 45 return (elapsedTicks * 1000) ~/ frequency;
46 } 46 }
47 bool get isRunning => _start != null && _stop == null; 47 bool get isRunning => _start != null && _stop == null;
48 static int _frequency; 48 static int _frequency;
49 static void _initTicker() { 49 external static void _initTicker();
50 Primitives.initTicker(); 50 external static int _now();
51 _frequency = DDC$RT.cast(Primitives.timerFrequency, dynamic, int,
52 "CastGeneral", """line 143, column 18 of dart:core/stopwatch.dart: """,
53 Primitives.timerFrequency is int, true);
54 }
55 static int _now() => ((__x35) => DDC$RT.cast(__x35, dynamic, int,
56 "CastGeneral", """line 145, column 24 of dart:core/stopwatch.dart: """,
57 __x35 is int, true))(Primitives.timerTicks());
58 } 51 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/core/regexp.dart ('k') | test/dart_codegen/expect/core/string.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698