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

Unified Diff: runtime/lib/string.dart

Issue 10878037: - GET_NATIVE_ARGUMENT uses the isolate which is passed in to allocate the handle. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/string.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string.dart
===================================================================
--- runtime/lib/string.dart (revision 11263)
+++ runtime/lib/string.dart (working copy)
@@ -232,23 +232,11 @@
*/
static String _interpolate(List values) {
int numValues = values.length;
- List<String> stringList = new List<String>(numValues);
- int resultLength = 0;
+ var stringList = new ObjectArray(numValues);
for (int i = 0; i < numValues; i++) {
- String str = values[i].toString();
- resultLength += str.length;
- stringList[i] = str;
+ stringList[i] = values[i].toString();
}
- List<int> codepoints = new List<int>(resultLength);
- int intArrayIx = 0;
- for (int i = 0; i < numValues; i++) {
- String str = stringList[i];
- int strLength = str.length;
- for (int k = 0; k < strLength; k++) {
- codepoints[intArrayIx++] = str.charCodeAt(k);
- }
- }
- return StringBase.createFromCharCodes(codepoints);
+ return _concatAll(stringList);
}
Iterable<Match> allMatches(String str) {
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698