Changeset 2256 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 4, 2002, 8:31:11 PM (23 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.h
r1859 r2256 160 160 friend class List; 161 161 friend class InterpreterImp; 162 public: 162 friend class ObjectImp; 163 private: 163 164 ListImp(); 164 165 ~ListImp(); -
trunk/JavaScriptCore/kjs/interpreter.cpp
r1623 r2256 310 310 ; 311 311 312 fprintf(stderr,"ListImp::count = %d\n", KJS::ListImp::count);313 312 Node::finalCheck(); 314 313 Collector::finalCheck(); -
trunk/JavaScriptCore/kjs/types.cpp
r1859 r2256 108 108 } 109 109 110 List List::dynamicCast(const Value &v)111 {112 if (v.isNull() || v.type() != ListType)113 return 0;114 115 return static_cast<ListImp*>(v.imp());116 }117 118 110 void List::append(const Value& val) 119 111 { -
trunk/JavaScriptCore/kjs/types.h
r1977 r2256 102 102 * as properties of objects. 103 103 * 104 * The list is explicitly shared. Note that while copy() returns a deep104 * The list is explicitly shared. Note that while copy() returns a 105 105 * copy of the list the referenced objects are still shared. 106 106 */ … … 109 109 public: 110 110 List(); 111 List(ListImp *); 112 113 /** 114 * Converts a Value into an List. If the value's type is not 115 * ListType, a null object will be returned (i.e. one with it's 116 * internal pointer set to 0). If you do not know for sure whether the 117 * value is of type List, you should check the @ref isNull() 118 * methods afterwards before calling any methods on the returned value. 119 * 120 * @return The value converted to an List 121 */ 122 static List dynamicCast(const Value &v); 111 123 112 /** 124 113 * Append an object to the end of the list. … … 159 148 void clear(); 160 149 /** 161 * Returns a deepcopy of the list. Ownership is passed to the user150 * Returns a shallow copy of the list. Ownership is passed to the user 162 151 * who is responsible for deleting the list then. 163 152 */ … … 193 182 Value operator[](int i) const; 194 183 195 ListImp *imp() const { return (ListImp *)Value::imp(); }196 197 184 /** 198 185 * Returns a pointer to a static instance of an empty list. Useful if a … … 203 190 static void globalClear(); 204 191 #endif 192 193 private: 194 List(ListImp *); 195 ListImp *imp() const { return (ListImp *)Value::imp(); } 196 friend class ObjectImp; 205 197 }; 206 198
Note:
See TracChangeset
for help on using the changeset viewer.