summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/JSString.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-01-04 07:20:25 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-04 07:20:25 -0800
commitedb4aa515ddaa7a5832d7c2896cb0ed9f7dcbbf0 (patch)
tree15925e17e733012a93257f5498d91717a1d6bf98 /JavaScriptCore/runtime/JSString.h
parent626f2058a8302d9e9770d3df2f9677344adb02d9 (diff)
parent10ceded39bd4b259c4921d2a07d322d5e1244ba6 (diff)
downloadexternal_webkit-edb4aa515ddaa7a5832d7c2896cb0ed9f7dcbbf0.zip
external_webkit-edb4aa515ddaa7a5832d7c2896cb0ed9f7dcbbf0.tar.gz
external_webkit-edb4aa515ddaa7a5832d7c2896cb0ed9f7dcbbf0.tar.bz2
Merge "Cherry-picks a WebKit change to revert recent changes to String addition for JSC." into eclair-mr2
Diffstat (limited to 'JavaScriptCore/runtime/JSString.h')
-rw-r--r--JavaScriptCore/runtime/JSString.h35
1 files changed, 1 insertions, 34 deletions
diff --git a/JavaScriptCore/runtime/JSString.h b/JavaScriptCore/runtime/JSString.h
index 1867b17..93b11f1 100644
--- a/JavaScriptCore/runtime/JSString.h
+++ b/JavaScriptCore/runtime/JSString.h
@@ -203,32 +203,6 @@ namespace JSC {
appendStringInConstruct(index, s2);
ASSERT(ropeLength == index);
}
- // This constructor constructs a new string by concatenating s1 & s2.
- // This should only be called with ropeLength <= 3.
- JSString(JSGlobalData* globalData, unsigned ropeLength, JSString* s1, const UString& u2)
- : JSCell(globalData->stringStructure.get())
- , m_stringLength(s1->length() + u2.size())
- , m_ropeLength(ropeLength)
- {
- ASSERT(ropeLength <= s_maxInternalRopeLength);
- unsigned index = 0;
- appendStringInConstruct(index, s1);
- appendStringInConstruct(index, u2);
- ASSERT(ropeLength == index);
- }
- // This constructor constructs a new string by concatenating s1 & s2.
- // This should only be called with ropeLength <= 3.
- JSString(JSGlobalData* globalData, unsigned ropeLength, const UString& u1, JSString* s2)
- : JSCell(globalData->stringStructure.get())
- , m_stringLength(u1.size() + s2->length())
- , m_ropeLength(ropeLength)
- {
- ASSERT(ropeLength <= s_maxInternalRopeLength);
- unsigned index = 0;
- appendStringInConstruct(index, u1);
- appendStringInConstruct(index, s2);
- ASSERT(ropeLength == index);
- }
// This constructor constructs a new string by concatenating v1, v2 & v3.
// This should only be called with ropeLength <= 3 ... which since every
// value must require a ropeLength of at least one implies that the length
@@ -284,18 +258,13 @@ namespace JSC {
void resolveRope(ExecState*) const;
- void appendStringInConstruct(unsigned& index, const UString& string)
- {
- m_fibers[index++] = Rope::Fiber(string.rep()->ref());
- }
-
void appendStringInConstruct(unsigned& index, JSString* jsString)
{
if (jsString->isRope()) {
for (unsigned i = 0; i < jsString->m_ropeLength; ++i)
m_fibers[index++] = jsString->m_fibers[i].ref();
} else
- appendStringInConstruct(index, jsString->string());
+ m_fibers[index++] = Rope::Fiber(jsString->string().rep()->ref());
}
void appendValueInConstructAndIncrementLength(ExecState* exec, unsigned& index, JSValue v)
@@ -342,8 +311,6 @@ namespace JSC {
unsigned ropeLength() { return m_ropeLength ? m_ropeLength : 1; }
friend JSValue jsString(ExecState* exec, JSString* s1, JSString* s2);
- friend JSValue jsString(ExecState* exec, const UString& u1, JSString* s2);
- friend JSValue jsString(ExecState* exec, JSString* s1, const UString& u2);
friend JSValue jsString(ExecState* exec, Register* strings, unsigned count);
};