Changeset 34578 in webkit for trunk/JavaScriptCore/kjs/array_object.cpp
- Timestamp:
- Jun 15, 2008, 7:19:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/array_object.cpp
r34355 r34578 40 40 // ------------------------------ ArrayPrototype ---------------------------- 41 41 42 const ClassInfo ArrayPrototype::info = {"Array", & ArrayInstance::info, 0, ExecState::arrayTable};42 const ClassInfo ArrayPrototype::info = {"Array", &JSArray::info, 0, ExecState::arrayTable}; 43 43 44 44 /* Source for array_object.lut.h … … 68 68 // ECMA 15.4.4 69 69 ArrayPrototype::ArrayPrototype(ExecState*, ObjectPrototype* objProto) 70 : ArrayInstance(objProto, 0)70 : JSArray(objProto, 0) 71 71 { 72 72 } … … 74 74 bool ArrayPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 75 75 { 76 return getStaticFunctionSlot< ArrayInstance>(exec, ExecState::arrayTable(exec), this, propertyName, slot);76 return getStaticFunctionSlot<JSArray>(exec, ExecState::arrayTable(exec), this, propertyName, slot); 77 77 } 78 78 … … 91 91 JSValue* arrayProtoFuncToString(ExecState* exec, JSObject* thisObj, const List&) 92 92 { 93 if (!thisObj->inherits(& ArrayInstance::info))93 if (!thisObj->inherits(&JSArray::info)) 94 94 return throwError(exec, TypeError); 95 95 … … 134 134 JSValue* arrayProtoFuncToLocaleString(ExecState* exec, JSObject* thisObj, const List&) 135 135 { 136 if (!thisObj->inherits(& ArrayInstance::info))136 if (!thisObj->inherits(&JSArray::info)) 137 137 return throwError(exec, TypeError); 138 138 … … 233 233 List::const_iterator end = args.end(); 234 234 while (1) { 235 if (curArg->isObject() && curObj->inherits(& ArrayInstance::info)) {235 if (curArg->isObject() && curObj->inherits(&JSArray::info)) { 236 236 unsigned k = 0; 237 237 // Older versions tried to optimize out getting the length of thisObj … … 380 380 } 381 381 382 if (thisObj->classInfo() == & ArrayInstance::info) {382 if (thisObj->classInfo() == &JSArray::info) { 383 383 if (sortFunction) 384 static_cast< ArrayInstance*>(thisObj)->sort(exec, sortFunction);384 static_cast<JSArray*>(thisObj)->sort(exec, sortFunction); 385 385 else 386 static_cast< ArrayInstance*>(thisObj)->sort(exec);386 static_cast<JSArray*>(thisObj)->sort(exec); 387 387 return thisObj; 388 388 } … … 749 749 if (n != args[0]->toNumber(exec)) 750 750 return throwError(exec, RangeError, "Array size is not a small enough positive integer."); 751 return new ArrayInstance(exec->lexicalGlobalObject()->arrayPrototype(), n);751 return new JSArray(exec->lexicalGlobalObject()->arrayPrototype(), n); 752 752 } 753 753 754 754 // otherwise the array is constructed with the arguments in it 755 return new ArrayInstance(exec->lexicalGlobalObject()->arrayPrototype(), args);755 return new JSArray(exec->lexicalGlobalObject()->arrayPrototype(), args); 756 756 } 757 757
Note:
See TracChangeset
for help on using the changeset viewer.