Index: runtime/lib/array_patch.dart |
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart |
index b1e5398127e89dac7626a4171c507d640f128828..db4626a9ed3a3794311e1062020250dd0be78df6 100644 |
--- a/runtime/lib/array_patch.dart |
+++ b/runtime/lib/array_patch.dart |
@@ -10,13 +10,10 @@ class _GrowableArrayMarker implements int { |
const _GROWABLE_ARRAY_MARKER = const _GrowableArrayMarker(); |
-@patch |
-class List<E> { |
- @patch |
- factory List([int length]) = List<E>._internal; |
+@patch class List<E> { |
+ @patch factory List([int length]) = List<E>._internal; |
- @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); |
@@ -28,17 +25,13 @@ 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 EfficientLengthIterable) { |
int length = elements.length; |
var list = growable ? new _GrowableList<E>(length) : new _List<E>(length); |
- if (length > 0) { |
- // Avoid creating iterator unless necessary. |
+ if (length > 0) { // Avoid creating iterator unless necessary. |
int i = 0; |
- for (var element in elements) { |
- list[i++] = element; |
- } |
+ for (var element in elements) { list[i++] = element; } |
} |
return list; |
} |
@@ -54,8 +47,7 @@ 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); |
} |