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

Side by Side Diff: test/dart_codegen/expect/core/date_time.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/core ('k') | test/dart_codegen/expect/core/double.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 DateTime implements Comparable { 3 class DateTime implements Comparable {
4 static const int MONDAY = 1; 4 static const int MONDAY = 1;
5 static const int TUESDAY = 2; 5 static const int TUESDAY = 2;
6 static const int WEDNESDAY = 3; 6 static const int WEDNESDAY = 3;
7 static const int THURSDAY = 4; 7 static const int THURSDAY = 4;
8 static const int FRIDAY = 5; 8 static const int FRIDAY = 5;
9 static const int SATURDAY = 6; 9 static const int SATURDAY = 6;
10 static const int SUNDAY = 7; 10 static const int SUNDAY = 7;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 DateTime subtract(Duration duration) { 181 DateTime subtract(Duration duration) {
182 int ms = millisecondsSinceEpoch; 182 int ms = millisecondsSinceEpoch;
183 return new DateTime.fromMillisecondsSinceEpoch(ms - duration.inMilliseconds, 183 return new DateTime.fromMillisecondsSinceEpoch(ms - duration.inMilliseconds,
184 isUtc: isUtc); 184 isUtc: isUtc);
185 } 185 }
186 Duration difference(DateTime other) { 186 Duration difference(DateTime other) {
187 int ms = millisecondsSinceEpoch; 187 int ms = millisecondsSinceEpoch;
188 int otherMs = other.millisecondsSinceEpoch; 188 int otherMs = other.millisecondsSinceEpoch;
189 return new Duration(milliseconds: ms - otherMs); 189 return new Duration(milliseconds: ms - otherMs);
190 } 190 }
191 DateTime._internal(int year, int month, int day, int hour, int minute, 191 external DateTime._internal(int year, int month, int day, int hour,
192 int second, int millisecond, bool isUtc) 192 int minute, int second, int millisecond, bool isUtc);
193 : this.isUtc = isUtc is bool ? isUtc : throw new ArgumentError(isUtc), 193 external DateTime._now();
194 millisecondsSinceEpoch = checkInt(Primitives.valueFromDecomposedDate( 194 external static int _brokenDownDateToMillisecondsSinceEpoch(int year,
195 year, month, day, hour, minute, second, millisecond, isUtc)); 195 int month, int day, int hour, int minute, int second, int millisecond,
196 DateTime._now() 196 bool isUtc);
197 : isUtc = false, 197 external String get timeZoneName;
198 millisecondsSinceEpoch = Primitives.dateNow(); 198 external Duration get timeZoneOffset;
199 static int _brokenDownDateToMillisecondsSinceEpoch(int year, int month, 199 external int get year;
200 int day, int hour, int minute, int second, int millisecond, bool isUtc) { 200 external int get month;
201 return ((__x0) => DDC$RT.cast(__x0, dynamic, int, "CastGeneral", 201 external int get day;
202 """line 599, column 12 of dart:core/date_time.dart: """, 202 external int get hour;
203 __x0 is int, true))(Primitives.valueFromDecomposedDate( 203 external int get minute;
204 year, month, day, hour, minute, second, millisecond, isUtc)); 204 external int get second;
205 } 205 external int get millisecond;
206 String get timeZoneName { 206 external int get weekday;
207 if (isUtc) return "UTC";
208 return ((__x1) => DDC$RT.cast(__x1, dynamic, String, "CastGeneral",
209 """line 609, column 12 of dart:core/date_time.dart: """, __x1 is String,
210 true))(Primitives.getTimeZoneName(this));
211 }
212 Duration get timeZoneOffset {
213 if (isUtc) return new Duration();
214 return new Duration(minutes: Primitives.getTimeZoneOffsetInMinutes(this));
215 }
216 int get year => ((__x2) => DDC$RT.cast(__x2, dynamic, int, "CastGeneral",
217 """line 633, column 19 of dart:core/date_time.dart: """, __x2 is int,
218 true))(Primitives.getYear(this));
219 int get month => ((__x3) => DDC$RT.cast(__x3, dynamic, int, "CastGeneral",
220 """line 642, column 20 of dart:core/date_time.dart: """, __x3 is int,
221 true))(Primitives.getMonth(this));
222 int get day => ((__x4) => DDC$RT.cast(__x4, dynamic, int, "CastGeneral",
223 """line 650, column 18 of dart:core/date_time.dart: """, __x4 is int,
224 true))(Primitives.getDay(this));
225 int get hour => ((__x5) => DDC$RT.cast(__x5, dynamic, int, "CastGeneral",
226 """line 658, column 19 of dart:core/date_time.dart: """, __x5 is int,
227 true))(Primitives.getHours(this));
228 int get minute => ((__x6) => DDC$RT.cast(__x6, dynamic, int, "CastGeneral",
229 """line 666, column 21 of dart:core/date_time.dart: """, __x6 is int,
230 true))(Primitives.getMinutes(this));
231 int get second => ((__x7) => DDC$RT.cast(__x7, dynamic, int, "CastGeneral",
232 """line 674, column 21 of dart:core/date_time.dart: """, __x7 is int,
233 true))(Primitives.getSeconds(this));
234 int get millisecond => ((__x8) => DDC$RT.cast(__x8, dynamic, int,
235 "CastGeneral", """line 682, column 26 of dart:core/date_time.dart: """,
236 __x8 is int, true))(Primitives.getMilliseconds(this));
237 int get weekday => ((__x9) => DDC$RT.cast(__x9, dynamic, int, "CastGeneral",
238 """line 695, column 22 of dart:core/date_time.dart: """, __x9 is int,
239 true))(Primitives.getWeekday(this));
240 } 207 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/core/core ('k') | test/dart_codegen/expect/core/double.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698