Changeset 2741 in webkit for trunk/JavaScriptCore/kjs/internal.h
- Timestamp:
- Nov 18, 2002, 5:01:16 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.h
r2256 r2741 139 139 inline Number::Number(NumberImp *imp) : Value(imp) { } 140 140 141 // ---------------------------------------------------------------------------142 // Internal type impls143 // ---------------------------------------------------------------------------144 145 /**146 * @internal147 */148 class ListNode {149 friend class List;150 friend class ListImp;151 friend class ListIterator;152 ListNode(Value val, ListNode *p, ListNode *n)153 : member(val.imp()), prev(p), next(n) {};154 ValueImp *member;155 ListNode *prev, *next;156 };157 158 class ListImp : public ValueImp {159 friend class ListIterator;160 friend class List;161 friend class InterpreterImp;162 friend class ObjectImp;163 private:164 ListImp();165 ~ListImp();166 167 Type type() const { return ListType; }168 169 virtual void mark();170 171 Value toPrimitive(ExecState *exec, Type preferred = UnspecifiedType) const;172 bool toBoolean(ExecState *exec) const;173 double toNumber(ExecState *exec) const;174 UString toString(ExecState *exec) const;175 Object toObject(ExecState *exec) const;176 177 void append(const Value& val);178 void prepend(const Value& val);179 void appendList(const List& lst);180 void prependList(const List& lst);181 void removeFirst();182 void removeLast();183 void remove(const Value &val);184 void clear();185 ListImp *copy() const;186 ListIterator begin() const { return ListIterator(hook->next); }187 ListIterator end() const { return ListIterator(hook); }188 // bool isEmpty() const { return (hook->prev == hook); }189 bool isEmpty() const;190 int size() const;191 Value at(int i) const;192 Value operator[](int i) const { return at(i); }193 static ListImp* empty();194 195 #ifdef KJS_DEBUG_MEM196 static int count;197 #endif198 private:199 void erase(ListNode *n);200 ListNode *hook;201 static ListImp *emptyList;202 };203 204 inline List::List(ListImp *imp) : Value(imp) { }205 206 141 /** 207 142 * @short The "label set" in Ecma-262 spec
Note:
See TracChangeset
for help on using the changeset viewer.