Chromium Code Reviews| Index: runtime/lib/string_patch.dart |
| =================================================================== |
| --- runtime/lib/string_patch.dart (revision 22334) |
| +++ runtime/lib/string_patch.dart (working copy) |
| @@ -27,9 +27,13 @@ |
| * [codePoints]. |
| */ |
| static String createFromCharCodes(Iterable<int> charCodes) { |
| - if (charCodes is! _ObjectArray && charCodes is! _GrowableObjectArray) { |
| + // TODO(srdjan): Also skip copying of typed arrays. |
| + if (charCodes is! _ObjectArray && |
|
Ivan Posva
2013/05/03 15:44:27
This will not work long-term. Especially once we h
srdjan
2013/05/03 16:44:47
Good point. What is the ETA for "implements dynami
|
| + charCodes is! _GrowableObjectArray && |
| + charCodes is! _ImmutableArray) { |
| charCodes = new List<int>.from(charCodes, growable: false); |
| } |
| + |
| return _createFromCodePoints(charCodes); |
| } |
| @@ -314,7 +318,7 @@ |
| */ |
| static String _interpolate(List values) { |
| int numValues = values.length; |
| - var stringList = new List(numValues); |
| + _ObjectArray stringList = new List(numValues); |
| for (int i = 0; i < numValues; i++) { |
| stringList[i] = values[i].toString(); |
| } |
| @@ -428,7 +432,7 @@ |
| return _concatAll(stringsArray); |
| } |
| - static String _concatAll(List<String> strings) |
| + static String _concatAll(_ObjectArray<String> strings) |
| native "Strings_concatAll"; |
| } |