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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart

Issue 12041019: Remove List.filled constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove List.filled usage in serialization package. Created 7 years, 11 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_patch.dart ('k') | sdk/lib/core/list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
index 4297edba4303838d3ab52ff5f133c2a827428861..6bfbd15f6b10f9fd3cff1a8f6258f451f9ec1964 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
@@ -194,25 +194,6 @@ patch class List<E> {
}
return result;
}
-
- /**
- * Creates an extendable list of the given [length] where each entry is
- * filled with [fill].
- */
- patch factory List.filled(int length, E fill) {
- // Explicit type test is necessary to protect Primitives.newGrowableList in
- // unchecked mode.
- if ((length is !int) || (length < 0)) {
- throw new ArgumentError("Length must be a positive integer: $length.");
- }
- List result = Primitives.newGrowableList(length);
- if (length != 0 && fill != null) {
- for (int i = 0; i < result.length; i++) {
- result[i] = fill;
- }
- }
- return result;
- }
}
« no previous file with comments | « runtime/lib/array_patch.dart ('k') | sdk/lib/core/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698