Changeset 2760 in webkit for trunk/JavaScriptCore/kjs/object.cpp
- Timestamp:
- Nov 19, 2002, 2:02:26 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/object.cpp
r2753 r2760 41 41 namespace KJS { 42 42 43 extern const UStringargumentsPropertyName("arguments");44 extern const UStringlengthPropertyName("length");45 extern const UStringprototypePropertyName("prototype");46 extern const UStringspecialPrototypePropertyName("__proto__");47 extern const UStringtoStringPropertyName("toString");48 extern const UStringvalueOfPropertyName("valueOf");43 extern const Identifier argumentsPropertyName("arguments"); 44 extern const Identifier lengthPropertyName("length"); 45 extern const Identifier prototypePropertyName("prototype"); 46 extern const Identifier specialPrototypePropertyName("__proto__"); 47 extern const Identifier toStringPropertyName("toString"); 48 extern const Identifier valueOfPropertyName("valueOf"); 49 49 50 50 // ------------------------------ Object --------------------------------------- … … 138 138 } 139 139 140 Value ObjectImp::get(ExecState *exec, const UString&propertyName) const140 Value ObjectImp::get(ExecState *exec, const Identifier &propertyName) const 141 141 { 142 142 ValueImp *imp = getDirect(propertyName); … … 157 157 Value ObjectImp::get(ExecState *exec, unsigned propertyName) const 158 158 { 159 return get(exec, UString::from(propertyName));159 return get(exec, Identifier::from(propertyName)); 160 160 } 161 161 … … 164 164 // This is used e.g. by lookupOrCreateFunction (to cache a function, we don't want 165 165 // to look up in the prototype, it might already exist there) 166 ValueImp* ObjectImp::getDirect(const UString& propertyName) const166 ValueImp* ObjectImp::getDirect(const Identifier& propertyName) const 167 167 { 168 168 return _prop.get(propertyName); … … 170 170 171 171 // ECMA 8.6.2.2 172 void ObjectImp::put(ExecState *exec, const UString&propertyName,172 void ObjectImp::put(ExecState *exec, const Identifier &propertyName, 173 173 const Value &value, int attr) 174 174 { … … 200 200 const Value &value, int attr) 201 201 { 202 put(exec, UString::from(propertyName), value, attr);202 put(exec, Identifier::from(propertyName), value, attr); 203 203 } 204 204 205 205 // ECMA 8.6.2.3 206 bool ObjectImp::canPut(ExecState *, const UString&propertyName) const206 bool ObjectImp::canPut(ExecState *, const Identifier &propertyName) const 207 207 { 208 208 int attributes; … … 222 222 223 223 // ECMA 8.6.2.4 224 bool ObjectImp::hasProperty(ExecState *exec, const UString&propertyName) const224 bool ObjectImp::hasProperty(ExecState *exec, const Identifier &propertyName) const 225 225 { 226 226 if (_prop.get(propertyName)) … … 242 242 bool ObjectImp::hasProperty(ExecState *exec, unsigned propertyName) const 243 243 { 244 return hasProperty(exec, UString::from(propertyName));244 return hasProperty(exec, Identifier::from(propertyName)); 245 245 } 246 246 247 247 // ECMA 8.6.2.5 248 bool ObjectImp::deleteProperty(ExecState */*exec*/, const UString&propertyName)248 bool ObjectImp::deleteProperty(ExecState */*exec*/, const Identifier &propertyName) 249 249 { 250 250 int attributes; … … 266 266 bool ObjectImp::deleteProperty(ExecState *exec, unsigned propertyName) 267 267 { 268 return deleteProperty(exec, UString::from(propertyName));268 return deleteProperty(exec, Identifier::from(propertyName)); 269 269 } 270 270 … … 329 329 } 330 330 331 const HashEntry* ObjectImp::findPropertyHashEntry( const UString& propertyName ) const331 const HashEntry* ObjectImp::findPropertyHashEntry( const Identifier& propertyName ) const 332 332 { 333 333 const ClassInfo *info = classInfo();
Note:
See TracChangeset
for help on using the changeset viewer.