Commit 6f0c32e0 authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Rename static getOwnPropertySlot to getOwnPropertySlotByIndex

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

Reviewed by Darin Adler.

Source/JavaScriptCore:

Renaming versions of getOwnPropertySlot that use an unsigned as the property
name to "getOwnPropertySlotByIndex" in preparation for adding them to the
MethodTable, which requires unique names for each method.

* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlotVirtual):
(JSC::Arguments::getOwnPropertySlotByIndex):
* runtime/Arguments.h:
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlotVirtual):
(JSC::JSArray::getOwnPropertySlotByIndex):
(JSC::JSArray::getOwnPropertySlot):
* runtime/JSArray.h:
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::getOwnPropertySlotVirtual):
(JSC::JSByteArray::getOwnPropertySlotByIndex):
* runtime/JSByteArray.h:
* runtime/JSCell.cpp:
(JSC::JSCell::getOwnPropertySlotVirtual):
(JSC::JSCell::getOwnPropertySlotByIndex):
* runtime/JSCell.h:
* runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::getOwnPropertySlotVirtual):
(JSC::JSNotAnObject::getOwnPropertySlotByIndex):
* runtime/JSNotAnObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertySlotVirtual):
(JSC::JSObject::getOwnPropertySlotByIndex):
* runtime/JSObject.h:
* runtime/JSString.cpp:
(JSC::JSString::getOwnPropertySlotVirtual):
(JSC::JSString::getOwnPropertySlotByIndex):
* runtime/JSString.h:
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::getOwnPropertySlotVirtual):
(JSC::ObjectPrototype::getOwnPropertySlotByIndex):
* runtime/ObjectPrototype.h:
* runtime/RegExpMatchesArray.h:
(JSC::RegExpMatchesArray::getOwnPropertySlotVirtual):
(JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
* runtime/StringObject.cpp:
(JSC::StringObject::getOwnPropertySlotVirtual):
(JSC::StringObject::getOwnPropertySlotByIndex):
* runtime/StringObject.h:

Source/WebCore:

No new tests.

Renaming versions of getOwnPropertySlot that use an unsigned as the property
name to "getOwnPropertySlotByIndex" in preparation for adding them to the
MethodTable, which requires unique names for each method.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::getSparseIndex):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlotVirtual):
(JSC::RuntimeArray::getOwnPropertySlotByIndex):
* bridge/runtime_array.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ff6fdb0c
2011-10-24 Mark Hahnenberg <mhahnenberg@apple.com>
Rename static getOwnPropertySlot to getOwnPropertySlotByIndex
https://bugs.webkit.org/show_bug.cgi?id=70271
Reviewed by Darin Adler.
Renaming versions of getOwnPropertySlot that use an unsigned as the property
name to "getOwnPropertySlotByIndex" in preparation for adding them to the
MethodTable, which requires unique names for each method.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlotVirtual):
(JSC::Arguments::getOwnPropertySlotByIndex):
* runtime/Arguments.h:
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlotVirtual):
(JSC::JSArray::getOwnPropertySlotByIndex):
(JSC::JSArray::getOwnPropertySlot):
* runtime/JSArray.h:
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::getOwnPropertySlotVirtual):
(JSC::JSByteArray::getOwnPropertySlotByIndex):
* runtime/JSByteArray.h:
* runtime/JSCell.cpp:
(JSC::JSCell::getOwnPropertySlotVirtual):
(JSC::JSCell::getOwnPropertySlotByIndex):
* runtime/JSCell.h:
* runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::getOwnPropertySlotVirtual):
(JSC::JSNotAnObject::getOwnPropertySlotByIndex):
* runtime/JSNotAnObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertySlotVirtual):
(JSC::JSObject::getOwnPropertySlotByIndex):
* runtime/JSObject.h:
* runtime/JSString.cpp:
(JSC::JSString::getOwnPropertySlotVirtual):
(JSC::JSString::getOwnPropertySlotByIndex):
* runtime/JSString.h:
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::getOwnPropertySlotVirtual):
(JSC::ObjectPrototype::getOwnPropertySlotByIndex):
* runtime/ObjectPrototype.h:
* runtime/RegExpMatchesArray.h:
(JSC::RegExpMatchesArray::getOwnPropertySlotVirtual):
(JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
* runtime/StringObject.cpp:
(JSC::StringObject::getOwnPropertySlotVirtual):
(JSC::StringObject::getOwnPropertySlotByIndex):
* runtime/StringObject.h:
2011-10-24 Patrick Gansterer <paroga@webkit.org>
Interpreter build fix after r98179.
......@@ -282,7 +282,7 @@ __ZN3JSC7JSArray13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataERKNS_7ArgListE
__ZN3JSC7JSArray15setSubclassDataEPv
__ZN3JSC7JSArray18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC7JSArray25getOwnPropertySlotByIndexEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC7JSArray6s_infoE
__ZN3JSC7JSArray9setLengthEj
__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE
......@@ -326,7 +326,6 @@ __ZN3JSC8JSObject17putWithAttributesEPNS_12JSGlobalDataEjNS_7JSValueEj
__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEjbRNS_15PutPropertySlotE
__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateEjNS_7JSValueEj
__ZN3JSC8JSObject18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC8JSObject21deletePropertyByIndexEPNS_6JSCellEPNS_9ExecStateEj
__ZN3JSC8JSObject21deletePropertyVirtualEPNS_9ExecStateERKNS_10IdentifierE
......@@ -335,6 +334,7 @@ __ZN3JSC8JSObject21getPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18
__ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_16WriteBarrierBaseINS_7UnknownEEE
__ZN3JSC8JSObject23allocatePropertyStorageERNS_12JSGlobalDataEmm
__ZN3JSC8JSObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
__ZN3JSC8JSObject25getOwnPropertySlotByIndexEPNS_6JSCellEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC8JSObject25getOwnPropertySlotVirtualEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC8JSObject3putEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC8JSObject6s_infoE
......
......@@ -201,8 +201,8 @@ EXPORTS
?getOwnPropertyNames@JSObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z
?getOwnPropertyNames@JSVariableObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z
?getOwnPropertyNames@StringObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z
?getOwnPropertySlot@JSArray@JSC@@SA_NPAVJSCell@2@PAVExecState@2@IAAVPropertySlot@2@@Z
?getOwnPropertySlot@JSGlobalObject@JSC@@SA_NPAVJSCell@2@PAVExecState@2@ABVIdentifier@2@AAVPropertySlot@2@@Z
?getOwnPropertySlotByIndex@JSArray@JSC@@SA_NPAVJSCell@2@PAVExecState@2@IAAVPropertySlot@2@@Z
?getOwnPropertySlotVirtual@JSCell@JSC@@EAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertySlot@2@@Z
?getOwnPropertySlotVirtual@JSCell@JSC@@EAE_NPAVExecState@2@IAAVPropertySlot@2@@Z
?getOwnPropertySlotVirtual@JSGlobalObject@JSC@@UAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertySlot@2@@Z
......
......@@ -147,10 +147,10 @@ void Arguments::fillArgList(ExecState* exec, MarkedArgumentBuffer& args)
bool Arguments::getOwnPropertySlotVirtual(ExecState* exec, unsigned i, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, i, slot);
return getOwnPropertySlotByIndex(this, exec, i, slot);
}
bool Arguments::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned i, PropertySlot& slot)
bool Arguments::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned i, PropertySlot& slot)
{
Arguments* thisObject = static_cast<Arguments*>(cell);
if (i < thisObject->d->numArguments && (!thisObject->d->deletedArguments || !thisObject->d->deletedArguments[i])) {
......
......@@ -138,7 +138,7 @@ namespace JSC {
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 getOwnPropertySlot(JSCell*, 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);
virtual void putVirtual(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
......
......@@ -247,10 +247,10 @@ JSArray::~JSArray()
bool JSArray::getOwnPropertySlotVirtual(ExecState* exec, unsigned i, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, i, slot);
return getOwnPropertySlotByIndex(this, exec, i, slot);
}
bool JSArray::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned i, PropertySlot& slot)
bool JSArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned i, PropertySlot& slot)
{
JSArray* thisObject = static_cast<JSArray*>(cell);
ArrayStorage* storage = thisObject->m_storage;
......@@ -296,7 +296,7 @@ bool JSArray::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier
bool isArrayIndex;
unsigned i = propertyName.toArrayIndex(isArrayIndex);
if (isArrayIndex)
return JSArray::getOwnPropertySlot(thisObject, exec, i, slot);
return JSArray::getOwnPropertySlotByIndex(thisObject, exec, i, slot);
return JSObject::getOwnPropertySlot(thisObject, exec, propertyName, slot);
}
......
......@@ -97,7 +97,7 @@ namespace JSC {
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 getOwnPropertySlot(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void putVirtual(ExecState*, unsigned propertyName, JSValue); // FIXME: Make protected and add setItem.
static void putByIndex(JSCell*, ExecState*, unsigned propertyName, JSValue);
......
......@@ -84,10 +84,10 @@ bool JSByteArray::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pr
bool JSByteArray::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
bool JSByteArray::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
bool JSByteArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
JSByteArray* thisObject = static_cast<JSByteArray*>(cell);
if (thisObject->canAccessIndex(propertyName)) {
......
......@@ -91,7 +91,7 @@ namespace JSC {
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 getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
static bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void putVirtual(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
......
......@@ -83,10 +83,10 @@ bool JSCell::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier&
bool JSCell::getOwnPropertySlotVirtual(ExecState* exec, unsigned identifier, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, identifier, slot);
return getOwnPropertySlotByIndex(this, exec, identifier, slot);
}
bool JSCell::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned identifier, PropertySlot& slot)
bool JSCell::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned identifier, PropertySlot& slot)
{
// This is not a general purpose implementation of getOwnPropertySlot.
// It should only be called by JSValue::get.
......
......@@ -137,7 +137,7 @@ namespace JSC {
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 getOwnPropertySlot(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
WriteBarrier<Structure> m_structure;
};
......
......@@ -59,10 +59,10 @@ bool JSNotAnObject::getOwnPropertySlot(JSCell*, ExecState* exec, const Identifie
bool JSNotAnObject::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
bool JSNotAnObject::getOwnPropertySlot(JSCell*, ExecState* exec, unsigned, PropertySlot&)
bool JSNotAnObject::getOwnPropertySlotByIndex(JSCell*, ExecState* exec, unsigned, PropertySlot&)
{
ASSERT_UNUSED(exec, exec->hadException());
return false;
......
......@@ -71,7 +71,7 @@ namespace JSC {
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 getOwnPropertySlot(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void putVirtual(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
......
......@@ -106,10 +106,10 @@ UString JSObject::className() const
bool JSObject::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
bool JSObject::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
bool JSObject::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return static_cast<JSObject*>(cell)->getOwnPropertySlotVirtual(exec, Identifier::from(exec, propertyName), slot);
}
......
......@@ -102,7 +102,7 @@ namespace JSC {
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 getOwnPropertySlot(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void putVirtual(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
......
......@@ -257,10 +257,10 @@ bool JSString::getOwnPropertyDescriptor(ExecState* exec, const Identifier& prope
bool JSString::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
bool JSString::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
bool JSString::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
JSString* thisObject = static_cast<JSString*>(cell);
// The semantics here are really getPropertySlot, not getOwnPropertySlot.
......
......@@ -253,7 +253,7 @@ namespace JSC {
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 getOwnPropertySlot(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
static const unsigned s_maxInternalRopeLength = 3;
......
......@@ -94,15 +94,15 @@ void ObjectPrototype::put(JSCell* cell, ExecState* exec, const Identifier& prope
bool ObjectPrototype::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
bool ObjectPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
bool ObjectPrototype::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
ObjectPrototype* thisObject = static_cast<ObjectPrototype*>(cell);
if (thisObject->m_hasNoPropertiesWithUInt32Names)
return false;
return JSNonFinalObject::getOwnPropertySlot(thisObject, exec, propertyName, slot);
return JSNonFinalObject::getOwnPropertySlotByIndex(thisObject, exec, propertyName, slot);
}
bool ObjectPrototype::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
......
......@@ -56,7 +56,7 @@ namespace JSC {
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertySlotVirtual(ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
bool m_hasNoPropertiesWithUInt32Names;
......
......@@ -58,15 +58,15 @@ namespace JSC {
virtual bool getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
static bool getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
static bool getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
RegExpMatchesArray* thisObject = static_cast<RegExpMatchesArray*>(cell);
if (thisObject->subclassData())
thisObject->fillArrayInstance(exec);
return JSArray::getOwnPropertySlot(thisObject, exec, propertyName, slot);
return JSArray::getOwnPropertySlotByIndex(thisObject, exec, propertyName, slot);
}
virtual bool getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
......
......@@ -56,10 +56,10 @@ bool StringObject::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Ident
bool StringObject::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, propertyName, slot);
return getOwnPropertySlotByIndex(this, exec, propertyName, slot);
}
bool StringObject::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
bool StringObject::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
StringObject* thisObject = static_cast<StringObject*>(cell);
if (thisObject->internalValue()->getStringPropertySlot(exec, propertyName, slot))
......
......@@ -48,7 +48,7 @@ namespace JSC {
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 getOwnPropertySlot(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void putVirtual(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
......
2011-10-24 Mark Hahnenberg <mhahnenberg@apple.com>
Rename static getOwnPropertySlot to getOwnPropertySlotByIndex
https://bugs.webkit.org/show_bug.cgi?id=70271
Reviewed by Darin Adler.
No new tests.
Renaming versions of getOwnPropertySlot that use an unsigned as the property
name to "getOwnPropertySlotByIndex" in preparation for adding them to the
MethodTable, which requires unique names for each method.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::getSparseIndex):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlotVirtual):
(JSC::RuntimeArray::getOwnPropertySlotByIndex):
* bridge/runtime_array.h:
2011-10-24 Joshua Bell <jsbell@chromium.org>
IndexedDB add should fail adding an inline and passed key simultaneously
......
......@@ -333,7 +333,7 @@ private:
{
PropertySlot slot(array);
if (isJSArray(&m_exec->globalData(), array)) {
if (JSArray::getOwnPropertySlot(array, m_exec, propertyName, slot)) {
if (JSArray::getOwnPropertySlotByIndex(array, m_exec, propertyName, slot)) {
hasIndex = true;
return slot.getValue(m_exec, propertyName);
}
......
......@@ -774,7 +774,7 @@ sub GenerateHeader
push(@headerContent, " static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);\n");
push(@headerContent, " virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);\n");
push(@headerContent, " virtual bool getOwnPropertySlotVirtual(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);\n") if ($dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"HasCustomIndexGetter"} || $dataNode->extendedAttributes->{"HasNumericIndexGetter"}) && !$dataNode->extendedAttributes->{"HasOverridingNameGetter"};
push(@headerContent, " static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);\n") if ($dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"HasCustomIndexGetter"} || $dataNode->extendedAttributes->{"HasNumericIndexGetter"}) && !$dataNode->extendedAttributes->{"HasOverridingNameGetter"};
push(@headerContent, " static bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);\n") if ($dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"HasCustomIndexGetter"} || $dataNode->extendedAttributes->{"HasNumericIndexGetter"}) && !$dataNode->extendedAttributes->{"HasOverridingNameGetter"};
push(@headerContent, " bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);\n") if $dataNode->extendedAttributes->{"DelegatingGetOwnPropertySlot"};
push(@headerContent, " bool getOwnPropertyDescriptorDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);\n") if $dataNode->extendedAttributes->{"DelegatingGetOwnPropertySlot"};
$structureFlags{"JSC::OverridesGetOwnPropertySlot"} = 1;
......@@ -1604,9 +1604,9 @@ sub GenerateImplementation
&& !$dataNode->extendedAttributes->{"HasOverridingNameGetter"}) {
push(@implContent, "bool ${className}::getOwnPropertySlotVirtual(ExecState* exec, unsigned propertyName, PropertySlot& slot)\n");
push(@implContent, "{\n");
push(@implContent, " return getOwnPropertySlot(this, exec, propertyName, slot);\n");
push(@implContent, " return getOwnPropertySlotByIndex(this, exec, propertyName, slot);\n");
push(@implContent, "}\n\n");
push(@implContent, "bool ${className}::getOwnPropertySlot(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)\n");
push(@implContent, "bool ${className}::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)\n");
push(@implContent, "{\n");
push(@implContent, " ${className}* thisObject = static_cast<${className}*>(cell);\n");
push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);\n");
......
......@@ -128,10 +128,10 @@ bool RuntimeArray::getOwnPropertyDescriptor(ExecState* exec, const Identifier& p
bool RuntimeArray::getOwnPropertySlotVirtual(ExecState *exec, unsigned index, PropertySlot& slot)
{
return getOwnPropertySlot(this, exec, index, slot);
return getOwnPropertySlotByIndex(this, exec, index, slot);
}
bool RuntimeArray::getOwnPropertySlot(JSCell* cell, ExecState *exec, unsigned index, PropertySlot& slot)
bool RuntimeArray::getOwnPropertySlotByIndex(JSCell* cell, ExecState *exec, unsigned index, PropertySlot& slot)
{
RuntimeArray* thisObject = static_cast<RuntimeArray*>(cell);
if (index < thisObject->getLength()) {
......@@ -139,7 +139,7 @@ bool RuntimeArray::getOwnPropertySlot(JSCell* cell, ExecState *exec, unsigned in
return true;
}
return JSObject::getOwnPropertySlot(thisObject, exec, index, slot);
return JSObject::getOwnPropertySlotByIndex(thisObject, exec, index, slot);
}
void RuntimeArray::putVirtual(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
......
......@@ -53,7 +53,7 @@ public:
virtual bool getOwnPropertySlotVirtual(ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertySlotVirtual(ExecState*, unsigned, PropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, unsigned, PropertySlot&);
static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void putVirtual(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
static void put(JSCell*, ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment