| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Patch file for dart:coreimpl classes. | 5 // Patch file for dart:coreimpl classes. |
| 6 | 6 |
| 7 // Patch for String implementation. | 7 // Patch for String implementation. |
| 8 // TODO(ager): Split out into date_patch.dart and allow #source | 8 // TODO(ager): Split out into date_patch.dart and allow #source |
| 9 // in patch files? | 9 // in patch files? |
| 10 patch class StringImplementation { | 10 patch class StringImplementation { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return result; | 67 return result; |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 | 71 |
| 72 // Patch for Date implementation. | 72 // Patch for Date implementation. |
| 73 // TODO(ager): Split out into date_patch.dart and allow #source | 73 // TODO(ager): Split out into date_patch.dart and allow #source |
| 74 // in patch files? | 74 // in patch files? |
| 75 patch class DateImplementation { | 75 patch class DateImplementation { |
| 76 patch DateImplementation(int year, | 76 patch DateImplementation(int year, |
| 77 [int month = 1, | 77 int month, |
| 78 int day = 1, | 78 int day, |
| 79 int hour = 0, | 79 int hour, |
| 80 int minute = 0, | 80 int minute, |
| 81 int second = 0, | 81 int second, |
| 82 int millisecond = 0, | 82 int millisecond, |
| 83 bool isUtc = false]) | 83 bool isUtc) |
| 84 : this.isUtc = checkNull(isUtc), | 84 : this.isUtc = checkNull(isUtc), |
| 85 millisecondsSinceEpoch = Primitives.valueFromDecomposedDate( | 85 millisecondsSinceEpoch = Primitives.valueFromDecomposedDate( |
| 86 year, month, day, hour, minute, second, millisecond, isUtc) { | 86 year, month, day, hour, minute, second, millisecond, isUtc) { |
| 87 Primitives.lazyAsJsDate(this); | 87 Primitives.lazyAsJsDate(this); |
| 88 } | 88 } |
| 89 | 89 |
| 90 patch DateImplementation.now() | 90 patch DateImplementation.now() |
| 91 : isUtc = false, | 91 : isUtc = false, |
| 92 millisecondsSinceEpoch = Primitives.dateNow() { | 92 millisecondsSinceEpoch = Primitives.dateNow() { |
| 93 Primitives.lazyAsJsDate(this); | 93 Primitives.lazyAsJsDate(this); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // hidden global flag. | 257 // hidden global flag. |
| 258 _next = _re.firstMatch(_str); | 258 _next = _re.firstMatch(_str); |
| 259 if (_next == null) { | 259 if (_next == null) { |
| 260 _done = true; | 260 _done = true; |
| 261 return false; | 261 return false; |
| 262 } else { | 262 } else { |
| 263 return true; | 263 return true; |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 } | 266 } |
| OLD | NEW |