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

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


The following commit has been merged in the debian/unstable branch:
commit 3964a7b6934f0435dc97fa9446498e94e9039696
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 19 02:15:17 2002 +0000

    	Another step towards the List conversion: stop inheriting from Value.
    
            * kjs/types.cpp:
            (ListIterator::ListIterator):
            (List::List):
            (List::operator=):
            (List::~List):
            (List::mark):
            (List::append):
            (List::prepend):
            (List::appendList):
            (List::prependList):
            (List::removeFirst):
            (List::removeLast):
            (List::remove):
            (List::clear):
            (List::copy):
            (List::begin):
            (List::end):
            (List::isEmpty):
            (List::size):
            (List::at):
            (List::operator[]):
            * kjs/types.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2744 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 2beb583..952765f 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,32 @@
 2002-11-18  Maciej Stachowiak  <mjs at apple.com>
 
+	Another step towards the List conversion: stop inheriting from Value.
+	
+        * kjs/types.cpp:
+        (ListIterator::ListIterator):
+        (List::List):
+        (List::operator=):
+        (List::~List):
+        (List::mark):
+        (List::append):
+        (List::prepend):
+        (List::appendList):
+        (List::prependList):
+        (List::removeFirst):
+        (List::removeLast):
+        (List::remove):
+        (List::clear):
+        (List::copy):
+        (List::begin):
+        (List::end):
+        (List::isEmpty):
+        (List::size):
+        (List::at):
+        (List::operator[]):
+        * kjs/types.h:
+
+2002-11-18  Maciej Stachowiak  <mjs at apple.com>
+
 	Partway to removing Value from List. Created a marking List
 	variant, used it in place of ListImp.
 	
diff --git a/JavaScriptCore/ChangeLog-2002-12-03 b/JavaScriptCore/ChangeLog-2002-12-03
index 2beb583..952765f 100644
--- a/JavaScriptCore/ChangeLog-2002-12-03
+++ b/JavaScriptCore/ChangeLog-2002-12-03
@@ -1,5 +1,32 @@
 2002-11-18  Maciej Stachowiak  <mjs at apple.com>
 
+	Another step towards the List conversion: stop inheriting from Value.
+	
+        * kjs/types.cpp:
+        (ListIterator::ListIterator):
+        (List::List):
+        (List::operator=):
+        (List::~List):
+        (List::mark):
+        (List::append):
+        (List::prepend):
+        (List::appendList):
+        (List::prependList):
+        (List::removeFirst):
+        (List::removeLast):
+        (List::remove):
+        (List::clear):
+        (List::copy):
+        (List::begin):
+        (List::end):
+        (List::isEmpty):
+        (List::size):
+        (List::at):
+        (List::operator[]):
+        * kjs/types.h:
+
+2002-11-18  Maciej Stachowiak  <mjs at apple.com>
+
 	Partway to removing Value from List. Created a marking List
 	variant, used it in place of ListImp.
 	
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index 2beb583..952765f 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,5 +1,32 @@
 2002-11-18  Maciej Stachowiak  <mjs at apple.com>
 
+	Another step towards the List conversion: stop inheriting from Value.
+	
+        * kjs/types.cpp:
+        (ListIterator::ListIterator):
+        (List::List):
+        (List::operator=):
+        (List::~List):
+        (List::mark):
+        (List::append):
+        (List::prepend):
+        (List::appendList):
+        (List::prependList):
+        (List::removeFirst):
+        (List::removeLast):
+        (List::remove):
+        (List::clear):
+        (List::copy):
+        (List::begin):
+        (List::end):
+        (List::isEmpty):
+        (List::size):
+        (List::at):
+        (List::operator[]):
+        * kjs/types.h:
+
+2002-11-18  Maciej Stachowiak  <mjs at apple.com>
+
 	Partway to removing Value from List. Created a marking List
 	variant, used it in place of ListImp.
 	
diff --git a/JavaScriptCore/kjs/types.cpp b/JavaScriptCore/kjs/types.cpp
index 7bd197e..a658ec6 100644
--- a/JavaScriptCore/kjs/types.cpp
+++ b/JavaScriptCore/kjs/types.cpp
@@ -114,7 +114,7 @@ ListIterator::ListIterator(ListNode *n) : node(n)
 }
 
 ListIterator::ListIterator(const List &l)
-  : node(static_cast<ListImp*>(l.imp())->hook->next)
+  : node(l.imp->hook->next)
 {
 }
 
@@ -169,130 +169,136 @@ bool ListIterator::operator!=(const ListIterator &it) const
 // ------------------------------ List -----------------------------------------
 
 List::List(bool needsMarking)
-  : Value(needsMarking ? ListImp::empty() : new ListImp()),
-    m_needsMarking(needsMarking)
+  : m_needsMarking(needsMarking)
 {
-  if (m_needsMarking) {
-    imp()->deref();
+  imp = m_needsMarking ? ListImp::empty() : new ListImp();
+    
+  if (!m_needsMarking) {
+    imp->ref();
   }
 }
 
 
 List::List(const List& l)
-  : Value(l),
-    m_needsMarking(false)
+  : m_needsMarking(false)
 {  
+  imp = l.imp;
+
+  if (!m_needsMarking) {
+    imp->ref();
+  }
 }
 
-List::List(ListImp *imp) 
-  : Value(imp),
-    m_needsMarking(false)
+List::List(ListImp *p_imp) 
+  : m_needsMarking(false)
 {
+  imp = p_imp;
+
+  if (!m_needsMarking) {
+    imp->ref();
+  }
 }
 
 
 List& List::operator=(const List& l)
 {
-  if (m_needsMarking) {
-    imp()->ref();
+  if (!m_needsMarking) {
+    l.imp->ref();
+    imp->deref();
   }
 
-  Value::operator=(l);
-
-  if (m_needsMarking) {
-    imp()->deref();
-  }
+  imp = l.imp;
 
   return *this;
 }
       
 List::~List()
 {
-  if (m_needsMarking) {
-    imp()->ref();
+  if (!m_needsMarking) {
+    imp->deref();
   }
 }
 
 void List::mark()
 {
-  if (!imp()->marked()) {
-    imp()->mark();
+  if (!imp->marked()) {
+    imp->mark();
   }
 }
 
 void List::append(const Value& val)
 {
-  static_cast<ListImp*>(rep)->append(val);
+  imp->append(val);
 }
 
 void List::prepend(const Value& val)
 {
-  static_cast<ListImp*>(rep)->prepend(val);
+  imp->prepend(val);
 }
 
 void List::appendList(const List& lst)
 {
-  static_cast<ListImp*>(rep)->appendList(lst);
+  imp->appendList(lst);
 }
 
 void List::prependList(const List& lst)
 {
-  static_cast<ListImp*>(rep)->prependList(lst);
+  imp->prependList(lst);
 }
 
 void List::removeFirst()
 {
-  static_cast<ListImp*>(rep)->removeFirst();
+  imp->removeFirst();
 }
 
 void List::removeLast()
 {
-  static_cast<ListImp*>(rep)->removeLast();
+  imp->removeLast();
 }
 
 void List::remove(const Value &val)
 {
-  static_cast<ListImp*>(rep)->remove(val);
+  imp->remove(val);
 }
 
 void List::clear()
 {
-  static_cast<ListImp*>(rep)->clear();
+  imp->clear();
 }
 
 List List::copy() const
 {
-  return static_cast<ListImp*>(rep)->copy();
+  return imp->copy();
 }
 
 ListIterator List::begin() const
 {
-  return static_cast<ListImp*>(rep)->begin();
+  return imp->begin();
 }
 
 ListIterator List::end() const
 {
-  return static_cast<ListImp*>(rep)->end();
+  return imp->end();
 }
 
 bool List::isEmpty() const
 {
-  return static_cast<ListImp*>(rep)->isEmpty();
+  return imp->isEmpty();
 }
 
 int List::size() const
 {
-  return static_cast<ListImp*>(rep)->size();
+  return imp->size();
 }
 
 Value List::at(int i) const
 {
-  return static_cast<ListImp*>(rep)->at(i);
+  return imp->at(i);
 }
 
 Value List::operator[](int i) const
 {
-  return static_cast<ListImp*>(rep)->at(i);
+  return imp->at(i);
 }
 
 const List List::empty()
diff --git a/JavaScriptCore/kjs/types.h b/JavaScriptCore/kjs/types.h
index 60a04a7..1e82b66 100644
--- a/JavaScriptCore/kjs/types.h
+++ b/JavaScriptCore/kjs/types.h
@@ -104,7 +104,7 @@ namespace KJS {
    * The list is explicitly shared. Note that while copy() returns a
    * copy of the list the referenced objects are still shared.
    */
-  class List : private Value {
+  class List {
     friend class ListIterator;
   public:
     List(bool needsMarking = false);
@@ -197,8 +197,10 @@ namespace KJS {
     static void markEmptyList();
   private:
     List(ListImp *);
-    ListImp *imp() const { return (ListImp *)Value::imp(); }
+
+    ListImp *imp;
     bool m_needsMarking;
+    friend class ListNode;
   };
 
 }; // namespace

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list