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

simon.fraser at apple.com simon.fraser at apple.com
Wed Dec 22 15:32:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 934f035c59f10a0a49d5a034b71021187c3b16b1
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Nov 6 04:55:43 2010 +0000

    2010-11-05  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dave Hyatt.
    
            Inline some DeprecatedPtrListImplIterator methods for performance
            https://bugs.webkit.org/show_bug.cgi?id=49124
    
            This is a ~4% performance improvement on some Peacekeepr "Community" tests.
    
            * platform/DeprecatedPtrListImpl.cpp:
            * platform/DeprecatedPtrListImpl.h:
            (WebCore::DeprecatedListNode::DeprecatedListNode):
            (WebCore::DeprecatedPtrListImplIterator::current):
            (WebCore::DeprecatedPtrListImplIterator::operator++):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71462 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4690bdf..79b22b4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-05  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dave Hyatt.
+
+        Inline some DeprecatedPtrListImplIterator methods for performance
+        https://bugs.webkit.org/show_bug.cgi?id=49124
+
+        This is a ~4% performance improvement on some Peacekeepr "Community" tests.
+
+        * platform/DeprecatedPtrListImpl.cpp:
+        * platform/DeprecatedPtrListImpl.h:
+        (WebCore::DeprecatedListNode::DeprecatedListNode):
+        (WebCore::DeprecatedPtrListImplIterator::current):
+        (WebCore::DeprecatedPtrListImplIterator::operator++):
+
 2010-11-05  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/platform/DeprecatedPtrListImpl.cpp b/WebCore/platform/DeprecatedPtrListImpl.cpp
index 96fd513..e6b536d 100644
--- a/WebCore/platform/DeprecatedPtrListImpl.cpp
+++ b/WebCore/platform/DeprecatedPtrListImpl.cpp
@@ -29,21 +29,9 @@
 #include <cstddef>
 #include <algorithm>
 #include <wtf/Assertions.h>
-#include <wtf/Noncopyable.h>
 
 namespace WebCore {
 
-class DeprecatedListNode : public Noncopyable
-{
-public:
-    DeprecatedListNode(void *d) : data(d), next(0), prev(0) { }
-
-    void *data;
-    DeprecatedListNode *next;
-    DeprecatedListNode *prev;
-};
-
-
 static DeprecatedListNode *copyList(DeprecatedListNode *l, DeprecatedListNode *&tail)
 {
     DeprecatedListNode *node = l;
@@ -475,11 +463,6 @@ void *DeprecatedPtrListImplIterator::toLast()
     return current();
 }
 
-void *DeprecatedPtrListImplIterator::current() const
-{
-    return node == 0 ? 0 : node->data;
-}
-
 void *DeprecatedPtrListImplIterator::operator--()
 {
     if (node) {
@@ -488,14 +471,6 @@ void *DeprecatedPtrListImplIterator::operator--()
     return current();
 }
 
-void *DeprecatedPtrListImplIterator::operator++()
-{
-    if (node) {
-        node = node->next;
-    }
-    return current();
-}
-
 DeprecatedPtrListImplIterator &DeprecatedPtrListImplIterator::operator=(const DeprecatedPtrListImplIterator &impl)
 {
     if (list) {
diff --git a/WebCore/platform/DeprecatedPtrListImpl.h b/WebCore/platform/DeprecatedPtrListImpl.h
index 5e4121b..416da67 100644
--- a/WebCore/platform/DeprecatedPtrListImpl.h
+++ b/WebCore/platform/DeprecatedPtrListImpl.h
@@ -26,15 +26,15 @@
 #ifndef DeprecatedPtrListImpl_h
 #define DeprecatedPtrListImpl_h
 
+#include <wtf/Noncopyable.h>
+
 namespace WebCore {
 
 class DeprecatedListNode;
 class DeprecatedPtrListImplIterator;
 
-class DeprecatedPtrListImpl
-{
+class DeprecatedPtrListImpl {
 public:
-    
     DeprecatedPtrListImpl(void (*deleteFunc)(void *));
     DeprecatedPtrListImpl(const DeprecatedPtrListImpl &impl);
     ~DeprecatedPtrListImpl();
@@ -90,6 +90,14 @@ public:
     friend class DeprecatedPtrListImplIterator;
 };
 
+class DeprecatedListNode : public Noncopyable {
+public:
+    DeprecatedListNode(void *d) : data(d), next(0), prev(0) { }
+
+    void *data;
+    DeprecatedListNode *next;
+    DeprecatedListNode *prev;
+};
 
 class DeprecatedPtrListImplIterator {
 public:
@@ -103,10 +111,16 @@ public:
     unsigned count() const;
     void *toFirst();
     void *toLast();
-    void *current() const;
+    void *current() const { return node ? node->data : 0; }
 
     void *operator--();
-    void *operator++();
+    void *operator++()
+    {
+        if (node)
+            node = node->next;
+
+        return current();
+    }
 
 private:
     const DeprecatedPtrListImpl *list;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list