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

Unified Diff: runtime/vm/object.cc

Issue 11416270: Implement faster splitting with empty string as pattern. Add special native for computing substring… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/vm/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 15545)
+++ runtime/vm/object.cc (working copy)
@@ -10781,6 +10781,22 @@
}
+RawOneByteString* OneByteString::New(const String& other_one_byte_string,
+ intptr_t other_start_index,
+ intptr_t other_len,
+ Heap::Space space) {
+ const String& result = String::Handle(OneByteString::New(other_len, space));
+ ASSERT(other_one_byte_string.IsOneByteString());
+ if (other_len > 0) {
+ NoGCScope no_gc;
+ memmove(OneByteString::CharAddr(result, 0),
+ OneByteString::CharAddr(other_one_byte_string, other_start_index),
+ other_len);
+ }
+ return OneByteString::raw(result);
+}
+
+
RawOneByteString* OneByteString::Concat(const String& str1,
const String& str2,
Heap::Space space) {
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698