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

Side by Side Diff: test/dart_codegen/expect/core/stopwatch.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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
« 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 28 matching lines...) Expand all
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 @patch static void _initTicker() { 49 static void _initTicker() {
50 Primitives.initTicker(); 50 Primitives.initTicker();
51 _frequency = DDC$RT.cast(Primitives.timerFrequency, dynamic, int, 51 _frequency = DDC$RT.cast(Primitives.timerFrequency, dynamic, int,
52 "CastGeneral", """line 140, column 18 of dart:core/stopwatch.dart: """, 52 "CastGeneral", """line 143, column 18 of dart:core/stopwatch.dart: """,
53 Primitives.timerFrequency is int, true); 53 Primitives.timerFrequency is int, true);
54 } 54 }
55 @patch static int _now() => ((__x35) => DDC$RT.cast(__x35, dynamic, int, 55 static int _now() => ((__x35) => DDC$RT.cast(__x35, dynamic, int,
56 "CastGeneral", """line 143, column 24 of dart:core/stopwatch.dart: """, 56 "CastGeneral", """line 145, column 24 of dart:core/stopwatch.dart: """,
57 __x35 is int, true))(Primitives.timerTicks()); 57 __x35 is int, true))(Primitives.timerTicks());
58 } 58 }
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