Title: [98261] trunk/Source
Revision
98261
Author
[email protected]
Date
2011-10-24 11:37:37 -0700 (Mon, 24 Oct 2011)

Log Message

Rename static getOwnPropertySlot to getOwnPropertySlotByIndex
https://bugs.webkit.org/show_bug.cgi?id=70271

Reviewed by Darin Adler.

Source/_javascript_Core:

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.

* _javascript_Core.exp:
* _javascript_Core.vcproj/_javascript_Core/_javascript_Core.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:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (98260 => 98261)


--- trunk/Source/_javascript_Core/ChangeLog	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-24 18:37:37 UTC (rev 98261)
@@ -1,3 +1,57 @@
+2011-10-24  Mark Hahnenberg  <[email protected]>
+
+        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.
+
+        * _javascript_Core.exp:
+        * _javascript_Core.vcproj/_javascript_Core/_javascript_Core.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  <[email protected]>
 
         Interpreter build fix after r98179.

Modified: trunk/Source/_javascript_Core/_javascript_Core.exp (98260 => 98261)


--- trunk/Source/_javascript_Core/_javascript_Core.exp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/_javascript_Core.exp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -282,7 +282,7 @@
 __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_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 @@
 __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

Modified: trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def (98260 => 98261)


--- trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def	2011-10-24 18:37:37 UTC (rev 98261)
@@ -201,8 +201,8 @@
     ?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

Modified: trunk/Source/_javascript_Core/runtime/Arguments.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/Arguments.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/Arguments.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -147,10 +147,10 @@
 
 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])) {

Modified: trunk/Source/_javascript_Core/runtime/Arguments.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/Arguments.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/Arguments.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -138,7 +138,7 @@
         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&);

Modified: trunk/Source/_javascript_Core/runtime/JSArray.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSArray.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSArray.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -247,10 +247,10 @@
 
 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 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);
 }

Modified: trunk/Source/_javascript_Core/runtime/JSArray.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSArray.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSArray.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -97,7 +97,7 @@
         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);

Modified: trunk/Source/_javascript_Core/runtime/JSByteArray.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSByteArray.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSByteArray.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -84,10 +84,10 @@
 
 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)) {

Modified: trunk/Source/_javascript_Core/runtime/JSByteArray.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSByteArray.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSByteArray.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -91,7 +91,7 @@
         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&);

Modified: trunk/Source/_javascript_Core/runtime/JSCell.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSCell.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSCell.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -83,10 +83,10 @@
 
 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.

Modified: trunk/Source/_javascript_Core/runtime/JSCell.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSCell.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSCell.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -137,7 +137,7 @@
         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;
     };

Modified: trunk/Source/_javascript_Core/runtime/JSNotAnObject.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSNotAnObject.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSNotAnObject.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -59,10 +59,10 @@
 
 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;

Modified: trunk/Source/_javascript_Core/runtime/JSNotAnObject.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSNotAnObject.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSNotAnObject.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -71,7 +71,7 @@
         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&);

Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSObject.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -106,10 +106,10 @@
 
 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);
 }

Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSObject.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -102,7 +102,7 @@
         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&);

Modified: trunk/Source/_javascript_Core/runtime/JSString.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSString.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSString.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -257,10 +257,10 @@
 
 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.

Modified: trunk/Source/_javascript_Core/runtime/JSString.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/JSString.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/JSString.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -253,7 +253,7 @@
         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;

Modified: trunk/Source/_javascript_Core/runtime/ObjectPrototype.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/ObjectPrototype.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/ObjectPrototype.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -94,15 +94,15 @@
 
 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)

Modified: trunk/Source/_javascript_Core/runtime/ObjectPrototype.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/ObjectPrototype.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/ObjectPrototype.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -56,7 +56,7 @@
         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;

Modified: trunk/Source/_javascript_Core/runtime/RegExpMatchesArray.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/RegExpMatchesArray.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/RegExpMatchesArray.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -58,15 +58,15 @@
 
         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)

Modified: trunk/Source/_javascript_Core/runtime/StringObject.cpp (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/StringObject.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/StringObject.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -56,10 +56,10 @@
     
 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))

Modified: trunk/Source/_javascript_Core/runtime/StringObject.h (98260 => 98261)


--- trunk/Source/_javascript_Core/runtime/StringObject.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/_javascript_Core/runtime/StringObject.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -48,7 +48,7 @@
         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&);

Modified: trunk/Source/WebCore/ChangeLog (98260 => 98261)


--- trunk/Source/WebCore/ChangeLog	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/WebCore/ChangeLog	2011-10-24 18:37:37 UTC (rev 98261)
@@ -1,3 +1,26 @@
+2011-10-24  Mark Hahnenberg  <[email protected]>
+
+        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  <[email protected]>
 
         IndexedDB add should fail adding an inline and passed key simultaneously

Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (98260 => 98261)


--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -333,7 +333,7 @@
     {
         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);
             }

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (98260 => 98261)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2011-10-24 18:37:37 UTC (rev 98261)
@@ -774,7 +774,7 @@
         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 @@
                 && !$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");

Modified: trunk/Source/WebCore/bridge/runtime_array.cpp (98260 => 98261)


--- trunk/Source/WebCore/bridge/runtime_array.cpp	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/WebCore/bridge/runtime_array.cpp	2011-10-24 18:37:37 UTC (rev 98261)
@@ -128,10 +128,10 @@
 
 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 @@
         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)

Modified: trunk/Source/WebCore/bridge/runtime_array.h (98260 => 98261)


--- trunk/Source/WebCore/bridge/runtime_array.h	2011-10-24 18:37:04 UTC (rev 98260)
+++ trunk/Source/WebCore/bridge/runtime_array.h	2011-10-24 18:37:37 UTC (rev 98261)
@@ -53,7 +53,7 @@
     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&);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to