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

Unified Diff: runtime/lib/string_base.dart

Issue 11312122: Change List constructors. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload. Adapt code for List.fixedLength. Created 8 years 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/math_patch.dart ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string_base.dart
diff --git a/runtime/lib/string_base.dart b/runtime/lib/string_base.dart
index b167e8027e5395da6244fca887100741092cfa81..db6f027b5ac6fc46227cd00aa4ce2357e42e44a9 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -248,7 +248,7 @@ class _StringBase {
*/
static String _interpolate(List values) {
int numValues = values.length;
- var stringList = new List(numValues);
+ var stringList = new List.fixedLength(numValues);
for (int i = 0; i < numValues; i++) {
stringList[i] = values[i].toString();
}
@@ -311,7 +311,7 @@ class _StringBase {
List<String> splitChars() {
int len = this.length;
- final result = new List<String>(len);
+ final result = new List<String>.fixedLength(len);
for (int i = 0; i < len; i++) {
result[i] = this[i];
}
@@ -320,7 +320,7 @@ class _StringBase {
List<int> get charCodes {
int len = this.length;
- final result = new List<int>(len);
+ final result = new List<int>.fixedLength(len);
for (int i = 0; i < len; i++) {
result[i] = this.charCodeAt(i);
}
« no previous file with comments | « runtime/lib/math_patch.dart ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698