[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:03:54 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8091bedc79c2b34a952eaba82b2b08243fb70ffa
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 19 18:44:25 2002 +0000

    	- another hash table fix; yields a 2% improvement on iBench JavaScript
    
            * kjs/property_map.cpp: A few more places where we use & instead of %.
    
    	- some List changes that don't affect speed yet
    
            * kjs/types.cpp:
            (List::prependList): Tighten up a tiny bit.
            (List::copy): Use prependList.
            * kjs/types.h: Remove appendList and globalClear.
    
            * kjs/interpreter.cpp: (Interpreter::finalCheck): Remove List::globalClear().
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2757 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index aa80788..ec8949c 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,20 @@
 2002-11-19  Darin Adler  <darin at apple.com>
 
+	- another hash table fix; yields a 2% improvement on iBench JavaScript
+
+        * kjs/property_map.cpp: A few more places where we use & instead of %.
+
+	- some List changes that don't affect speed yet
+
+        * kjs/types.cpp:
+        (List::prependList): Tighten up a tiny bit.
+        (List::copy): Use prependList.
+        * kjs/types.h: Remove appendList and globalClear.
+
+        * kjs/interpreter.cpp: (Interpreter::finalCheck): Remove List::globalClear().
+
+2002-11-19  Darin Adler  <darin at apple.com>
+
 	- fixed 3105026 -- REGRESSION: DHTML menus are broken all over the place
 
         * kjs/types.cpp: (List::prepend): Fix backwards links in new node.
diff --git a/JavaScriptCore/ChangeLog-2002-12-03 b/JavaScriptCore/ChangeLog-2002-12-03
index aa80788..ec8949c 100644
--- a/JavaScriptCore/ChangeLog-2002-12-03
+++ b/JavaScriptCore/ChangeLog-2002-12-03
@@ -1,5 +1,20 @@
 2002-11-19  Darin Adler  <darin at apple.com>
 
+	- another hash table fix; yields a 2% improvement on iBench JavaScript
+
+        * kjs/property_map.cpp: A few more places where we use & instead of %.
+
+	- some List changes that don't affect speed yet
+
+        * kjs/types.cpp:
+        (List::prependList): Tighten up a tiny bit.
+        (List::copy): Use prependList.
+        * kjs/types.h: Remove appendList and globalClear.
+
+        * kjs/interpreter.cpp: (Interpreter::finalCheck): Remove List::globalClear().
+
+2002-11-19  Darin Adler  <darin at apple.com>
+
 	- fixed 3105026 -- REGRESSION: DHTML menus are broken all over the place
 
         * kjs/types.cpp: (List::prepend): Fix backwards links in new node.
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index aa80788..ec8949c 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,5 +1,20 @@
 2002-11-19  Darin Adler  <darin at apple.com>
 
+	- another hash table fix; yields a 2% improvement on iBench JavaScript
+
+        * kjs/property_map.cpp: A few more places where we use & instead of %.
+
+	- some List changes that don't affect speed yet
+
+        * kjs/types.cpp:
+        (List::prependList): Tighten up a tiny bit.
+        (List::copy): Use prependList.
+        * kjs/types.h: Remove appendList and globalClear.
+
+        * kjs/interpreter.cpp: (Interpreter::finalCheck): Remove List::globalClear().
+
+2002-11-19  Darin Adler  <darin at apple.com>
+
 	- fixed 3105026 -- REGRESSION: DHTML menus are broken all over the place
 
         * kjs/types.cpp: (List::prepend): Fix backwards links in new node.
diff --git a/JavaScriptCore/kjs/interpreter.cpp b/JavaScriptCore/kjs/interpreter.cpp
index 330ecd1..1706f1c 100644
--- a/JavaScriptCore/kjs/interpreter.cpp
+++ b/JavaScriptCore/kjs/interpreter.cpp
@@ -312,7 +312,6 @@ void Interpreter::finalCheck()
   Node::finalCheck();
   Collector::finalCheck();
   Lexer::globalClear();
-  List::globalClear();
   UString::globalClear();
 }
 #endif
diff --git a/JavaScriptCore/kjs/property_map.cpp b/JavaScriptCore/kjs/property_map.cpp
index f698028..5fa873e 100644
--- a/JavaScriptCore/kjs/property_map.cpp
+++ b/JavaScriptCore/kjs/property_map.cpp
@@ -110,7 +110,7 @@ ValueImp *PropertyMap::get(const UString &name, int &attributes) const
             attributes = _table[i].attributes;
             return _table[i].value;
         }
-        i = (i + 1) % _tableSize;
+        i = (i + 1) & _tableSizeHashMask;
     }
     return 0;
 }
@@ -128,7 +128,7 @@ ValueImp *PropertyMap::get(const UString &name) const
     while (UString::Rep *key = _table[i].key) {
         if (keysMatch(name.rep, key))
             return _table[i].value;
-        i = (i + 1) % _tableSize;
+        i = (i + 1) & _tableSizeHashMask;
     }
     return 0;
 }
@@ -152,7 +152,7 @@ void PropertyMap::put(const UString &name, ValueImp *value, int attributes)
         }
     }
 
-    if (_keyCount >= _tableSize / 2)
+    if (_keyCount * 2 >= _tableSize)
         expand();
     
     int i = hash(name.rep);
@@ -163,7 +163,7 @@ void PropertyMap::put(const UString &name, ValueImp *value, int attributes)
             // Attributes are intentionally not updated.
             return;
         }
-        i = (i + 1) % _tableSize;
+        i = (i + 1) & _tableSizeHashMask;
     }
     
     // Create a new hash table entry.
@@ -178,7 +178,7 @@ inline void PropertyMap::insert(UString::Rep *key, ValueImp *value, int attribut
 {
     int i = hash(key);
     while (_table[i].key)
-        i = (i + 1) % _tableSize;
+        i = (i + 1) & _tableSizeHashMask;
     
     _table[i].key = key;
     _table[i].value = value;
@@ -228,7 +228,7 @@ void PropertyMap::remove(const UString &name)
     while ((key = _table[i].key)) {
         if (keysMatch(name.rep, key))
             break;
-        i = (i + 1) % _tableSize;
+        i = (i + 1) & _tableSizeHashMask;
     }
     if (!key)
         return;
@@ -240,7 +240,7 @@ void PropertyMap::remove(const UString &name)
     
     // Reinsert all the items to the right in the same cluster.
     while (1) {
-        i = (i + 1) % _tableSize;
+        i = (i + 1) & _tableSizeHashMask;
         key = _table[i].key;
         if (!key)
             break;
diff --git a/JavaScriptCore/kjs/types.cpp b/JavaScriptCore/kjs/types.cpp
index 77dd18c..4f4c72f 100644
--- a/JavaScriptCore/kjs/types.cpp
+++ b/JavaScriptCore/kjs/types.cpp
@@ -193,23 +193,13 @@ void List::prepend(ValueImp *val)
   hook->next = n;
 }
 
-void List::appendList(const List& lst)
-{
-  ListNode *otherHook = lst.hook;
-  ListNode *o = otherHook->next;
-  while (o != otherHook) {
-    append(o->member);
-    o = o->next;
-  }
-}
-
 void List::prependList(const List& lst)
 {
   ListNode *otherHook = lst.hook;
-  ListNode *o = otherHook->prev;
-  while (o != otherHook) {
-    prepend(o->member);
-    o = o->prev;
+  ListNode *n = otherHook->prev;
+  while (n != otherHook) {
+    prepend(n->member);
+    n = n->prev;
   }
 }
 
@@ -237,7 +227,6 @@ void List::remove(const Value &val)
   }
 }
 
-
 void List::clear()
 {
   if (!m_needsMarking) {
@@ -261,7 +250,7 @@ void List::clearInternal()
 List List::copy() const
 {
   List newList;
-  newList.appendList(*this);
+  newList.prependList(*this);
   return newList;
 }
 
@@ -314,7 +303,6 @@ const List &List::empty()
   return l;
 }
 
-
 void List::erase(ListNode *n)
 {
   if (n != hook) {
@@ -361,10 +349,3 @@ void List::swap(List &other)
   hook = other.hook;
   other.hook = tmp;
 }
-
-#ifdef KJS_DEBUG_MEM
-void List::globalClear()
-{
-}
-#endif
-
diff --git a/JavaScriptCore/kjs/types.h b/JavaScriptCore/kjs/types.h
index b870eb2..17e98c5 100644
--- a/JavaScriptCore/kjs/types.h
+++ b/JavaScriptCore/kjs/types.h
@@ -122,10 +122,6 @@ namespace KJS {
     void prepend(const Value& val);
     void prepend(ValueImp *val);
     /**
-     * Appends the items of another list at the end of this one.
-     */
-    void appendList(const List& lst);
-    /**
      * Prepend the items of another list to this one.
      * The first item of @p lst will become the first item of the list.
      */
@@ -187,9 +183,6 @@ namespace KJS {
      * function has a @ref KJS::List parameter.
      */
     static const List &empty();
-#ifdef KJS_DEBUG_MEM
-    static void globalClear();
-#endif
     void mark();
   private:
 
@@ -198,7 +191,7 @@ namespace KJS {
     void refAll();
     void derefAll();
     void swap(List &other);
-
+    
     ListHookNode *hook;
     bool m_needsMarking;
   };

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list