[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

barraclough at apple.com barraclough at apple.com
Wed Dec 22 11:53:49 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 4d95c9ee751d68ece4c94d493847b5263f38ff74
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 10 22:32:19 2010 +0000

    Bug 43816 - Remove UStringImpl
    The class was actually removed a long time ago, replaced by StringImpl.
    UStringImpl is just a typedef onto StringImpl.  Remove this.
    
    JavaScriptCore:
    
    * API/JSClassRef.cpp:
    (OpaqueJSClass::OpaqueJSClass):
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * runtime/JSString.cpp:
    (JSC::JSString::resolveRope):
    (JSC::JSString::replaceCharacter):
    * runtime/JSString.h:
    (JSC::RopeBuilder::RopeIterator::operator*):
    (JSC::RopeBuilder::JSString):
    (JSC::RopeBuilder::appendStringInConstruct):
    (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
    (JSC::jsSingleCharacterSubstring):
    (JSC::jsSubstring):
    * runtime/JSStringBuilder.h:
    (JSC::jsMakeNontrivialString):
    * runtime/RopeImpl.cpp:
    (JSC::RopeImpl::derefFibersNonRecursive):
    * runtime/RopeImpl.h:
    (JSC::RopeImpl::deref):
    * runtime/SmallStrings.cpp:
    (JSC::SmallStringsStorage::SmallStringsStorage):
    * runtime/StringConstructor.cpp:
    (JSC::stringFromCharCodeSlowCase):
    * runtime/StringPrototype.cpp:
    (JSC::jsSpliceSubstringsWithSeparators):
    (JSC::stringProtoFuncFontsize):
    (JSC::stringProtoFuncLink):
    * runtime/UString.cpp:
    (JSC::initializeUString):
    * runtime/UString.h:
    (JSC::UString::adopt):
    (JSC::tryMakeString):
    (JSC::makeString):
    * runtime/UStringImpl.h: Removed.
    
    WebCore:
    
    Rubber stamped by Sam Weinig.
    
    * WebCore.xcodeproj/project.pbxproj:
    * bindings/js/JSDOMBinding.cpp:
    (WebCore::findAtomicString):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65099 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/API/JSClassRef.cpp b/JavaScriptCore/API/JSClassRef.cpp
index d8393f1..ab2b31a 100644
--- a/JavaScriptCore/API/JSClassRef.cpp
+++ b/JavaScriptCore/API/JSClassRef.cpp
@@ -83,7 +83,7 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass*
             if (!valueName.isNull()) {
                 // Use a local variable here to sidestep an RVCT compiler bug.
                 StaticValueEntry* entry = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes);
-                UStringImpl* impl = valueName.rep();
+                StringImpl* impl = valueName.rep();
                 impl->ref();
                 m_staticValues->add(impl, entry);
             }
@@ -98,7 +98,7 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass*
             if (!functionName.isNull()) {
                 // Use a local variable here to sidestep an RVCT compiler bug.
                 StaticFunctionEntry* entry = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes);
-                UStringImpl* impl = functionName.rep();
+                StringImpl* impl = functionName.rep();
                 impl->ref();
                 m_staticFunctions->add(impl, entry);
             }
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index fb9998f..6ab2602 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,44 @@
+2010-08-10  Gavin Barraclough  <barraclough at apple.com>
+
+        Bug 43816 - Remove UStringImpl
+        The class was actually removed a long time ago, replaced by StringImpl.
+        UStringImpl is just a typedef onto StringImpl.  Remove this.
+
+        * API/JSClassRef.cpp:
+        (OpaqueJSClass::OpaqueJSClass):
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * runtime/JSString.cpp:
+        (JSC::JSString::resolveRope):
+        (JSC::JSString::replaceCharacter):
+        * runtime/JSString.h:
+        (JSC::RopeBuilder::RopeIterator::operator*):
+        (JSC::RopeBuilder::JSString):
+        (JSC::RopeBuilder::appendStringInConstruct):
+        (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
+        (JSC::jsSingleCharacterSubstring):
+        (JSC::jsSubstring):
+        * runtime/JSStringBuilder.h:
+        (JSC::jsMakeNontrivialString):
+        * runtime/RopeImpl.cpp:
+        (JSC::RopeImpl::derefFibersNonRecursive):
+        * runtime/RopeImpl.h:
+        (JSC::RopeImpl::deref):
+        * runtime/SmallStrings.cpp:
+        (JSC::SmallStringsStorage::SmallStringsStorage):
+        * runtime/StringConstructor.cpp:
+        (JSC::stringFromCharCodeSlowCase):
+        * runtime/StringPrototype.cpp:
+        (JSC::jsSpliceSubstringsWithSeparators):
+        (JSC::stringProtoFuncFontsize):
+        (JSC::stringProtoFuncLink):
+        * runtime/UString.cpp:
+        (JSC::initializeUString):
+        * runtime/UString.h:
+        (JSC::UString::adopt):
+        (JSC::tryMakeString):
+        (JSC::makeString):
+        * runtime/UStringImpl.h: Removed.
+
 2010-08-10  Patrick Gansterer  <paroga at paroga.com>
 
         Reviewed by Eric Seidel.
diff --git a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index 1402a98..0873d6d 100644
--- a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -216,7 +216,6 @@
 		868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA5F117D048200B908B1 /* StaticConstructors.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		8690231512092D5C00630AF9 /* PageReservation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8690231412092D5C00630AF9 /* PageReservation.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		8698B86910D44D9400D8D01B /* StringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8698B86810D44D9400D8D01B /* StringBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		8698BB3910D86BAF00D8D01B /* UStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8698BB3710D86BAF00D8D01B /* UStringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		869D04AF1193B54D00803475 /* CachedTranscendentalFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 869D04AE1193B54D00803475 /* CachedTranscendentalFunction.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */ = {isa = PBXBuildFile; fileRef = 869EBCB60E8C6D4A008722CC /* ResultType.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		86A90ED00EE7D51F00AB350D /* JITArithmetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */; };
@@ -804,7 +803,6 @@
 		868BFA5F117D048200B908B1 /* StaticConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticConstructors.h; sourceTree = "<group>"; };
 		8690231412092D5C00630AF9 /* PageReservation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageReservation.h; sourceTree = "<group>"; };
 		8698B86810D44D9400D8D01B /* StringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringBuilder.h; sourceTree = "<group>"; };
-		8698BB3710D86BAF00D8D01B /* UStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UStringImpl.h; sourceTree = "<group>"; };
 		869D04AE1193B54D00803475 /* CachedTranscendentalFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedTranscendentalFunction.h; sourceTree = "<group>"; };
 		869EBCB60E8C6D4A008722CC /* ResultType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultType.h; sourceTree = "<group>"; };
 		86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic.cpp; sourceTree = "<group>"; };
@@ -1773,7 +1771,6 @@
 				5D53726E0E1C54880021E549 /* Tracing.h */,
 				F692A8850255597D01FF60F7 /* UString.cpp */,
 				F692A8860255597D01FF60F7 /* UString.h */,
-				8698BB3710D86BAF00D8D01B /* UStringImpl.h */,
 				14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */,
 				14035DB010DBFB2A00FFFFE7 /* WeakGCPtr.h */,
 				1420BE7A10AA6DDB00F455D2 /* WeakRandom.h */,
@@ -2216,7 +2213,6 @@
 				BC18C4740E16F5CD00B34460 /* UnicodeIcu.h in Headers */,
 				BC18C4750E16F5CD00B34460 /* UnusedParam.h in Headers */,
 				BC18C4760E16F5CD00B34460 /* UString.h in Headers */,
-				8698BB3910D86BAF00D8D01B /* UStringImpl.h in Headers */,
 				BC18C4770E16F5CD00B34460 /* UTF8.h in Headers */,
 				E17FF771112131D200076A19 /* ValueCheck.h in Headers */,
 				BC18C4780E16F5CD00B34460 /* Vector.h in Headers */,
@@ -2326,6 +2322,7 @@
 			isa = PBXProject;
 			buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
 			compatibilityVersion = "Xcode 2.4";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,
diff --git a/JavaScriptCore/runtime/JSString.cpp b/JavaScriptCore/runtime/JSString.cpp
index 13c5a51..dab1de9 100644
--- a/JavaScriptCore/runtime/JSString.cpp
+++ b/JavaScriptCore/runtime/JSString.cpp
@@ -37,7 +37,7 @@ namespace JSC {
 // representing the rope is likely imbalanced with more nodes down the left side
 // (since appending to the string is likely more common) - and as such resolving
 // in this fashion should minimize work queue size.  (If we built the queue forwards
-// we would likely have to place all of the constituent UStringImpls into the
+// we would likely have to place all of the constituent StringImpls into the
 // Vector before performing any concatenation, but by working backwards we likely
 // only fill the queue with the number of substrings at any given level in a
 // rope-of-ropes.)
@@ -47,7 +47,7 @@ void JSString::resolveRope(ExecState* exec) const
 
     // Allocate the buffer to hold the final string, position initially points to the end.
     UChar* buffer;
-    if (PassRefPtr<UStringImpl> newImpl = UStringImpl::tryCreateUninitialized(m_length, buffer))
+    if (PassRefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer))
         m_value = newImpl;
     else {
         for (unsigned i = 0; i < m_fiberCount; ++i) {
@@ -79,10 +79,10 @@ void JSString::resolveRope(ExecState* exec) const
                 workQueue.append(rope->fibers()[i]);
             currentFiber = rope->fibers()[fiberCountMinusOne];
         } else {
-            UStringImpl* string = static_cast<UStringImpl*>(currentFiber);
+            StringImpl* string = static_cast<StringImpl*>(currentFiber);
             unsigned length = string->length();
             position -= length;
-            UStringImpl::copyChars(position, string->characters(), length);
+            StringImpl::copyChars(position, string->characters(), length);
 
             // Was this the last item in the work queue?
             if (workQueue.isEmpty()) {
@@ -118,14 +118,14 @@ JSValue JSString::replaceCharacter(ExecState* exec, UChar character, const UStri
     
     // Count total fibers and find matching string.
     size_t fiberCount = 0;
-    UStringImpl* matchString = 0;
+    StringImpl* matchString = 0;
     int matchPosition = -1;
     for (RopeIterator it(m_other.m_fibers.data(), m_fiberCount); it != end; ++it) {
         ++fiberCount;
         if (matchString)
             continue;
 
-        UStringImpl* string = *it;
+        StringImpl* string = *it;
         matchPosition = string->find(character);
         if (matchPosition == -1)
             continue;
@@ -140,7 +140,7 @@ JSValue JSString::replaceCharacter(ExecState* exec, UChar character, const UStri
         return throwOutOfMemoryError(exec);
 
     for (RopeIterator it(m_other.m_fibers.data(), m_fiberCount); it != end; ++it) {
-        UStringImpl* string = *it;
+        StringImpl* string = *it;
         if (string != matchString) {
             builder.append(UString(string));
             continue;
diff --git a/JavaScriptCore/runtime/JSString.h b/JavaScriptCore/runtime/JSString.h
index 53c144b..3805658 100644
--- a/JavaScriptCore/runtime/JSString.h
+++ b/JavaScriptCore/runtime/JSString.h
@@ -132,12 +132,12 @@ namespace JSC {
                     return *this;
                 }
 
-                UStringImpl* operator*()
+                StringImpl* operator*()
                 {
                     WorkItem& item = m_workQueue.last();
                     RopeImpl::Fiber fiber = item.fibers[item.i];
                     ASSERT(!RopeImpl::isRope(fiber));
-                    return static_cast<UStringImpl*>(fiber);
+                    return static_cast<StringImpl*>(fiber);
                 }
 
                 bool operator!=(const RopeIterator& other) const
@@ -203,7 +203,7 @@ namespace JSC {
         {
             ASSERT(!m_value.isNull());
         }
-        JSString(JSGlobalData* globalData, PassRefPtr<UStringImpl> value, HasOtherOwnerType)
+        JSString(JSGlobalData* globalData, PassRefPtr<StringImpl> value, HasOtherOwnerType)
             : JSCell(globalData->stringStructure.get())
             , m_length(value->length())
             , m_value(value)
@@ -359,7 +359,7 @@ namespace JSC {
 
         void appendStringInConstruct(unsigned& index, const UString& string)
         {
-            UStringImpl* impl = string.rep();
+            StringImpl* impl = string.rep();
             impl->ref();
             m_other.m_fibers[index++] = impl;
         }
@@ -386,7 +386,7 @@ namespace JSC {
                 m_length += s->length();
             } else {
                 UString u(v.toString(exec));
-                UStringImpl* impl = u.rep();
+                StringImpl* impl = u.rep();
                 impl->ref();
                 m_other.m_fibers[index++] = impl;
                 m_length += u.size();
@@ -474,7 +474,7 @@ namespace JSC {
         UChar c = s.data()[offset];
         if (c <= 0xFF)
             return globalData->smallStrings.singleCharacterString(globalData, c);
-        return fixupVPtr(globalData, new (globalData) JSString(globalData, UString(UStringImpl::create(s.rep(), offset, 1))));
+        return fixupVPtr(globalData, new (globalData) JSString(globalData, UString(StringImpl::create(s.rep(), offset, 1))));
     }
 
     inline JSString* jsNontrivialString(JSGlobalData* globalData, const char* s)
@@ -532,7 +532,7 @@ namespace JSC {
             if (c <= 0xFF)
                 return globalData->smallStrings.singleCharacterString(globalData, c);
         }
-        return fixupVPtr(globalData, new (globalData) JSString(globalData, UString(UStringImpl::create(s.rep(), offset, length)), JSString::HasOtherOwner));
+        return fixupVPtr(globalData, new (globalData) JSString(globalData, UString(StringImpl::create(s.rep(), offset, length)), JSString::HasOtherOwner));
     }
 
     inline JSString* jsOwnedString(JSGlobalData* globalData, const UString& s)
diff --git a/JavaScriptCore/runtime/JSStringBuilder.h b/JavaScriptCore/runtime/JSStringBuilder.h
index 8f208a1..406353c 100644
--- a/JavaScriptCore/runtime/JSStringBuilder.h
+++ b/JavaScriptCore/runtime/JSStringBuilder.h
@@ -86,7 +86,7 @@ protected:
 template<typename StringType1, typename StringType2>
 inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, StringType2 string2)
 {
-    PassRefPtr<UStringImpl> result = tryMakeString(string1, string2);
+    PassRefPtr<StringImpl> result = tryMakeString(string1, string2);
     if (!result)
         return throwOutOfMemoryError(exec);
     return jsNontrivialString(exec, result);
@@ -95,7 +95,7 @@ inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, Stri
 template<typename StringType1, typename StringType2, typename StringType3>
 inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, StringType2 string2, StringType3 string3)
 {
-    PassRefPtr<UStringImpl> result = tryMakeString(string1, string2, string3);
+    PassRefPtr<StringImpl> result = tryMakeString(string1, string2, string3);
     if (!result)
         return throwOutOfMemoryError(exec);
     return jsNontrivialString(exec, result);
@@ -104,7 +104,7 @@ inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, Stri
 template<typename StringType1, typename StringType2, typename StringType3, typename StringType4>
 inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4)
 {
-    PassRefPtr<UStringImpl> result = tryMakeString(string1, string2, string3, string4);
+    PassRefPtr<StringImpl> result = tryMakeString(string1, string2, string3, string4);
     if (!result)
         return throwOutOfMemoryError(exec);
     return jsNontrivialString(exec, result);
@@ -113,7 +113,7 @@ inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, Stri
 template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5>
 inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5)
 {
-    PassRefPtr<UStringImpl> result = tryMakeString(string1, string2, string3, string4, string5);
+    PassRefPtr<StringImpl> result = tryMakeString(string1, string2, string3, string4, string5);
     if (!result)
         return throwOutOfMemoryError(exec);
     return jsNontrivialString(exec, result);
@@ -122,7 +122,7 @@ inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, Stri
 template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6>
 inline JSValue jsMakeNontrivialString(ExecState* exec, StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6)
 {
-    PassRefPtr<UStringImpl> result = tryMakeString(string1, string2, string3, string4, string5, string6);
+    PassRefPtr<StringImpl> result = tryMakeString(string1, string2, string3, string4, string5, string6);
     if (!result)
         return throwOutOfMemoryError(exec);
     return jsNontrivialString(exec, result);
diff --git a/JavaScriptCore/runtime/RopeImpl.cpp b/JavaScriptCore/runtime/RopeImpl.cpp
index 25b9848..09c24a9 100644
--- a/JavaScriptCore/runtime/RopeImpl.cpp
+++ b/JavaScriptCore/runtime/RopeImpl.cpp
@@ -40,7 +40,7 @@ void RopeImpl::derefFibersNonRecursive(Vector<RopeImpl*, 32>& workQueue)
             else
                 nextRope->deref();
         } else
-            static_cast<UStringImpl*>(fiber)->deref();
+            static_cast<StringImpl*>(fiber)->deref();
     }
 }
 
diff --git a/JavaScriptCore/runtime/RopeImpl.h b/JavaScriptCore/runtime/RopeImpl.h
index ac2b502..dfacbf5 100644
--- a/JavaScriptCore/runtime/RopeImpl.h
+++ b/JavaScriptCore/runtime/RopeImpl.h
@@ -26,14 +26,14 @@
 #ifndef RopeImpl_h
 #define RopeImpl_h
 
-#include "UStringImpl.h"
+#include <wtf/text/StringImpl.h>
 
 namespace JSC {
 
 class RopeImpl : public StringImplBase {
 public:
     // A RopeImpl is composed from a set of smaller strings called Fibers.
-    // Each Fiber in a rope is either UStringImpl or another RopeImpl.
+    // Each Fiber in a rope is either StringImpl or another RopeImpl.
     typedef StringImplBase* Fiber;
 
     // Creates a RopeImpl comprising of 'fiberCount' Fibers.
@@ -56,7 +56,7 @@ public:
         if (isRope(fiber))
             static_cast<RopeImpl*>(fiber)->deref();
         else
-            static_cast<UStringImpl*>(fiber)->deref();
+            static_cast<StringImpl*>(fiber)->deref();
     }
 
     void initializeFiber(unsigned &index, Fiber fiber)
diff --git a/JavaScriptCore/runtime/SmallStrings.cpp b/JavaScriptCore/runtime/SmallStrings.cpp
index 822303c..75cee23 100644
--- a/JavaScriptCore/runtime/SmallStrings.cpp
+++ b/JavaScriptCore/runtime/SmallStrings.cpp
@@ -53,10 +53,10 @@ private:
 SmallStringsStorage::SmallStringsStorage()
 {
     UChar* characterBuffer = 0;
-    RefPtr<UStringImpl> baseString = UStringImpl::createUninitialized(numCharactersToStore, characterBuffer);
+    RefPtr<StringImpl> baseString = StringImpl::createUninitialized(numCharactersToStore, characterBuffer);
     for (unsigned i = 0; i < numCharactersToStore; ++i) {
         characterBuffer[i] = i;
-        m_reps[i] = UStringImpl::create(baseString, i, 1);
+        m_reps[i] = StringImpl::create(baseString, i, 1);
     }
 }
 
diff --git a/JavaScriptCore/runtime/StringConstructor.cpp b/JavaScriptCore/runtime/StringConstructor.cpp
index f02ab09..159386d 100644
--- a/JavaScriptCore/runtime/StringConstructor.cpp
+++ b/JavaScriptCore/runtime/StringConstructor.cpp
@@ -34,7 +34,7 @@ static NEVER_INLINE JSValue stringFromCharCodeSlowCase(ExecState* exec)
 {
     unsigned length = exec->argumentCount();
     UChar* buf;
-    PassRefPtr<UStringImpl> impl = UStringImpl::createUninitialized(length, buf);
+    PassRefPtr<StringImpl> impl = StringImpl::createUninitialized(length, buf);
     for (unsigned i = 0; i < length; ++i)
         buf[i] = static_cast<UChar>(exec->argument(i).toUInt32(exec));
     return jsString(exec, impl);
diff --git a/JavaScriptCore/runtime/StringPrototype.cpp b/JavaScriptCore/runtime/StringPrototype.cpp
index fb6e0f3..2152a0d 100644
--- a/JavaScriptCore/runtime/StringPrototype.cpp
+++ b/JavaScriptCore/runtime/StringPrototype.cpp
@@ -254,7 +254,7 @@ static ALWAYS_INLINE JSValue jsSpliceSubstringsWithSeparators(ExecState* exec, J
         if (position <= 0 && length >= sourceSize)
             return sourceVal;
         // We could call UString::substr, but this would result in redundant checks
-        return jsString(exec, UStringImpl::create(source.rep(), max(0, position), min(sourceSize, length)));
+        return jsString(exec, StringImpl::create(source.rep(), max(0, position), min(sourceSize, length)));
     }
 
     int totalLength = 0;
@@ -267,7 +267,7 @@ static ALWAYS_INLINE JSValue jsSpliceSubstringsWithSeparators(ExecState* exec, J
         return jsString(exec, "");
 
     UChar* buffer;
-    PassRefPtr<UStringImpl> impl = UStringImpl::tryCreateUninitialized(totalLength, buffer);
+    PassRefPtr<StringImpl> impl = StringImpl::tryCreateUninitialized(totalLength, buffer);
     if (!impl)
         return throwOutOfMemoryError(exec);
 
@@ -275,11 +275,11 @@ static ALWAYS_INLINE JSValue jsSpliceSubstringsWithSeparators(ExecState* exec, J
     int bufferPos = 0;
     for (int i = 0; i < maxCount; i++) {
         if (i < rangeCount) {
-            UStringImpl::copyChars(buffer + bufferPos, source.data() + substringRanges[i].position, substringRanges[i].length);
+            StringImpl::copyChars(buffer + bufferPos, source.data() + substringRanges[i].position, substringRanges[i].length);
             bufferPos += substringRanges[i].length;
         }
         if (i < separatorCount) {
-            UStringImpl::copyChars(buffer + bufferPos, separators[i].data(), separators[i].size());
+            StringImpl::copyChars(buffer + bufferPos, separators[i].data(), separators[i].size());
             bufferPos += separators[i].size();
         }
     }
@@ -987,7 +987,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncFontsize(ExecState* exec)
         unsigned stringSize = s.size();
         unsigned bufferSize = 22 + stringSize;
         UChar* buffer;
-        PassRefPtr<UStringImpl> impl = UStringImpl::tryCreateUninitialized(bufferSize, buffer);
+        PassRefPtr<StringImpl> impl = StringImpl::tryCreateUninitialized(bufferSize, buffer);
         if (!impl)
             return JSValue::encode(jsUndefined());
         buffer[0] = '<';
@@ -1038,7 +1038,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncLink(ExecState* exec)
     unsigned stringSize = s.size();
     unsigned bufferSize = 15 + linkTextSize + stringSize;
     UChar* buffer;
-    PassRefPtr<UStringImpl> impl = UStringImpl::tryCreateUninitialized(bufferSize, buffer);
+    PassRefPtr<StringImpl> impl = StringImpl::tryCreateUninitialized(bufferSize, buffer);
     if (!impl)
         return JSValue::encode(jsUndefined());
     buffer[0] = '<';
diff --git a/JavaScriptCore/runtime/UString.cpp b/JavaScriptCore/runtime/UString.cpp
index c442500..5ef1e9e 100644
--- a/JavaScriptCore/runtime/UString.cpp
+++ b/JavaScriptCore/runtime/UString.cpp
@@ -61,9 +61,9 @@ COMPILE_ASSERT(sizeof(UString) == sizeof(void*), UString_should_stay_small);
 
 void initializeUString()
 {
-    // UStringImpl::empty() does not construct its static string in a threadsafe fashion,
+    // StringImpl::empty() does not construct its static string in a threadsafe fashion,
     // so ensure it has been initialized from here.
-    UStringImpl::empty();
+    StringImpl::empty();
 
     UString::s_nullUString = new UString;
 }
diff --git a/JavaScriptCore/runtime/UString.h b/JavaScriptCore/runtime/UString.h
index bae9265..7d7b6eb 100644
--- a/JavaScriptCore/runtime/UString.h
+++ b/JavaScriptCore/runtime/UString.h
@@ -24,7 +24,6 @@
 #define UString_h
 
 #include "Collector.h"
-#include "UStringImpl.h"
 #include <stdint.h>
 #include <string.h>
 #include <wtf/Assertions.h>
@@ -34,6 +33,7 @@
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/text/CString.h>
+#include <wtf/text/StringImpl.h>
 #include <wtf/unicode/Unicode.h>
 
 namespace JSC {
@@ -45,7 +45,7 @@ namespace JSC {
         friend class JIT;
 
     public:
-        typedef UStringImpl Rep;
+        typedef StringImpl Rep;
     
     public:
         UString() {}
@@ -66,7 +66,7 @@ namespace JSC {
         }
 
         template<size_t inlineCapacity>
-        static PassRefPtr<UStringImpl> adopt(Vector<UChar, inlineCapacity>& vector)
+        static PassRefPtr<StringImpl> adopt(Vector<UChar, inlineCapacity>& vector)
         {
             return Rep::adopt(vector);
         }
@@ -330,7 +330,7 @@ namespace JSC {
     }
 
     template<typename StringType1, typename StringType2>
-    PassRefPtr<UStringImpl> tryMakeString(StringType1 string1, StringType2 string2)
+    PassRefPtr<StringImpl> tryMakeString(StringType1 string1, StringType2 string2)
     {
         StringTypeAdapter<StringType1> adapter1(string1);
         StringTypeAdapter<StringType2> adapter2(string2);
@@ -341,7 +341,7 @@ namespace JSC {
         sumWithOverflow(length, adapter2.length(), overflow);
         if (overflow)
             return 0;
-        PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+        PassRefPtr<StringImpl> resultImpl = StringImpl::tryCreateUninitialized(length, buffer);
         if (!resultImpl)
             return 0;
 
@@ -354,7 +354,7 @@ namespace JSC {
     }
 
     template<typename StringType1, typename StringType2, typename StringType3>
-    PassRefPtr<UStringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3)
+    PassRefPtr<StringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3)
     {
         StringTypeAdapter<StringType1> adapter1(string1);
         StringTypeAdapter<StringType2> adapter2(string2);
@@ -367,7 +367,7 @@ namespace JSC {
         sumWithOverflow(length, adapter3.length(), overflow);
         if (overflow)
             return 0;
-        PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+        PassRefPtr<StringImpl> resultImpl = StringImpl::tryCreateUninitialized(length, buffer);
         if (!resultImpl)
             return 0;
 
@@ -382,7 +382,7 @@ namespace JSC {
     }
 
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4>
-    PassRefPtr<UStringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4)
+    PassRefPtr<StringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4)
     {
         StringTypeAdapter<StringType1> adapter1(string1);
         StringTypeAdapter<StringType2> adapter2(string2);
@@ -397,7 +397,7 @@ namespace JSC {
         sumWithOverflow(length, adapter4.length(), overflow);
         if (overflow)
             return 0;
-        PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+        PassRefPtr<StringImpl> resultImpl = StringImpl::tryCreateUninitialized(length, buffer);
         if (!resultImpl)
             return 0;
 
@@ -414,7 +414,7 @@ namespace JSC {
     }
 
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5>
-    PassRefPtr<UStringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5)
+    PassRefPtr<StringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5)
     {
         StringTypeAdapter<StringType1> adapter1(string1);
         StringTypeAdapter<StringType2> adapter2(string2);
@@ -431,7 +431,7 @@ namespace JSC {
         sumWithOverflow(length, adapter5.length(), overflow);
         if (overflow)
             return 0;
-        PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+        PassRefPtr<StringImpl> resultImpl = StringImpl::tryCreateUninitialized(length, buffer);
         if (!resultImpl)
             return 0;
 
@@ -450,7 +450,7 @@ namespace JSC {
     }
 
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6>
-    PassRefPtr<UStringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6)
+    PassRefPtr<StringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6)
     {
         StringTypeAdapter<StringType1> adapter1(string1);
         StringTypeAdapter<StringType2> adapter2(string2);
@@ -469,7 +469,7 @@ namespace JSC {
         sumWithOverflow(length, adapter6.length(), overflow);
         if (overflow)
             return 0;
-        PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+        PassRefPtr<StringImpl> resultImpl = StringImpl::tryCreateUninitialized(length, buffer);
         if (!resultImpl)
             return 0;
 
@@ -490,7 +490,7 @@ namespace JSC {
     }
 
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6, typename StringType7>
-    PassRefPtr<UStringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6, StringType7 string7)
+    PassRefPtr<StringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6, StringType7 string7)
     {
         StringTypeAdapter<StringType1> adapter1(string1);
         StringTypeAdapter<StringType2> adapter2(string2);
@@ -511,7 +511,7 @@ namespace JSC {
         sumWithOverflow(length, adapter7.length(), overflow);
         if (overflow)
             return 0;
-        PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+        PassRefPtr<StringImpl> resultImpl = StringImpl::tryCreateUninitialized(length, buffer);
         if (!resultImpl)
             return 0;
 
@@ -534,7 +534,7 @@ namespace JSC {
     }
 
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6, typename StringType7, typename StringType8>
-    PassRefPtr<UStringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6, StringType7 string7, StringType8 string8)
+    PassRefPtr<StringImpl> tryMakeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6, StringType7 string7, StringType8 string8)
     {
         StringTypeAdapter<StringType1> adapter1(string1);
         StringTypeAdapter<StringType2> adapter2(string2);
@@ -557,7 +557,7 @@ namespace JSC {
         sumWithOverflow(length, adapter8.length(), overflow);
         if (overflow)
             return 0;
-        PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+        PassRefPtr<StringImpl> resultImpl = StringImpl::tryCreateUninitialized(length, buffer);
         if (!resultImpl)
             return 0;
 
@@ -584,7 +584,7 @@ namespace JSC {
     template<typename StringType1, typename StringType2>
     UString makeString(StringType1 string1, StringType2 string2)
     {
-        PassRefPtr<UStringImpl> resultImpl = tryMakeString(string1, string2);
+        PassRefPtr<StringImpl> resultImpl = tryMakeString(string1, string2);
         if (!resultImpl)
             CRASH();
         return resultImpl;
@@ -593,7 +593,7 @@ namespace JSC {
     template<typename StringType1, typename StringType2, typename StringType3>
     UString makeString(StringType1 string1, StringType2 string2, StringType3 string3)
     {
-        PassRefPtr<UStringImpl> resultImpl = tryMakeString(string1, string2, string3);
+        PassRefPtr<StringImpl> resultImpl = tryMakeString(string1, string2, string3);
         if (!resultImpl)
             CRASH();
         return resultImpl;
@@ -602,7 +602,7 @@ namespace JSC {
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4>
     UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4)
     {
-        PassRefPtr<UStringImpl> resultImpl = tryMakeString(string1, string2, string3, string4);
+        PassRefPtr<StringImpl> resultImpl = tryMakeString(string1, string2, string3, string4);
         if (!resultImpl)
             CRASH();
         return resultImpl;
@@ -611,7 +611,7 @@ namespace JSC {
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5>
     UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5)
     {
-        PassRefPtr<UStringImpl> resultImpl = tryMakeString(string1, string2, string3, string4, string5);
+        PassRefPtr<StringImpl> resultImpl = tryMakeString(string1, string2, string3, string4, string5);
         if (!resultImpl)
             CRASH();
         return resultImpl;
@@ -620,7 +620,7 @@ namespace JSC {
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6>
     UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6)
     {
-        PassRefPtr<UStringImpl> resultImpl = tryMakeString(string1, string2, string3, string4, string5, string6);
+        PassRefPtr<StringImpl> resultImpl = tryMakeString(string1, string2, string3, string4, string5, string6);
         if (!resultImpl)
             CRASH();
         return resultImpl;
@@ -629,7 +629,7 @@ namespace JSC {
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6, typename StringType7>
     UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6, StringType7 string7)
     {
-        PassRefPtr<UStringImpl> resultImpl = tryMakeString(string1, string2, string3, string4, string5, string6, string7);
+        PassRefPtr<StringImpl> resultImpl = tryMakeString(string1, string2, string3, string4, string5, string6, string7);
         if (!resultImpl)
             CRASH();
         return resultImpl;
@@ -638,7 +638,7 @@ namespace JSC {
     template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6, typename StringType7, typename StringType8>
     UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6, StringType7 string7, StringType8 string8)
     {
-        PassRefPtr<UStringImpl> resultImpl = tryMakeString(string1, string2, string3, string4, string5, string6, string7, string8);
+        PassRefPtr<StringImpl> resultImpl = tryMakeString(string1, string2, string3, string4, string5, string6, string7, string8);
         if (!resultImpl)
             CRASH();
         return resultImpl;
diff --git a/JavaScriptCore/runtime/UStringImpl.h b/JavaScriptCore/runtime/UStringImpl.h
deleted file mode 100644
index 6401d3b..0000000
--- a/JavaScriptCore/runtime/UStringImpl.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 1999 Lars Knoll (knoll at kde.org)
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef UStringImpl_h
-#define UStringImpl_h
-
-// FIXME: Remove this redundant name!
-#include <wtf/text/StringImpl.h>
-namespace JSC { typedef StringImpl UStringImpl; }
-
-#endif
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4df80d0..33c540c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-10  Gavin Barraclough  <barraclough at apple.com>
+
+        Rubber stamped by Sam Weinig.
+        
+        Bug 43816 - Remove UStringImpl
+        The class was actually removed a long time ago, replaced by StringImpl.
+        UStringImpl is just a typedef onto StringImpl.  Remove this.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::findAtomicString):
+
 2010-08-09  Stephen White  <senorblanco at chromium.org>
 
         Reviewed by David Levin.
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 403e006..daa154d 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -20179,6 +20179,7 @@
 			isa = PBXProject;
 			buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
 			compatibilityVersion = "Xcode 2.4";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,
diff --git a/WebCore/bindings/js/JSDOMBinding.cpp b/WebCore/bindings/js/JSDOMBinding.cpp
index 7e64713..87512f2 100644
--- a/WebCore/bindings/js/JSDOMBinding.cpp
+++ b/WebCore/bindings/js/JSDOMBinding.cpp
@@ -501,7 +501,7 @@ AtomicStringImpl* findAtomicString(const Identifier& identifier)
 {
     if (identifier.isNull())
         return 0;
-    UStringImpl* impl = identifier.ustring().rep();
+    StringImpl* impl = identifier.ustring().rep();
     ASSERT(impl->existingHash());
     return AtomicString::find(impl->characters(), impl->length(), impl->existingHash());
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list