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

Unified Diff: runtime/lib/array_patch.dart

Issue 2767533002: Revert "Fix observatory tests broken by running dartfmt." (Closed)
Patch Set: Created 3 years, 9 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/array.dart ('k') | runtime/lib/async_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 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);
}
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/async_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698