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

Unified Diff: runtime/lib/date_patch.dart

Issue 2230383003: Implement @patch annotation for patch class members (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/core_patch.dart ('k') | runtime/lib/deferred_load_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/date_patch.dart
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index 0f7837e3e0f92819093297985797cf82d788744f..d1fced264e50022433c6640c7caea28ccb196c61 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -30,17 +30,17 @@
List __parts;
- /* @patch */ DateTime.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
- {bool isUtc: false})
+ @patch DateTime.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
+ {bool isUtc: false})
: this._withValue(
millisecondsSinceEpoch * Duration.MICROSECONDS_PER_MILLISECOND,
isUtc: isUtc);
- /* @patch */ DateTime.fromMicrosecondsSinceEpoch(int microsecondsSinceEpoch,
- {bool isUtc: false})
+ @patch DateTime.fromMicrosecondsSinceEpoch(int microsecondsSinceEpoch,
+ {bool isUtc: false})
: this._withValue(microsecondsSinceEpoch, isUtc: isUtc);
- /* @patch */ DateTime._internal(int year,
+ @patch DateTime._internal(int year,
int month,
int day,
int hour,
@@ -57,17 +57,17 @@
if (isUtc == null) throw new ArgumentError();
}
- /* @patch */ DateTime._now()
+ @patch DateTime._now()
: isUtc = false,
_value = _getCurrentMicros() {
}
- /* @patch */ String get timeZoneName {
+ @patch String get timeZoneName {
if (isUtc) return "UTC";
return _timeZoneName(microsecondsSinceEpoch);
}
- /* @patch */ Duration get timeZoneOffset {
+ @patch Duration get timeZoneOffset {
if (isUtc) return new Duration();
int offsetInSeconds = _timeZoneOffsetInSeconds(microsecondsSinceEpoch);
return new Duration(seconds: offsetInSeconds);
@@ -165,42 +165,42 @@
return __parts;
}
- /* @patch */ DateTime add(Duration duration) {
+ @patch DateTime add(Duration duration) {
return new DateTime._withValue(
_value + duration.inMicroseconds, isUtc: isUtc);
}
- /* @patch */ DateTime subtract(Duration duration) {
+ @patch DateTime subtract(Duration duration) {
return new DateTime._withValue(
_value - duration.inMicroseconds, isUtc: isUtc);
}
- /* @patch */ Duration difference(DateTime other) {
+ @patch Duration difference(DateTime other) {
return new Duration(microseconds: _value - other._value);
}
- /* @patch */ int get millisecondsSinceEpoch =>
+ @patch int get millisecondsSinceEpoch =>
_value ~/ Duration.MICROSECONDS_PER_MILLISECOND;
- /* @patch */ int get microsecondsSinceEpoch => _value;
+ @patch int get microsecondsSinceEpoch => _value;
- /* @patch */ int get microsecond => _parts[_MICROSECOND_INDEX];
+ @patch int get microsecond => _parts[_MICROSECOND_INDEX];
- /* @patch */ int get millisecond => _parts[_MILLISECOND_INDEX];
+ @patch int get millisecond => _parts[_MILLISECOND_INDEX];
- /* @patch */ int get second => _parts[_SECOND_INDEX];
+ @patch int get second => _parts[_SECOND_INDEX];
- /* @patch */ int get minute => _parts[_MINUTE_INDEX];
+ @patch int get minute => _parts[_MINUTE_INDEX];
- /* @patch */ int get hour => _parts[_HOUR_INDEX];
+ @patch int get hour => _parts[_HOUR_INDEX];
- /* @patch */ int get day => _parts[_DAY_INDEX];
+ @patch int get day => _parts[_DAY_INDEX];
- /* @patch */ int get weekday => _parts[_WEEKDAY_INDEX];
+ @patch int get weekday => _parts[_WEEKDAY_INDEX];
- /* @patch */ int get month => _parts[_MONTH_INDEX];
+ @patch int get month => _parts[_MONTH_INDEX];
- /* @patch */ int get year => _parts[_YEAR_INDEX];
+ @patch int get year => _parts[_YEAR_INDEX];
/**
* Returns the amount of microseconds in UTC that represent the same values
@@ -244,7 +244,7 @@
}
/// Converts the given broken down date to microseconds.
- /* @patch */ static int _brokenDownDateToValue(
+ @patch static int _brokenDownDateToValue(
int year, int month, int day,
int hour, int minute, int second, int millisecond, int microsecond,
bool isUtc) {
« no previous file with comments | « runtime/lib/core_patch.dart ('k') | runtime/lib/deferred_load_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698