Changeset 4191 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Apr 25, 2003, 3:47:05 PM (22 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r3745 r4191 222 222 Value ResolveNode::evaluate(ExecState *exec) 223 223 { 224 return evaluateReference(exec).getValue(exec); 224 // This is the same as calling evaluateReference(exec).getValue(exec), 225 // only considerably faster. 226 227 ScopeChain chain = exec->context().imp()->scopeChain(); 228 229 while (!chain.isEmpty()) { 230 ObjectImp *o = chain.top(); 231 Value result = o->get(exec, ident); 232 if (result.type() != UndefinedType) 233 return result; 234 chain.pop(); 235 } 236 237 return Reference(Null(), ident).getValue(exec); 225 238 } 226 239 -
trunk/JavaScriptCore/kjs/object.cpp
r3373 r4191 140 140 { 141 141 ValueImp *imp = getDirect(propertyName); 142 if ( imp)142 if (imp) 143 143 return Value(imp); 144 145 Object proto = Object::dynamicCast(prototype());146 if (proto.isNull())147 return Undefined();148 144 149 145 // non-standard netscape extension 150 146 if (propertyName == specialPrototypePropertyName) 151 return proto; 152 153 return proto.get(exec,propertyName); 147 return Value(_proto); 148 149 if (_proto->dispatchType() != ObjectType) 150 return Undefined(); 151 152 return static_cast<ObjectImp *>(_proto)->get(exec, propertyName); 154 153 } 155 154 … … 224 223 return true; 225 224 225 if (_proto->dispatchType() != ObjectType) 226 return false; 227 226 228 // Look in the prototype 227 Object proto = Object::dynamicCast(prototype()); 228 return !proto.isNull() && proto.hasProperty(exec,propertyName); 229 return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName); 229 230 } 230 231
Note:
See TracChangeset
for help on using the changeset viewer.