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

Unified Diff: runtime/lib/array_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/bin/stdio_patch.dart ('k') | runtime/lib/bool_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array_patch.dart
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart
index 95eeaa87578e03e09a51bf1dff88f5155464f673..e62524bd124ddd79fcfd779bc7d7705b34878322 100644
--- a/runtime/lib/array_patch.dart
+++ b/runtime/lib/array_patch.dart
@@ -11,7 +11,7 @@ class _GrowableArrayMarker implements int {
const _GROWABLE_ARRAY_MARKER = const _GrowableArrayMarker();
@patch class List<E> {
- /* @patch */ factory List([int length = _GROWABLE_ARRAY_MARKER]) {
+ @patch factory List([int length = _GROWABLE_ARRAY_MARKER]) {
if (identical(length, _GROWABLE_ARRAY_MARKER)) {
return new _GrowableList<E>(0);
}
@@ -20,7 +20,7 @@ const _GROWABLE_ARRAY_MARKER = const _GrowableArrayMarker();
return new _List<E>(length);
}
- /* @patch */ factory List.filled(int length, E fill, {bool growable: false}) {
+ @patch factory List.filled(int length, E fill, {bool growable: false}) {
// All error handling on the length parameter is done at the implementation
// of new _List.
var result = growable ? new _GrowableList<E>(length) : new _List<E>(length);
@@ -32,7 +32,7 @@ const _GROWABLE_ARRAY_MARKER = const _GrowableArrayMarker();
return result;
}
- /* @patch */ factory List.from(Iterable elements, { bool growable: true }) {
+ @patch factory List.from(Iterable elements, { bool growable: true }) {
if (elements is EfficientLength) {
int length = elements.length;
var list = growable ? new _GrowableList<E>(length) : new _List<E>(length);
@@ -54,7 +54,7 @@ const _GROWABLE_ARRAY_MARKER = const _GrowableArrayMarker();
return makeListFixedLength(list);
}
- /* @patch */ factory List.unmodifiable(Iterable elements) {
+ @patch factory List.unmodifiable(Iterable elements) {
List result = new List<E>.from(elements, growable: false);
return makeFixedListUnmodifiable(result);
}
« no previous file with comments | « runtime/bin/stdio_patch.dart ('k') | runtime/lib/bool_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698