Changeset 2753 in webkit for trunk/JavaScriptCore/kjs/object.cpp
- Timestamp:
- Nov 18, 2002, 11:57:11 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/object.cpp
r2741 r2753 38 38 #include "error_object.h" 39 39 #include "nodes.h" 40 #include "property_map.h"41 40 42 41 namespace KJS { … … 62 61 63 62 ObjectImp::ObjectImp(const Object &proto) 64 : _pro p(0), _proto(static_cast<ObjectImp*>(proto.imp())), _internalValue(0L), _scope(true)63 : _proto(static_cast<ObjectImp*>(proto.imp())), _internalValue(0L), _scope(true) 65 64 { 66 65 //fprintf(stderr,"ObjectImp::ObjectImp %p\n",(void*)this); 67 _prop = new PropertyMap();68 66 } 69 67 … … 72 70 { 73 71 //fprintf(stderr,"ObjectImp::ObjectImp %p\n",(void*)this); 74 _prop = 0;75 72 _proto = NullImp::staticNull; 76 73 _internalValue = 0L; 77 _prop = new PropertyMap();78 74 } 79 75 … … 81 77 { 82 78 //fprintf(stderr,"ObjectImp::~ObjectImp %p\n",(void*)this); 83 delete _prop;84 79 } 85 80 … … 92 87 _proto->mark(); 93 88 94 _prop ->mark();89 _prop.mark(); 95 90 96 91 if (_internalValue && !_internalValue->marked()) … … 171 166 ValueImp* ObjectImp::getDirect(const UString& propertyName) const 172 167 { 173 return _prop ->get(propertyName);168 return _prop.get(propertyName); 174 169 } 175 170 … … 199 194 } 200 195 201 _prop ->put(propertyName,value.imp(),attr);196 _prop.put(propertyName,value.imp(),attr); 202 197 } 203 198 … … 212 207 { 213 208 int attributes; 214 ValueImp *v = _prop ->get(propertyName, attributes);209 ValueImp *v = _prop.get(propertyName, attributes); 215 210 if (v) 216 211 return!(attributes & ReadOnly); … … 229 224 bool ObjectImp::hasProperty(ExecState *exec, const UString &propertyName) const 230 225 { 231 if (_prop ->get(propertyName))226 if (_prop.get(propertyName)) 232 227 return true; 233 228 … … 254 249 { 255 250 int attributes; 256 ValueImp *v = _prop ->get(propertyName, attributes);251 ValueImp *v = _prop.get(propertyName, attributes); 257 252 if (v) { 258 253 if ((attributes & DontDelete)) 259 254 return false; 260 _prop ->remove(propertyName);255 _prop.remove(propertyName); 261 256 return true; 262 257 } … … 276 271 void ObjectImp::deleteAllProperties( ExecState * ) 277 272 { 278 _prop ->clear();273 _prop.clear(); 279 274 } 280 275 … … 397 392 list = static_cast<ObjectImp*>(_proto)->propList(exec,recursive); 398 393 399 _prop ->addEnumerablesToReferenceList(list, Object(this));394 _prop.addEnumerablesToReferenceList(list, Object(this)); 400 395 401 396 // Add properties from the static hashtable of properties
Note:
See TracChangeset
for help on using the changeset viewer.