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

Unified Diff: runtime/lib/array_patch.dart

Issue 2220883004: Use metadata annotation @patch for patch classes (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
Index: runtime/lib/array_patch.dart
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart
index 94f29f195fc3404ab3a461577fd72bd8a3ee030e..95eeaa87578e03e09a51bf1dff88f5155464f673 100644
--- a/runtime/lib/array_patch.dart
+++ b/runtime/lib/array_patch.dart
@@ -10,8 +10,8 @@ class _GrowableArrayMarker implements int {
const _GROWABLE_ARRAY_MARKER = const _GrowableArrayMarker();
-patch class List<E> {
- /* patch */ factory List([int length = _GROWABLE_ARRAY_MARKER]) {
+@patch class List<E> {
+ /* @patch */ factory List([int length = _GROWABLE_ARRAY_MARKER]) {
if (identical(length, _GROWABLE_ARRAY_MARKER)) {
return new _GrowableList<E>(0);
}
@@ -20,7 +20,7 @@ patch class List<E> {
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 @@ patch class List<E> {
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 @@ patch class List<E> {
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);
}

Powered by Google App Engine
This is Rietveld 408576698