Changeset 1850 in webkit for trunk/JavaScriptCore/kjs/value.cpp
- Timestamp:
- Aug 16, 2002, 12:07:48 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/value.cpp
r1832 r1850 141 141 } 142 142 143 // ECMA 8.7.1144 Value ValueImp::getBase(ExecState *exec) const145 {146 Object err = Error::create(exec, ReferenceError, I18N_NOOP("Invalid reference base"));147 exec->setException(err);148 return err;149 }150 151 // ECMA 8.7.2152 UString ValueImp::getPropertyName(ExecState * /*exec*/) const153 {154 // the spec wants a runtime error here. But getValue() and putValue()155 // will catch this case on their own earlier. When returning a Null156 // string we should be on the safe side.157 return UString();158 }159 160 // ECMA 8.7.1161 Value ValueImp::getValue(ExecState *exec) const162 {163 return Value(const_cast<ValueImp*>(this));164 }165 166 void ValueImp::putValue(ExecState *exec, const Value& w)167 {168 Object err = Error::create(exec,ReferenceError);169 exec->setException(err);170 }171 172 bool ValueImp::deleteValue(ExecState *exec)173 {174 Object err = Error::create(exec,ReferenceError);175 exec->setException(err);176 return false;177 }178 179 143 // Dispatchers for virtual functions, to special-case simple numbers which 180 144 // won't be real pointers. … … 234 198 } 235 199 236 Value ValueImp::dispatchGetBase(ExecState *exec) const237 {238 if (SimpleNumber::is(this))239 return ValueImp::getBase(exec);240 return getBase(exec);241 }242 243 UString ValueImp::dispatchGetPropertyName(ExecState *exec) const244 {245 if (SimpleNumber::is(this))246 return ValueImp::getPropertyName(exec);247 return getPropertyName(exec);248 }249 250 void ValueImp::dispatchPutValue(ExecState *exec, const Value& w)251 {252 if (SimpleNumber::is(this))253 ValueImp::putValue(exec, w);254 putValue(exec, w);255 }256 257 bool ValueImp::dispatchDeleteValue(ExecState *exec)258 {259 if (SimpleNumber::is(this))260 return ValueImp::deleteValue(exec);261 return deleteValue(exec);262 }263 264 265 200 // ------------------------------ Value ---------------------------------------- 266 201
Note:
See TracChangeset
for help on using the changeset viewer.