[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 06:31:56 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 76f1b1c2028988f1cd3eda7e9773b404c00cc241
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 16 10:25:51 2002 +0000
Next step: reimplement ReferenceList from scratch, and store it as
an actual Reference object, so ReferenceList no longer depends on
Reference being a Value or having a ReferenceImp. A resizing
vector might be even better the way this is used.
Also moved Reference to its own header and implementation file in
preparation for reimplementing it.
* JavaScriptCore.pbproj/project.pbxproj:
* kjs/nodes.cpp:
(ForInNode::execute):
* kjs/reference.cpp: Added.
(Reference::Reference):
(Reference::dynamicCast):
(ConstReference::ConstReference):
* kjs/reference.h: Added.
* kjs/reference_list.cpp: Added.
(ReferenceList::ReferenceList):
(ReferenceList::operator=):
(ReferenceList::swap):
(ReferenceList::append):
(ReferenceList::~ReferenceList):
(ReferenceList::begin):
(ReferenceList::end):
(ReferenceListIterator::ReferenceListIterator):
(ReferenceListIterator::operator!=):
(ReferenceListIterator::operator->):
(ReferenceListIterator::operator++):
* kjs/reference_list.h:
* kjs/types.cpp:
* kjs/types.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index bd63ab2..f2de0b1 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,39 @@
2002-08-16 Maciej Stachowiak <mjs at apple.com>
+ Next step: reimplement ReferenceList from scratch, and store it as
+ an actual Reference object, so ReferenceList no longer depends on
+ Reference being a Value or having a ReferenceImp. A resizing
+ vector might be even better the way this is used.
+
+ Also moved Reference to its own header and implementation file in
+ preparation for reimplementing it.
+
+ * JavaScriptCore.pbproj/project.pbxproj:
+ * kjs/nodes.cpp:
+ (ForInNode::execute):
+ * kjs/reference.cpp: Added.
+ (Reference::Reference):
+ (Reference::dynamicCast):
+ (ConstReference::ConstReference):
+ * kjs/reference.h: Added.
+ * kjs/reference_list.cpp: Added.
+ (ReferenceList::ReferenceList):
+ (ReferenceList::operator=):
+ (ReferenceList::swap):
+ (ReferenceList::append):
+ (ReferenceList::~ReferenceList):
+ (ReferenceList::begin):
+ (ReferenceList::end):
+ (ReferenceListIterator::ReferenceListIterator):
+ (ReferenceListIterator::operator!=):
+ (ReferenceListIterator::operator->):
+ (ReferenceListIterator::operator++):
+ * kjs/reference_list.h:
+ * kjs/types.cpp:
+ * kjs/types.h:
+
+2002-08-16 Maciej Stachowiak <mjs at apple.com>
+
Fix Development build - some NDEBUG code had to be changed for the
Value/Reference split.
diff --git a/JavaScriptCore/ChangeLog-2002-12-03 b/JavaScriptCore/ChangeLog-2002-12-03
index bd63ab2..f2de0b1 100644
--- a/JavaScriptCore/ChangeLog-2002-12-03
+++ b/JavaScriptCore/ChangeLog-2002-12-03
@@ -1,5 +1,39 @@
2002-08-16 Maciej Stachowiak <mjs at apple.com>
+ Next step: reimplement ReferenceList from scratch, and store it as
+ an actual Reference object, so ReferenceList no longer depends on
+ Reference being a Value or having a ReferenceImp. A resizing
+ vector might be even better the way this is used.
+
+ Also moved Reference to its own header and implementation file in
+ preparation for reimplementing it.
+
+ * JavaScriptCore.pbproj/project.pbxproj:
+ * kjs/nodes.cpp:
+ (ForInNode::execute):
+ * kjs/reference.cpp: Added.
+ (Reference::Reference):
+ (Reference::dynamicCast):
+ (ConstReference::ConstReference):
+ * kjs/reference.h: Added.
+ * kjs/reference_list.cpp: Added.
+ (ReferenceList::ReferenceList):
+ (ReferenceList::operator=):
+ (ReferenceList::swap):
+ (ReferenceList::append):
+ (ReferenceList::~ReferenceList):
+ (ReferenceList::begin):
+ (ReferenceList::end):
+ (ReferenceListIterator::ReferenceListIterator):
+ (ReferenceListIterator::operator!=):
+ (ReferenceListIterator::operator->):
+ (ReferenceListIterator::operator++):
+ * kjs/reference_list.h:
+ * kjs/types.cpp:
+ * kjs/types.h:
+
+2002-08-16 Maciej Stachowiak <mjs at apple.com>
+
Fix Development build - some NDEBUG code had to be changed for the
Value/Reference split.
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index bd63ab2..f2de0b1 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,5 +1,39 @@
2002-08-16 Maciej Stachowiak <mjs at apple.com>
+ Next step: reimplement ReferenceList from scratch, and store it as
+ an actual Reference object, so ReferenceList no longer depends on
+ Reference being a Value or having a ReferenceImp. A resizing
+ vector might be even better the way this is used.
+
+ Also moved Reference to its own header and implementation file in
+ preparation for reimplementing it.
+
+ * JavaScriptCore.pbproj/project.pbxproj:
+ * kjs/nodes.cpp:
+ (ForInNode::execute):
+ * kjs/reference.cpp: Added.
+ (Reference::Reference):
+ (Reference::dynamicCast):
+ (ConstReference::ConstReference):
+ * kjs/reference.h: Added.
+ * kjs/reference_list.cpp: Added.
+ (ReferenceList::ReferenceList):
+ (ReferenceList::operator=):
+ (ReferenceList::swap):
+ (ReferenceList::append):
+ (ReferenceList::~ReferenceList):
+ (ReferenceList::begin):
+ (ReferenceList::end):
+ (ReferenceListIterator::ReferenceListIterator):
+ (ReferenceListIterator::operator!=):
+ (ReferenceListIterator::operator->):
+ (ReferenceListIterator::operator++):
+ * kjs/reference_list.h:
+ * kjs/types.cpp:
+ * kjs/types.h:
+
+2002-08-16 Maciej Stachowiak <mjs at apple.com>
+
Fix Development build - some NDEBUG code had to be changed for the
Value/Reference split.
diff --git a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
index a79be18..9b87b0e 100644
--- a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
@@ -219,6 +219,7 @@
F5C290E70284F98E018635CA,
F50888B7030BB74C012A967E,
F54F0801030CD22001B5C2EB,
+ F5341393030CEEB1018BE7F3,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -261,6 +262,8 @@
F692A8C30255597D01FF60F7,
F692A8CB02555BA201FF60F7,
F5FFE657026B47A6018635CA,
+ F5341392030CEEB1018BE7F3,
+ F5341395030CF5F8018BE7F3,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -357,10 +360,15 @@
F692A8780255597D01FF60F7,
F692A8790255597D01FF60F7,
F692A87A0255597D01FF60F7,
+ F5341390030CEEB1018BE7F3,
+ F5341391030CEEB1018BE7F3,
+ F54F0800030CD22001B5C2EB,
+ F5341394030CF5F8018BE7F3,
F692A87B0255597D01FF60F7,
F692A87C0255597D01FF60F7,
F692A87D0255597D01FF60F7,
F692A87E0255597D01FF60F7,
+ F50888B6030BB74C012A967E,
F692A87F0255597D01FF60F7,
F692A8800255597D01FF60F7,
F692A8810255597D01FF60F7,
@@ -370,8 +378,6 @@
F692A8860255597D01FF60F7,
F692A8870255597D01FF60F7,
F692A8880255597D01FF60F7,
- F50888B6030BB74C012A967E,
- F54F0800030CD22001B5C2EB,
);
isa = PBXGroup;
name = Classes;
@@ -452,6 +458,42 @@
isa = PBXBuildStyle;
name = DeploymentFat;
};
+ F5341390030CEEB1018BE7F3 = {
+ isa = PBXFileReference;
+ name = reference.cpp;
+ path = kjs/reference.cpp;
+ refType = 4;
+ };
+ F5341391030CEEB1018BE7F3 = {
+ isa = PBXFileReference;
+ name = reference.h;
+ path = kjs/reference.h;
+ refType = 4;
+ };
+ F5341392030CEEB1018BE7F3 = {
+ fileRef = F5341390030CEEB1018BE7F3;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F5341393030CEEB1018BE7F3 = {
+ fileRef = F5341391030CEEB1018BE7F3;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F5341394030CF5F8018BE7F3 = {
+ isa = PBXFileReference;
+ name = reference_list.cpp;
+ path = kjs/reference_list.cpp;
+ refType = 4;
+ };
+ F5341395030CF5F8018BE7F3 = {
+ fileRef = F5341394030CF5F8018BE7F3;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
F54F0800030CD22001B5C2EB = {
isa = PBXFileReference;
name = reference_list.h;
diff --git a/JavaScriptCore/kjs/nodes.cpp b/JavaScriptCore/kjs/nodes.cpp
index ff42b19..652802d 100644
--- a/JavaScriptCore/kjs/nodes.cpp
+++ b/JavaScriptCore/kjs/nodes.cpp
@@ -2070,7 +2070,7 @@ Completion ForInNode::execute(ExecState *exec)
ReferenceListIterator propIt = propList.begin();
while (propIt != propList.end()) {
- UString name = propIt->dispatchGetPropertyName(exec);
+ UString name = propIt->getPropertyName(exec);
if (!v.hasProperty(exec,name)) {
propIt++;
continue;
diff --git a/JavaScriptCore/kjs/simple_number.h b/JavaScriptCore/kjs/reference.cpp
similarity index 50%
copy from JavaScriptCore/kjs/simple_number.h
copy to JavaScriptCore/kjs/reference.cpp
index 766b093..c9dac90 100644
--- a/JavaScriptCore/kjs/simple_number.h
+++ b/JavaScriptCore/kjs/reference.cpp
@@ -20,29 +20,42 @@
*
*/
-#ifndef _KJS_SIMPLE_NUMBER_H_
-#define _KJS_SIMPLE_NUMBER_H_
+#include "reference.h"
+#include "internal.h"
-#include <limits.h>
-#include <math.h>
+using namespace KJS;
-namespace KJS {
- class ValueImp;
+// ------------------------------ Reference ------------------------------------
- class SimpleNumber {
- public:
- enum { tag = 1, shift = 2, mask = (1 << shift) - 1, max = (1 << (31 - shift)) - 1, min = -max - 1 };
+Reference::Reference(const Object& b, const UString& p)
+ : Value(new ReferenceImp(b,p))
+{
+}
+
+Reference::Reference(const Object& b, unsigned p)
+ : Value(new ReferenceImp(b,p))
+{
+}
+
+Reference::Reference(const Null& b, const UString& p)
+ : Value(new ReferenceImp(b,p))
+{
+}
+
+Reference::Reference(const Null& b, unsigned p)
+ : Value(new ReferenceImp(b,p))
+{
+}
- static inline bool is(const ValueImp *imp) { return ((int)imp & mask) == tag; }
- static inline int value(const ValueImp *imp) { return (int)imp / (1 << shift); }
+Reference Reference::dynamicCast(const Value &v)
+{
+ if (v.isNull() || v.type() != ReferenceType)
+ return 0;
- static inline bool fits(int i) { return i <= max && i >= min; }
- static inline bool fits(unsigned i) { return i <= (unsigned)max; }
- static inline bool fits(long i) { return i <= max && i >= min; }
- static inline bool fits(unsigned long i) { return i <= (unsigned)max; }
- static inline bool fits(double d) { return d <= max && d >= min && remainder(d, 1) == 0; }
- static inline ValueImp *make(int i) { return (ValueImp *)((i << shift) | tag); }
- };
+ return static_cast<ReferenceImp*>(v.imp());
}
-#endif
+ConstReference::ConstReference(ValueImp *v) :
+ Reference((ReferenceImp *)v)
+{
+}
diff --git a/JavaScriptCore/kjs/reference.h b/JavaScriptCore/kjs/reference.h
new file mode 100644
index 0000000..47e99dd
--- /dev/null
+++ b/JavaScriptCore/kjs/reference.h
@@ -0,0 +1,86 @@
+// -*- c-basic-offset: 2 -*-
+/*
+ * This file is part of the KDE libraries
+ * Copyright (C) 2002 Apple Computer, Inc
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef _KJS_REFERENCE_H_
+#define _KJS_REFERENCE_H_
+
+#include "value.h"
+
+namespace KJS {
+
+ class Reference : private Value {
+ friend class ReferenceList;
+ friend class ReferenceListIterator;
+ public:
+ Reference(const Object& b, const UString& p);
+ Reference(const Object& b, unsigned p);
+ Reference(const Null& b, const UString& p);
+ Reference(const Null& b, unsigned p);
+ Reference(ReferenceImp *v);
+
+ /**
+ * Converts a Value into an Reference. If the value's type is not
+ * ReferenceType, a null object will be returned (i.e. one with it's
+ * internal pointer set to 0). If you do not know for sure whether the
+ * value is of type ReferenceType, you should check the @ref isNull()
+ * methods afterwards before calling any methods on the returned value.
+ *
+ * @return The value converted to an Reference
+ */
+ static Reference dynamicCast(const Value &v);
+
+ /**
+ * Performs the GetBase type conversion operation on this value (ECMA 8.7)
+ *
+ * Since references are supposed to have an Object or null as their base,
+ * this method is guaranteed to return either Null() or an Object value.
+ */
+ Value getBase(ExecState *exec) const { return rep->dispatchGetBase(exec); }
+
+ /**
+ * Performs the GetPropertyName type conversion operation on this value
+ * (ECMA 8.7)
+ */
+ UString getPropertyName(ExecState *exec) const { return rep->dispatchGetPropertyName(exec); }
+
+ /**
+ * Performs the GetValue type conversion operation on this value
+ * (ECMA 8.7.1)
+ */
+ Value getValue(ExecState *exec) const { return rep->dispatchGetValue(exec); }
+
+ /**
+ * Performs the PutValue type conversion operation on this value
+ * (ECMA 8.7.1)
+ */
+ void putValue(ExecState *exec, const Value &w) { rep->dispatchPutValue(exec, w); }
+ bool deleteValue(ExecState *exec) { return rep->dispatchDeleteValue(exec); }
+ bool isMutable() { return type() == ReferenceType; }
+ };
+
+ class ConstReference : public Reference {
+ public:
+ ConstReference(ValueImp *v);
+ };
+}
+
+#endif
diff --git a/JavaScriptCore/kjs/reference_list.cpp b/JavaScriptCore/kjs/reference_list.cpp
new file mode 100644
index 0000000..655644a
--- /dev/null
+++ b/JavaScriptCore/kjs/reference_list.cpp
@@ -0,0 +1,147 @@
+// -*- c-basic-offset: 2 -*-
+/*
+ * This file is part of the KDE libraries
+ * Copyright (C) 2002 Apple Computer, Inc
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "reference_list.h"
+
+namespace KJS {
+ class ReferenceListNode {
+ friend class ReferenceList;
+ friend class ReferenceListIterator;
+
+ protected:
+ ReferenceListNode(const Reference &ref) : reference(ref), next(NULL) {}
+
+ private:
+ Reference reference;
+ ReferenceListNode *next;
+ };
+
+ class ReferenceListHeadNode : ReferenceListNode {
+ friend class ReferenceList;
+ friend class ReferenceListIterator;
+
+ ReferenceListHeadNode(const Reference &ref) : ReferenceListNode(ref), refcount(1) {}
+ int refcount;
+ };
+
+}
+
+using namespace KJS;
+
+// ReferenceList
+
+ReferenceList::ReferenceList() :
+ head(NULL),
+ tail(NULL)
+{
+}
+
+ReferenceList::ReferenceList(const ReferenceList &list)
+{
+ head = list.head;
+ tail = list.tail;
+ if (head != NULL) {
+ head->refcount++;
+ }
+}
+
+ReferenceList &ReferenceList::operator=(const ReferenceList &list)
+{
+ ReferenceList tmp(list);
+ tmp.swap(*this);
+
+ return *this;
+}
+
+void ReferenceList::swap(ReferenceList &list)
+{
+ ReferenceListHeadNode *tmpHead = list.head;
+ list.head = head;
+ head = tmpHead;
+
+ ReferenceListNode *tmpTail = list.tail;
+ list.tail = tail;
+ tail = tmpTail;
+}
+
+
+void ReferenceList::append(const Reference& ref)
+{
+ if (tail == NULL) {
+ tail = head = new ReferenceListHeadNode(ref);
+ } else {
+ tail->next = new ReferenceListNode(ref);
+ tail = tail->next;
+ }
+}
+
+ReferenceList::~ReferenceList()
+{
+ if (head != NULL && --(head->refcount) == 0) {
+ ReferenceListNode *next;
+
+ for (ReferenceListNode *p = head; p != NULL; p = next) {
+ next = p->next;
+ if (p == head) {
+ delete (ReferenceListHeadNode *)p;
+ } else {
+ delete p;
+ }
+ }
+ }
+}
+
+ReferenceListIterator ReferenceList::begin() const
+{
+ return ReferenceListIterator(head);
+}
+
+ReferenceListIterator ReferenceList::end() const
+{
+ return ReferenceListIterator(NULL);
+}
+
+
+// ReferenceListIterator
+
+
+ReferenceListIterator::ReferenceListIterator(ReferenceListNode *n) :
+ node(n)
+{
+}
+
+bool ReferenceListIterator::operator!=(const ReferenceListIterator &it) const
+{
+ return node != it.node;
+}
+
+const Reference *ReferenceListIterator::operator->() const
+{
+ return &node->reference;
+}
+
+const Reference &ReferenceListIterator::operator++(int i)
+{
+ const Reference &ref = node->reference;
+ node = node->next;
+ return ref;
+}
diff --git a/JavaScriptCore/kjs/reference_list.h b/JavaScriptCore/kjs/reference_list.h
index ce5bf74..4f4982a 100644
--- a/JavaScriptCore/kjs/reference_list.h
+++ b/JavaScriptCore/kjs/reference_list.h
@@ -1,8 +1,7 @@
// -*- c-basic-offset: 2 -*-
/*
* This file is part of the KDE libraries
- * Copyright (C) 1999-2001 Harri Porten (porten at kde.org)
- * Copyright (C) 2001 Peter Kelly (pmk at post.com)
+ * Copyright (C) 2002 Apple Computer, Inc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -25,31 +24,45 @@
#define _KJS_REFERENCE_LIST_H_
#include <types.h>
+#include <reference.h>
namespace KJS {
+ class ReferenceListNode;
+ class ReferenceListHeadNode;
-class ReferenceListIterator : private ListIterator {
- friend class ReferenceList;
- public:
-
- bool operator!=(const ReferenceListIterator &it) const { return this->ListIterator::operator!=(it); }
- ReferenceImp* operator->() const { return (ReferenceImp *)ListIterator::operator->(); }
- Reference operator++(int i) { return Reference((ReferenceImp *)ListIterator::operator++(i).imp()); }
-
- private:
- ReferenceListIterator(const ListIterator& it) : ListIterator(it) { }
-};
-
-class ReferenceList : private List {
- public:
- void ReferenceList::append(const Reference& val) { List::append(val); }
-
- ReferenceListIterator begin() const { return List::begin(); }
- ReferenceListIterator end() const { return List::end(); }
-
-};
+ class ReferenceListIterator {
+ friend class ReferenceList;
+
+ public:
+ bool operator!=(const ReferenceListIterator &it) const;
+ const Reference *operator->() const;
+ const Reference &operator++(int i);
+
+ private:
+ ReferenceListIterator(ReferenceListNode *n);
+ ReferenceListIterator();
+ ReferenceListNode *node;
+ };
+
+ class ReferenceList {
+ public:
+ ReferenceList();
+ ReferenceList(const ReferenceList &list);
+ ReferenceList &operator=(const ReferenceList &list);
+ ~ReferenceList();
+ void append(const Reference& val);
+
+ ReferenceListIterator begin() const;
+ ReferenceListIterator end() const;
+
+ private:
+ void swap(ReferenceList &list);
+ ReferenceListHeadNode *head;
+ ReferenceListNode *tail;
+ };
+
}
#endif
diff --git a/JavaScriptCore/kjs/types.cpp b/JavaScriptCore/kjs/types.cpp
index 4b69202..acaca92 100644
--- a/JavaScriptCore/kjs/types.cpp
+++ b/JavaScriptCore/kjs/types.cpp
@@ -38,41 +38,6 @@
using namespace KJS;
-// ------------------------------ Reference ------------------------------------
-
-Reference::Reference(const Object& b, const UString& p)
- : Value(new ReferenceImp(b,p))
-{
-}
-
-Reference::Reference(const Object& b, unsigned p)
- : Value(new ReferenceImp(b,p))
-{
-}
-
-Reference::Reference(const Null& b, const UString& p)
- : Value(new ReferenceImp(b,p))
-{
-}
-
-Reference::Reference(const Null& b, unsigned p)
- : Value(new ReferenceImp(b,p))
-{
-}
-
-Reference Reference::dynamicCast(const Value &v)
-{
- if (v.isNull() || v.type() != ReferenceType)
- return 0;
-
- return static_cast<ReferenceImp*>(v.imp());
-}
-
-ConstReference::ConstReference(ValueImp *v) :
- Reference((ReferenceImp *)v)
-{
-}
-
// ------------------------------ ListIterator ---------------------------------
//d dont add ListIterator();
diff --git a/JavaScriptCore/kjs/types.h b/JavaScriptCore/kjs/types.h
index 2357d82..cf93897 100644
--- a/JavaScriptCore/kjs/types.h
+++ b/JavaScriptCore/kjs/types.h
@@ -30,63 +30,6 @@
namespace KJS {
- class ReferenceList;
-
- class Reference : private Value {
- friend class ReferenceList;
- friend class ReferenceListIterator;
- public:
- Reference(const Object& b, const UString& p);
- Reference(const Object& b, unsigned p);
- Reference(const Null& b, const UString& p);
- Reference(const Null& b, unsigned p);
- Reference(ReferenceImp *v);
-
- /**
- * Converts a Value into an Reference. If the value's type is not
- * ReferenceType, a null object will be returned (i.e. one with it's
- * internal pointer set to 0). If you do not know for sure whether the
- * value is of type ReferenceType, you should check the @ref isNull()
- * methods afterwards before calling any methods on the returned value.
- *
- * @return The value converted to an Reference
- */
- static Reference dynamicCast(const Value &v);
-
- /**
- * Performs the GetBase type conversion operation on this value (ECMA 8.7)
- *
- * Since references are supposed to have an Object or null as their base,
- * this method is guaranteed to return either Null() or an Object value.
- */
- Value getBase(ExecState *exec) const { return rep->dispatchGetBase(exec); }
-
- /**
- * Performs the GetPropertyName type conversion operation on this value
- * (ECMA 8.7)
- */
- UString getPropertyName(ExecState *exec) const { return rep->dispatchGetPropertyName(exec); }
-
- /**
- * Performs the GetValue type conversion operation on this value
- * (ECMA 8.7.1)
- */
- Value getValue(ExecState *exec) const { return rep->dispatchGetValue(exec); }
-
- /**
- * Performs the PutValue type conversion operation on this value
- * (ECMA 8.7.1)
- */
- void putValue(ExecState *exec, const Value &w) { rep->dispatchPutValue(exec, w); }
- bool deleteValue(ExecState *exec) { return rep->dispatchDeleteValue(exec); }
- bool isMutable() { return type() == ReferenceType; }
- };
-
- class ConstReference : public Reference {
- public:
- ConstReference(ValueImp *v);
- };
-
class List;
class ListIterator;
class ListNode;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list