Changeset 11527 in webkit for trunk/JavaScriptCore/bindings/runtime_array.cpp
- Timestamp:
- Dec 10, 2005, 6:06:17 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bindings/runtime_array.cpp
r11525 r11527 31 31 using namespace KJS; 32 32 33 const ClassInfo RuntimeArray Imp::info = {"RuntimeArray", &ArrayInstanceImp::info, 0, 0};33 const ClassInfo RuntimeArray::info = {"RuntimeArray", &ArrayInstance::info, 0, 0}; 34 34 35 RuntimeArray Imp::RuntimeArrayImp(ExecState *exec, Bindings::Array *a)36 : ArrayInstance Imp(exec->lexicalInterpreter()->builtinArrayPrototype(), a->getLength())35 RuntimeArray::RuntimeArray(ExecState *exec, Bindings::Array *a) 36 : ArrayInstance(exec->lexicalInterpreter()->builtinArrayPrototype(), a->getLength()) 37 37 { 38 38 // Always takes ownership of concrete array. … … 40 40 } 41 41 42 RuntimeArray Imp::~RuntimeArrayImp()42 RuntimeArray::~RuntimeArray() 43 43 { 44 44 delete _array; 45 45 } 46 46 47 ValueImp *RuntimeArrayImp::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)47 JSValue *RuntimeArray::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot) 48 48 { 49 RuntimeArray Imp *thisObj = static_cast<RuntimeArrayImp*>(slot.slotBase());49 RuntimeArray *thisObj = static_cast<RuntimeArray *>(slot.slotBase()); 50 50 return jsNumber(thisObj->getLength()); 51 51 } 52 52 53 ValueImp *RuntimeArrayImp::indexGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)53 JSValue *RuntimeArray::indexGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot) 54 54 { 55 RuntimeArray Imp *thisObj = static_cast<RuntimeArrayImp*>(slot.slotBase());55 RuntimeArray *thisObj = static_cast<RuntimeArray *>(slot.slotBase()); 56 56 return thisObj->getConcreteArray()->valueAt(exec, slot.index()); 57 57 } 58 58 59 bool RuntimeArray Imp::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)59 bool RuntimeArray::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot) 60 60 { 61 61 if (propertyName == lengthPropertyName) { … … 73 73 } 74 74 75 return ArrayInstance Imp::getOwnPropertySlot(exec, propertyName, slot);75 return ArrayInstance::getOwnPropertySlot(exec, propertyName, slot); 76 76 } 77 77 78 bool RuntimeArray Imp::getOwnPropertySlot(ExecState *exec, unsigned index, PropertySlot& slot)78 bool RuntimeArray::getOwnPropertySlot(ExecState *exec, unsigned index, PropertySlot& slot) 79 79 { 80 80 if (index < getLength()) { … … 83 83 } 84 84 85 return ArrayInstance Imp::getOwnPropertySlot(exec, index, slot);85 return ArrayInstance::getOwnPropertySlot(exec, index, slot); 86 86 } 87 87 88 void RuntimeArray Imp::put(ExecState *exec, const Identifier &propertyName, ValueImp*value, int attr)88 void RuntimeArray::put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr) 89 89 { 90 90 if (propertyName == lengthPropertyName) { … … 100 100 } 101 101 102 ObjectImp::put(exec, propertyName, value, attr);102 JSObject::put(exec, propertyName, value, attr); 103 103 } 104 104 105 void RuntimeArray Imp::put(ExecState *exec, unsigned index, ValueImp*value, int attr)105 void RuntimeArray::put(ExecState *exec, unsigned index, JSValue *value, int attr) 106 106 { 107 107 if (index >= getLength()) { … … 113 113 } 114 114 115 bool RuntimeArray Imp::deleteProperty(ExecState *exec, const Identifier &propertyName)115 bool RuntimeArray::deleteProperty(ExecState *exec, const Identifier &propertyName) 116 116 { 117 117 return false; 118 118 } 119 119 120 bool RuntimeArray Imp::deleteProperty(ExecState *exec, unsigned index)120 bool RuntimeArray::deleteProperty(ExecState *exec, unsigned index) 121 121 { 122 122 return false;
Note:
See TracChangeset
for help on using the changeset viewer.