Changeset 34754 in webkit for trunk/JavaScriptCore/kjs/internal.cpp
- Timestamp:
- Jun 23, 2008, 10:23:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.cpp
r34659 r34754 176 176 } 177 177 178 JSObject *JSNumberCell::toObject(ExecState *exec) const 179 { 180 ArgList args; 181 args.append(const_cast<JSNumberCell*>(this)); 182 return static_cast<JSObject *>(exec->lexicalGlobalObject()->numberConstructor()->construct(exec,args)); 178 JSObject* JSNumberCell::toObject(ExecState* exec) const 179 { 180 return constructNumber(exec, const_cast<JSNumberCell*>(this)); 183 181 } 184 182 185 183 JSObject* JSNumberCell::toThisObject(ExecState* exec) const 186 184 { 187 ArgList args; 188 args.append(const_cast<JSNumberCell*>(this)); 189 return static_cast<JSObject*>(exec->lexicalGlobalObject()->numberConstructor()->construct(exec, args)); 185 return constructNumber(exec, const_cast<JSNumberCell*>(this)); 190 186 } 191 187 … … 213 209 214 210 // --------------------------- GetterSetter --------------------------------- 211 215 212 void GetterSetter::mark() 216 213 { 217 214 JSCell::mark(); 218 219 if ( getter && !getter->marked())220 getter->mark();221 if ( setter && !setter->marked())222 setter->mark();215 216 if (m_getter && !m_getter->marked()) 217 m_getter->mark(); 218 if (m_setter && !m_setter->marked()) 219 m_setter->mark(); 223 220 } 224 221 225 222 JSValue* GetterSetter::toPrimitive(ExecState*, JSType) const 226 223 { 227 ASSERT (false);224 ASSERT_NOT_REACHED(); 228 225 return jsNull(); 229 226 } … … 239 236 bool GetterSetter::toBoolean(ExecState*) const 240 237 { 241 ASSERT (false);238 ASSERT_NOT_REACHED(); 242 239 return false; 243 240 } 244 241 245 double GetterSetter::toNumber(ExecState 246 { 247 ASSERT (false);242 double GetterSetter::toNumber(ExecState*) const 243 { 244 ASSERT_NOT_REACHED(); 248 245 return 0.0; 249 246 } 250 247 251 UString GetterSetter::toString(ExecState 252 { 253 ASSERT (false);248 UString GetterSetter::toString(ExecState*) const 249 { 250 ASSERT_NOT_REACHED(); 254 251 return UString::null(); 255 252 } 256 253 257 JSObject *GetterSetter::toObject(ExecState *exec) const258 { 259 ASSERT (false);254 JSObject* GetterSetter::toObject(ExecState* exec) const 255 { 256 ASSERT_NOT_REACHED(); 260 257 return jsNull()->toObject(exec); 261 }262 263 bool GetterSetter::getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&)264 {265 ASSERT_NOT_REACHED();266 return false;267 }268 269 bool GetterSetter::getOwnPropertySlot(ExecState*, unsigned, PropertySlot&)270 {271 ASSERT_NOT_REACHED();272 return false;273 }274 275 void GetterSetter::put(ExecState*, const Identifier&, JSValue*)276 {277 ASSERT_NOT_REACHED();278 }279 280 void GetterSetter::put(ExecState*, unsigned, JSValue*)281 {282 ASSERT_NOT_REACHED();283 }284 285 JSObject* GetterSetter::toThisObject(ExecState*) const286 {287 ASSERT_NOT_REACHED();288 return 0;289 258 } 290 259 … … 323 292 } 324 293 325 InternalFunction::InternalFunction(FunctionPrototype* funcProto, const Identifier& name) 326 : JSObject(funcProto) 327 , m_name(name) 328 { 329 } 330 331 CallType InternalFunction::getCallData(CallData&) 332 { 333 return CallTypeNative; 294 InternalFunction::InternalFunction(FunctionPrototype* prototype, const Identifier& name) 295 : JSObject(prototype) 296 , m_name(name) 297 { 334 298 } 335 299 336 300 bool InternalFunction::implementsHasInstance() const 337 301 { 338 return true;339 } 340 341 } 302 return true; 303 } 304 305 }
Note:
See TracChangeset
for help on using the changeset viewer.