Revert changes to ALWAYS_INLINEness of a couple of functions in UString.
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Aug 2010 21:20:06 +0000 (21:20 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Aug 2010 21:20:06 +0000 (21:20 +0000)
This appears to have degraded performance.

Reviewed by Sam Weinig

* runtime/UString.cpp:
(JSC::UString::ascii):
* runtime/UString.h:
(JSC::UString::length):
(JSC::UString::isEmpty):
(JSC::UString::~UString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65266 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/runtime/UString.cpp
JavaScriptCore/runtime/UString.h

index bbc9c90..a6dbf7e 100644 (file)
@@ -1,3 +1,17 @@
+2010-08-12  Gavin Barraclough  <barraclough@apple.com>
+
+        Reviewed by Sam Weinig
+
+        Revert changes to ALWAYS_INLINEness of a couple of functions in UString.
+        This appears to have degraded performance.
+
+        * runtime/UString.cpp:
+        (JSC::UString::ascii):
+        * runtime/UString.h:
+        (JSC::UString::length):
+        (JSC::UString::isEmpty):
+        (JSC::UString::~UString):
+
 2010-08-12  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         Reviewed by Antonio Gomes.
index 4d8ab9e..32305db 100644 (file)
@@ -197,7 +197,7 @@ char* UString::ascii() const
     delete[] asciiBuffer;
     asciiBuffer = new char[neededSize];
 
-    const UChar* p = characters(); // Don't roll me out!
+    const UChar* p = characters();
     char* q = asciiBuffer;
     const UChar* limit = p + len;
     while (p != limit) {
index ecc00ba..e9c347d 100644 (file)
@@ -86,7 +86,7 @@ public:
      */
     CString UTF8String(bool strict = false) const;
 
-    ALWAYS_INLINE unsigned length() const
+    unsigned length() const
     {
         if (!m_impl)
             return 0;
@@ -121,7 +121,7 @@ public:
     UString substr(unsigned pos = 0, unsigned len = 0xFFFFFFFF) const;
 
     bool isNull() const { return !m_impl; }
-    ALWAYS_INLINE bool isEmpty() const { return !m_impl || !m_impl->length(); }
+    bool isEmpty() const { return !m_impl || !m_impl->length(); }
 
     StringImpl* impl() const { return m_impl.get(); }
 
@@ -137,6 +137,7 @@ public:
         return m_impl->cost();
     }
 
+    ALWAYS_INLINE ~UString() { }
 private:
     RefPtr<StringImpl> m_impl;
 };
@@ -266,3 +267,5 @@ template <> struct VectorTraits<JSC::UString> : SimpleClassVectorTraits
 } // namespace WTF
 
 #endif
+
+#include "StringConcatenate.h"