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

Unified Diff: include/v8.h

Issue 1594017: Flatten before String::WriteUtf8 (Closed)
Patch Set: Add isDeadCheck and isFlat tests Created 10 years, 8 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 | « no previous file | src/api.cc » ('j') | test/cctest/test-strings.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index f64b3867367ab1f65729b04c4b6666c1a385fc1c..e81e2e57fa9793b5d900ea210ece917e9b4ab53b 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -863,6 +863,13 @@ class V8EXPORT String : public Primitive {
int WriteUtf8(char* buffer, int length = -1) const; // UTF-8
/**
+ * Flatten internal memory. Operations on the string tend to run faster
+ * after flattening especially if the string is a concatenation of many
+ * others.
+ */
+ void Flatten();
+
+ /**
* A zero length string.
*/
static v8::Local<v8::String> Empty();
« no previous file with comments | « no previous file | src/api.cc » ('j') | test/cctest/test-strings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698