Commit 5c103b05 authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Remove getOwnPropertySlotVirtual

https://bugs.webkit.org/show_bug.cgi?id=70741

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

Removed all declarations and definitions of getOwnPropertySlotVirtual.
Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
corresponding lookup in the MethodTable.

* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertyDescriptor):
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::getOwnPropertySlot):
* debugger/DebuggerActivation.h:
* runtime/Arguments.cpp:
* runtime/Arguments.h:
* runtime/ArrayConstructor.cpp:
* runtime/ArrayConstructor.h:
* runtime/ArrayPrototype.cpp:
* runtime/ArrayPrototype.h:
* runtime/BooleanPrototype.cpp:
* runtime/BooleanPrototype.h:
* runtime/DateConstructor.cpp:
* runtime/DateConstructor.h:
* runtime/DatePrototype.cpp:
* runtime/DatePrototype.h:
(JSC::DatePrototype::create):
* runtime/ErrorPrototype.cpp:
* runtime/ErrorPrototype.h:
* runtime/JSActivation.cpp:
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlotByIndex):
* runtime/JSArray.h:
* runtime/JSByteArray.cpp:
* runtime/JSByteArray.h:
* runtime/JSCell.cpp:
* runtime/JSCell.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertyDescriptor):
(JSC::JSFunction::getOwnPropertyNames):
(JSC::JSFunction::put):
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSNotAnObject.cpp:
* runtime/JSNotAnObject.h:
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):
* runtime/JSONObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::JSObject::hasOwnProperty):
* runtime/JSObject.h:
(JSC::JSCell::fastGetOwnPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSValue::get):
* runtime/JSStaticScopeObject.cpp:
* runtime/JSStaticScopeObject.h:
* runtime/JSString.cpp:
(JSC::JSString::getOwnPropertySlot):
* runtime/JSString.h:
* runtime/MathObject.cpp:
* runtime/MathObject.h:
(JSC::MathObject::create):
* runtime/NumberConstructor.cpp:
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.cpp:
* runtime/NumberPrototype.h:
* runtime/ObjectConstructor.cpp:
* runtime/ObjectConstructor.h:
* runtime/ObjectPrototype.cpp:
* runtime/ObjectPrototype.h:
* runtime/RegExpConstructor.cpp:
* runtime/RegExpConstructor.h:
* runtime/RegExpMatchesArray.h:
(JSC::RegExpMatchesArray::createStructure):
* runtime/RegExpObject.cpp:
* runtime/RegExpObject.h:
* runtime/RegExpPrototype.cpp:
* runtime/RegExpPrototype.h:
* runtime/StringConstructor.cpp:
* runtime/StringConstructor.h:
* runtime/StringObject.cpp:
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
* runtime/StringPrototype.h:

Source/JavaScriptGlue: 

Removed all declarations and definitions of getOwnPropertySlotVirtual.
Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
corresponding lookup in the MethodTable.

* UserObjectImp.cpp:
* UserObjectImp.h:

Source/WebCore: 

No new tests.

Removed all declarations and definitions of getOwnPropertySlotVirtual.
Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
corresponding lookup in the MethodTable.

* WebCore.exp.in:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::DialogHandler::returnValue):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::getOwnPropertySlot):
* bindings/js/JSDOMWindowShell.h:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::getSparseIndex):
(WebCore::CloneSerializer::getProperty):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDeclaration):
(GenerateConstructorDefinition):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
* bridge/qt/qt_runtime.cpp:
* bridge/qt/qt_runtime.h:
* bridge/runtime_array.cpp:
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
* bridge/runtime_object.h:

Source/WebKit2: 

Removed all declarations and definitions of getOwnPropertySlotVirtual.
Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
corresponding lookup in the MethodTable.

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 25331ca3
......@@ -172,13 +172,14 @@ public:
m_callbackObjectData->deletePrivateProperty(propertyName);
}
using Parent::methodTable;
protected:
static const unsigned StructureFlags = ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Parent::StructureFlags;
private:
virtual UString className() const;
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
......
......@@ -123,12 +123,6 @@ UString JSCallbackObject<Parent>::className() const
return Parent::className();
}
template <class Parent>
bool JSCallbackObject<Parent>::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
template <class Parent>
bool JSCallbackObject<Parent>::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
......@@ -192,7 +186,7 @@ template <class Parent>
bool JSCallbackObject<Parent>::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
PropertySlot slot;
if (getOwnPropertySlotVirtual(exec, propertyName, slot)) {
if (methodTable()->getOwnPropertySlot(this, exec, propertyName, slot)) {
// Ideally we should return an access descriptor, but returning a value descriptor is better than nothing.
JSValue value = slot.getValue(exec, propertyName);
if (!exec->hadException())
......
2011-10-26 Mark Hahnenberg <mhahnenberg@apple.com>
Remove getOwnPropertySlotVirtual
https://bugs.webkit.org/show_bug.cgi?id=70741
Reviewed by Geoffrey Garen.
Removed all declarations and definitions of getOwnPropertySlotVirtual.
Also replaced all call sites to getOwnPropertyVirtualVirtual with a
corresponding lookup in the MethodTable.
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertyDescriptor):
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::getOwnPropertySlot):
* debugger/DebuggerActivation.h:
* runtime/Arguments.cpp:
* runtime/Arguments.h:
* runtime/ArrayConstructor.cpp:
* runtime/ArrayConstructor.h:
* runtime/ArrayPrototype.cpp:
* runtime/ArrayPrototype.h:
* runtime/BooleanPrototype.cpp:
* runtime/BooleanPrototype.h:
* runtime/DateConstructor.cpp:
* runtime/DateConstructor.h:
* runtime/DatePrototype.cpp:
* runtime/DatePrototype.h:
(JSC::DatePrototype::create):
* runtime/ErrorPrototype.cpp:
* runtime/ErrorPrototype.h:
* runtime/JSActivation.cpp:
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlotByIndex):
* runtime/JSArray.h:
* runtime/JSByteArray.cpp:
* runtime/JSByteArray.h:
* runtime/JSCell.cpp:
* runtime/JSCell.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertyDescriptor):
(JSC::JSFunction::getOwnPropertyNames):
(JSC::JSFunction::put):
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSNotAnObject.cpp:
* runtime/JSNotAnObject.h:
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):
* runtime/JSONObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::JSObject::hasOwnProperty):
* runtime/JSObject.h:
(JSC::JSCell::fastGetOwnPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSValue::get):
* runtime/JSStaticScopeObject.cpp:
* runtime/JSStaticScopeObject.h:
* runtime/JSString.cpp:
(JSC::JSString::getOwnPropertySlot):
* runtime/JSString.h:
* runtime/MathObject.cpp:
* runtime/MathObject.h:
(JSC::MathObject::create):
* runtime/NumberConstructor.cpp:
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.cpp:
* runtime/NumberPrototype.h:
* runtime/ObjectConstructor.cpp:
* runtime/ObjectConstructor.h:
* runtime/ObjectPrototype.cpp:
* runtime/ObjectPrototype.h:
* runtime/RegExpConstructor.cpp:
* runtime/RegExpConstructor.h:
* runtime/RegExpMatchesArray.h:
(JSC::RegExpMatchesArray::createStructure):
* runtime/RegExpObject.cpp:
* runtime/RegExpObject.h:
* runtime/RegExpPrototype.cpp:
* runtime/RegExpPrototype.h:
* runtime/StringConstructor.cpp:
* runtime/StringConstructor.h:
* runtime/StringObject.cpp:
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
* runtime/StringPrototype.h:
2011-10-26 Alejandro G. Castro <alex@igalia.com>
[GTK] [WK2] Add WebKit2 distcheck support
......@@ -169,7 +169,6 @@ __ZN3JSC14JSGlobalObject16addStaticGlobalsEPNS0_18GlobalPropertyInfoEi
__ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
__ZN3JSC14JSGlobalObject18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
__ZN3JSC14JSGlobalObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
__ZN3JSC14JSGlobalObject25getOwnPropertySlotVirtualEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
__ZN3JSC14JSGlobalObject3putEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE
__ZN3JSC14JSGlobalObject6s_infoE
......@@ -260,8 +259,6 @@ __ZN3JSC4Yarr9interpretEPNS0_15BytecodePatternERKNS_7UStringEjjPi
__ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
__ZN3JSC6JSCell11getCallDataEPS0_RNS_8CallDataE
__ZN3JSC6JSCell16getConstructDataEPS0_RNS_13ConstructDataE
__ZN3JSC6JSCell25getOwnPropertySlotVirtualEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
__ZN3JSC6JSCell25getOwnPropertySlotVirtualEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC6JSCell9getObjectEv
__ZN3JSC6JSLock12DropAllLocksC1ENS_14JSLockBehaviorE
__ZN3JSC6JSLock12DropAllLocksC1EPNS_9ExecStateE
......@@ -327,7 +324,6 @@ __ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_16WriteBarrierB
__ZN3JSC8JSObject23allocatePropertyStorageERNS_12JSGlobalDataEmm
__ZN3JSC8JSObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
__ZN3JSC8JSObject25getOwnPropertySlotByIndexEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC8JSObject25getOwnPropertySlotVirtualEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC8JSObject3putEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC8JSObject6s_infoE
__ZN3JSC8JSString6s_infoE
......
......@@ -202,10 +202,6 @@ EXPORTS
?getOwnPropertySlotByIndex@JSArray@JSC@@SA_NPAVJSCell@2@PAVExecState@2@IAAVPropertySlot@2@@Z
?getOwnPropertySlotByIndex@JSByteArray@JSC@@SA_NPAVJSCell@2@PAVExecState@2@IAAVPropertySlot@2@@Z
?getOwnPropertySlotByIndex@JSObject@JSC@@SA_NPAVJSCell@2@PAVExecState@2@IAAVPropertySlot@2@@Z
?getOwnPropertySlotVirtual@JSCell@JSC@@MAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertySlot@2@@Z
?getOwnPropertySlotVirtual@JSCell@JSC@@MAE_NPAVExecState@2@IAAVPropertySlot@2@@Z
?getOwnPropertySlotVirtual@JSGlobalObject@JSC@@UAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertySlot@2@@Z
?getOwnPropertySlotVirtual@JSObject@JSC@@UAE_NPAVExecState@2@IAAVPropertySlot@2@@Z
?getPropertyDescriptor@JSObject@JSC@@QAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@@Z
?getPropertyNames@JSObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z
?getSlice@ArgList@JSC@@QBEXHAAV12@@Z
......
......@@ -60,14 +60,10 @@ UString DebuggerActivation::className() const
return m_activation->className();
}
bool DebuggerActivation::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool DebuggerActivation::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return static_cast<DebuggerActivation*>(cell)->m_activation->getOwnPropertySlotVirtual(exec, propertyName, slot);
DebuggerActivation* thisObject = static_cast<DebuggerActivation*>(cell);
return thisObject->m_activation->methodTable()->getOwnPropertySlot(thisObject->m_activation.get(), exec, propertyName, slot);
}
void DebuggerActivation::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
......
......@@ -43,7 +43,6 @@ namespace JSC {
static void visitChildren(JSCell*, SlotVisitor&);
virtual UString className() const;
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier& propertyName, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&);
static void put(JSCell*, ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue, unsigned attributes);
......
......@@ -145,11 +145,6 @@ void Arguments::fillArgList(ExecState* exec, MarkedArgumentBuffer& args)
}
}
bool Arguments::getOwnPropertySlotVirtual(ExecState* exec, unsigned i, PropertySlot& slot)
{
return getOwnPropertySlotByIndex(this, exec, i, slot);
}
bool Arguments::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned i, PropertySlot& slot)
{
Arguments* thisObject = static_cast<Arguments*>(cell);
......@@ -188,11 +183,6 @@ void Arguments::createStrictModeCalleeIfNecessary(ExecState* exec)
defineOwnProperty(exec, exec->propertyNames().callee, descriptor, false);
}
bool Arguments::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool Arguments::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
Arguments* thisObject = static_cast<Arguments*>(cell);
......
......@@ -135,9 +135,7 @@ namespace JSC {
private:
void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc);
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier& propertyName, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&);
virtual bool getOwnPropertySlotVirtual(ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
......
......@@ -63,11 +63,6 @@ void ArrayConstructor::finishCreation(ExecState* exec, ArrayPrototype* arrayProt
putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
}
bool ArrayConstructor::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool ArrayConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
{
return getStaticFunctionSlot<InternalFunction>(exec, ExecState::arrayConstructorTable(exec), static_cast<ArrayConstructor*>(cell), propertyName, slot);
......
......@@ -51,7 +51,6 @@ namespace JSC {
private:
ArrayConstructor(JSGlobalObject*, Structure*);
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
......
......@@ -125,11 +125,6 @@ void ArrayPrototype::finishCreation(JSGlobalObject* globalObject)
ASSERT(inherits(&s_info));
}
bool ArrayPrototype::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool ArrayPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticFunctionSlot<JSArray>(exec, ExecState::arrayPrototypeTable(exec), static_cast<ArrayPrototype*>(cell), propertyName, slot);
......
......@@ -40,7 +40,6 @@ namespace JSC {
return prototype;
}
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
......
......@@ -62,11 +62,6 @@ void BooleanPrototype::finishCreation(ExecState* exec, JSGlobalObject*)
ASSERT(inherits(&s_info));
}
bool BooleanPrototype::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool BooleanPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
{
return getStaticFunctionSlot<BooleanObject>(exec, ExecState::booleanPrototypeTable(exec), static_cast<BooleanPrototype*>(cell), propertyName, slot);
......
......@@ -49,7 +49,6 @@ namespace JSC {
private:
BooleanPrototype(ExecState*, Structure*);
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
......
......@@ -85,11 +85,6 @@ void DateConstructor::finishCreation(ExecState* exec, DatePrototype* datePrototy
putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
}
bool DateConstructor::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool DateConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
{
return getStaticFunctionSlot<InternalFunction>(exec, ExecState::dateConstructorTable(exec), static_cast<DateConstructor*>(cell), propertyName, slot);
......
......@@ -54,7 +54,6 @@ namespace JSC {
static ConstructType getConstructData(JSCell*, ConstructData&);
static CallType getCallData(JSCell*, CallData&);
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
......
......@@ -443,11 +443,6 @@ void DatePrototype::finishCreation(ExecState* exec, JSGlobalObject*)
// The constructor will be added later, after DateConstructor has been built.
}
bool DatePrototype::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool DatePrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticFunctionSlot<JSObject>(exec, ExecState::dateTable(exec), static_cast<DatePrototype*>(cell), propertyName, slot);
......
......@@ -40,7 +40,6 @@ namespace JSC {
prototype->finishCreation(exec, globalObject);
return prototype;
}
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
......
......@@ -62,11 +62,6 @@ void ErrorPrototype::finishCreation(ExecState* exec, JSGlobalObject*)
putDirect(exec->globalData(), exec->propertyNames().name, jsNontrivialString(exec, "Error"), DontEnum);
}
bool ErrorPrototype::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool ErrorPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
{
return getStaticFunctionSlot<ErrorInstance>(exec, ExecState::errorPrototypeTable(exec), static_cast<ErrorPrototype*>(cell), propertyName, slot);
......
......@@ -52,7 +52,6 @@ namespace JSC {
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ErrorInstance::StructureFlags;
private:
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
};
......
......@@ -141,11 +141,6 @@ inline bool JSActivation::symbolTablePutWithAttributes(JSGlobalData& globalData,
return true;
}
bool JSActivation::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool JSActivation::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
JSActivation* thisObject = static_cast<JSActivation*>(cell);
......
......@@ -61,7 +61,6 @@ namespace JSC {
virtual bool isActivationObject() const { return true; }
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode);
......
......@@ -245,11 +245,6 @@ JSArray::~JSArray()
fastFree(m_storage->m_allocBase);
}
bool JSArray::getOwnPropertySlotVirtual(ExecState* exec, unsigned i, PropertySlot& slot)
{
return getOwnPropertySlotByIndex(this, exec, i, slot);
}
bool JSArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned i, PropertySlot& slot)
{
JSArray* thisObject = static_cast<JSArray*>(cell);
......@@ -257,7 +252,7 @@ bool JSArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned
if (i >= storage->m_length) {
if (i > MAX_ARRAY_INDEX)
return thisObject->getOwnPropertySlotVirtual(exec, Identifier::from(exec, i), slot);
return thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, Identifier::from(exec, i), slot);
return false;
}
......@@ -280,11 +275,6 @@ bool JSArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned
return JSObject::getOwnPropertySlot(thisObject, exec, Identifier::from(exec, i), slot);
}
bool JSArray::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool JSArray::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
JSArray* thisObject = static_cast<JSArray*>(cell);
......
......@@ -94,9 +94,7 @@ namespace JSC {
return array;
}
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier& propertyName, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&);
virtual bool getOwnPropertySlotVirtual(ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
static void putByIndex(JSCell*, ExecState*, unsigned propertyName, JSValue);
......
......@@ -54,11 +54,6 @@ Structure* JSByteArray::createStructure(JSGlobalData& globalData, JSGlobalObject
return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), classInfo);
}
bool JSByteArray::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool JSByteArray::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
JSByteArray* thisObject = static_cast<JSByteArray*>(cell);
......@@ -82,11 +77,6 @@ bool JSByteArray::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pr
return JSObject::getOwnPropertyDescriptor(exec, propertyName, descriptor);
}
bool JSByteArray::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
bool JSByteArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
JSByteArray* thisObject = static_cast<JSByteArray*>(cell);
......
......@@ -88,9 +88,7 @@ namespace JSC {
static Structure* createStructure(JSGlobalData&, JSGlobalObject*, JSValue prototype, const JSC::ClassInfo* = &s_info);
virtual bool getOwnPropertySlotVirtual(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
virtual bool getOwnPropertySlotVirtual(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
static bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
......
......@@ -64,11 +64,6 @@ ConstructType JSCell::getConstructData(JSCell*, ConstructData&)
return ConstructTypeNone;
}
bool JSCell::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& identifier, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, identifier, slot);
}
bool JSCell::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& identifier, PropertySlot& slot)
{
// This is not a general purpose implementation of getOwnPropertySlot.
......@@ -81,11 +76,6 @@ bool JSCell::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier&
return true;
}
bool JSCell::getOwnPropertySlotVirtual(ExecState* exec, unsigned identifier, PropertySlot& slot)
{
return getOwnPropertySlotByIndex(this, exec, identifier, slot);
}
bool JSCell::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned identifier, PropertySlot& slot)
{
// This is not a general purpose implementation of getOwnPropertySlot.
......
......@@ -129,9 +129,7 @@ namespace JSC {
void finishCreation(JSGlobalData&, Structure*, CreatingEarlyCellTag);
// Base implementation; for non-object classes implements getPropertySlot.
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier& propertyName, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&);
virtual bool getOwnPropertySlotVirtual(ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
private:
......
......@@ -195,11 +195,6 @@ JSValue JSFunction::lengthGetter(ExecState*, JSValue slotBase, const Identifier&
return jsNumber(thisObj->jsExecutable()->parameterCount());
}
bool JSFunction::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool JSFunction::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
JSFunction* thisObject = static_cast<JSFunction*>(cell);
......@@ -263,7 +258,7 @@ bool JSFunction::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pro
if (propertyName == exec->propertyNames().prototype) {
PropertySlot slot;
getOwnPropertySlotVirtual(exec, propertyName, slot);
methodTable()->getOwnPropertySlot(this, exec, propertyName, slot);
return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor);
}
......@@ -308,7 +303,7 @@ void JSFunction::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propert
if (!isHostFunction() && (mode == IncludeDontEnumProperties)) {
// Make sure prototype has been reified.
PropertySlot slot;
getOwnPropertySlotVirtual(exec, exec->propertyNames().prototype, slot);
methodTable()->getOwnPropertySlot(this, exec, exec->propertyNames().prototype, slot);
propertyNames.add(exec->propertyNames().arguments);
propertyNames.add(exec->propertyNames().caller);
......@@ -328,7 +323,7 @@ void JSFunction::put(JSCell* cell, ExecState* exec, const Identifier& propertyNa
// Make sure prototype has been reified, such that it can only be overwritten
// following the rules set out in ECMA-262 8.12.9.
PropertySlot slot;
thisObject->getOwnPropertySlotVirtual(exec, propertyName, slot);
thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot);
}
if (thisObject->jsExecutable()->isStrictMode() && (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().caller)) {
// This will trigger the property to be reified, if this is not already the case!
......
......@@ -129,7 +129,6 @@ namespace JSC {
void finishCreation(ExecState*, NativeExecutable*, int length, const Identifier& name);
void finishCreation(ExecState*, FunctionExecutable*, ScopeChainNode*);
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode = ExcludeDontEnumProperties);
......
......@@ -429,11 +429,6 @@ void JSGlobalObject::addStaticGlobals(GlobalPropertyInfo* globals, int count)
}
}
bool JSGlobalObject::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
}
bool JSGlobalObject::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
JSGlobalObject* thisObject = static_cast<JSGlobalObject*>(cell);
......
......@@ -182,7 +182,6 @@ namespace JSC {
static void visitChildren(JSCell*, SlotVisitor&);
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual bool hasOwnPropertyForWrite(ExecState*, const Identifier&);
......
......@@ -45,11 +45,6 @@ JSValue JSNotAnObject::defaultValue(ExecState* exec, PreferredPrimitiveType) con
return jsNumber(0);
}
bool JSNotAnObject::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& identifier, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, identifier, slot);
}
// JSObject methods
bool JSNotAnObject::getOwnPropertySlot(JSCell*, ExecState* exec, const Identifier&, PropertySlot&)
{
......@@ -57,11 +52,6 @@ bool JSNotAnObject::getOwnPropertySlot(JSCell*, ExecState* exec, const Identifie
return false;
}
bool JSNotAnObject::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
bool JSNotAnObject::getOwnPropertySlotByIndex(JSCell*, ExecState* exec, unsigned, PropertySlot&)
{
ASSERT_UNUSED(exec, exec->hadException());
......
......@@ -68,9 +68,7 @@ namespace JSC {
virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const;
// JSObject methods
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier& propertyName, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&);
virtual bool getOwnPropertySlotVirtual(ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
......
......@@ -523,7 +523,7 @@ bool Stringifier::Holder::appendNextProperty(Stringifier& stringifier, UStringBu
value = asArray(m_object.get())->getIndex(index);
else {
PropertySlot slot(m_object.get());
if (!m_object->getOwnPropertySlotVirtual(exec, index, slot))
if (!m_object->methodTable()->getOwnPropertySlotByIndex(m_object.get(), exec, index, slot))
slot.setUndefined();