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

Unified Diff: runtime/lib/string_base.dart

Issue 11189141: Move ListImplementation from coreimpl to core, as a private member. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reintroduced type. Created 8 years, 2 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/lib_sources.gypi ('k') | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('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 792940d0d2ba3fca664bca83fb23297dd6be9691..dc417473f6988df8bacbdc7a3afe99d477f35026 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -20,20 +20,16 @@ class _StringBase {
* [codePoints].
*/
static String createFromCharCodes(List<int> charCodes) {
- _ObjectArray objectArray;
- if (charCodes is _ObjectArray) {
- objectArray = charCodes;
- } else {
- int len = charCodes.length;
- objectArray = new _ObjectArray(len);
- for (int i = 0; i < len; i++) {
- objectArray[i] = charCodes[i];
- }
+ // TODO(ajohnsen): Add fast path once string_base is in core.
+ int len = charCodes.length;
+ var objectArray = new List(len);
+ for (int i = 0; i < len; i++) {
+ objectArray[i] = charCodes[i];
}
return _createFromCodePoints(objectArray);
}
- static String _createFromCodePoints(_ObjectArray<int> codePoints)
+ static String _createFromCodePoints(List<int> codePoints)
native "StringBase_createFromCodePoints";
String operator [](int index) native "String_charAt";
@@ -232,7 +228,7 @@ class _StringBase {
*/
static String _interpolate(List values) {
int numValues = values.length;
- var stringList = new _ObjectArray(numValues);
+ var stringList = new List(numValues);
for (int i = 0; i < numValues; i++) {
stringList[i] = values[i].toString();
}
@@ -336,20 +332,16 @@ class _StringBase {
}
static String concatAll(List<String> strings) {
- _ObjectArray stringsArray;
- if (strings is _ObjectArray) {
- stringsArray = strings;
- } else {
- int len = strings.length;
- stringsArray = new _ObjectArray(len);
- for (int i = 0; i < len; i++) {
- stringsArray[i] = strings[i];
- }
+ // TODO(ajohnsen): Add fast path once string_base is in core.
+ int len = strings.length;
+ var stringsArray = new List(len);
+ for (int i = 0; i < len; i++) {
+ stringsArray[i] = strings[i];
}
return _concatAll(stringsArray);
}
- static String _concatAll(_ObjectArray<String> strings)
+ static String _concatAll(List<String> strings)
native "Strings_concatAll";
}
« no previous file with comments | « runtime/lib/lib_sources.gypi ('k') | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698