- Revision
- 139481
- Author
- [email protected]
- Date
- 2013-01-11 12:13:21 -0800 (Fri, 11 Jan 2013)
Log Message
Rename propertyOffsetFor => offsetForPropertyNumber
https://bugs.webkit.org/show_bug.cgi?id=106685
Reviewed by Gavin Barraclough.
Since the argument is just a typedef and not an object, I wanted to clarify the meaning.
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::nextOffset): Updated for rename.
* runtime/PropertyOffset.h:
(JSC::offsetForPropertyNumber): Renamed. Also changed some PropertyOffset variables
to plain ints, because they're not actually on the PropertyOffsets number line.
* runtime/Structure.cpp:
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::lastValidOffset): Updated for rename.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (139480 => 139481)
--- trunk/Source/_javascript_Core/ChangeLog 2013-01-11 20:06:20 UTC (rev 139480)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-01-11 20:13:21 UTC (rev 139481)
@@ -1,3 +1,24 @@
+2013-01-11 Geoffrey Garen <[email protected]>
+
+ Rename propertyOffsetFor => offsetForPropertyNumber
+ https://bugs.webkit.org/show_bug.cgi?id=106685
+
+ Reviewed by Gavin Barraclough.
+
+ Since the argument is just a typedef and not an object, I wanted to clarify the meaning.
+
+ * runtime/PropertyMapHashTable.h:
+ (JSC::PropertyTable::nextOffset): Updated for rename.
+
+ * runtime/PropertyOffset.h:
+ (JSC::offsetForPropertyNumber): Renamed. Also changed some PropertyOffset variables
+ to plain ints, because they're not actually on the PropertyOffsets number line.
+
+ * runtime/Structure.cpp:
+ (JSC::Structure::flattenDictionaryStructure):
+ * runtime/Structure.h:
+ (JSC::Structure::lastValidOffset): Updated for rename.
+
2013-01-10 Zan Dobersek <[email protected]>
Remove the ENABLE_ANIMATION_API feature define occurences
Modified: trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h (139480 => 139481)
--- trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h 2013-01-11 20:06:20 UTC (rev 139480)
+++ trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h 2013-01-11 20:13:21 UTC (rev 139481)
@@ -491,7 +491,7 @@
if (hasDeletedOffset())
return getDeletedOffset();
- return propertyOffsetFor(size(), inlineCapacity);
+ return offsetForPropertyNumber(size(), inlineCapacity);
}
inline PassOwnPtr<PropertyTable> PropertyTable::copy(JSGlobalData& globalData, JSCell* owner, unsigned newCapacity)
Modified: trunk/Source/_javascript_Core/runtime/PropertyOffset.h (139480 => 139481)
--- trunk/Source/_javascript_Core/runtime/PropertyOffset.h 2013-01-11 20:06:20 UTC (rev 139480)
+++ trunk/Source/_javascript_Core/runtime/PropertyOffset.h 2013-01-11 20:13:21 UTC (rev 139481)
@@ -45,9 +45,9 @@
// Declare all of the functions because they tend to do forward calls.
inline void checkOffset(PropertyOffset);
-inline void checkOffset(PropertyOffset, PropertyOffset inlineCapacity);
+inline void checkOffset(PropertyOffset, int inlineCapacity);
inline void validateOffset(PropertyOffset);
-inline void validateOffset(PropertyOffset, PropertyOffset inlineCapacity);
+inline void validateOffset(PropertyOffset, int inlineCapacity);
inline bool isValidOffset(PropertyOffset);
inline bool isInlineOffset(PropertyOffset);
inline bool isOutOfLineOffset(PropertyOffset);
@@ -55,7 +55,7 @@
inline size_t offsetInOutOfLineStorage(PropertyOffset);
inline size_t offsetInRespectiveStorage(PropertyOffset);
inline size_t numberOfOutOfLineSlotsForLastOffset(PropertyOffset);
-inline size_t numberOfSlotsForLastOffset(PropertyOffset, PropertyOffset inlineCapacity);
+inline size_t numberOfSlotsForLastOffset(PropertyOffset, int inlineCapacity);
inline void checkOffset(PropertyOffset offset)
{
@@ -63,7 +63,7 @@
ASSERT(offset >= invalidOffset);
}
-inline void checkOffset(PropertyOffset offset, PropertyOffset inlineCapacity)
+inline void checkOffset(PropertyOffset offset, int inlineCapacity)
{
UNUSED_PARAM(offset);
UNUSED_PARAM(inlineCapacity);
@@ -79,7 +79,7 @@
ASSERT(isValidOffset(offset));
}
-inline void validateOffset(PropertyOffset offset, PropertyOffset inlineCapacity)
+inline void validateOffset(PropertyOffset offset, int inlineCapacity)
{
checkOffset(offset, inlineCapacity);
ASSERT(isValidOffset(offset));
@@ -132,7 +132,7 @@
return offset - firstOutOfLineOffset + 1;
}
-inline size_t numberOfSlotsForLastOffset(PropertyOffset offset, PropertyOffset inlineCapacity)
+inline size_t numberOfSlotsForLastOffset(PropertyOffset offset, int inlineCapacity)
{
checkOffset(offset, inlineCapacity);
if (offset < inlineCapacity)
@@ -140,7 +140,7 @@
return inlineCapacity + numberOfOutOfLineSlotsForLastOffset(offset);
}
-inline PropertyOffset propertyOffsetFor(PropertyOffset propertyNumber, PropertyOffset inlineCapacity)
+inline PropertyOffset offsetForPropertyNumber(int propertyNumber, int inlineCapacity)
{
PropertyOffset offset = propertyNumber;
if (offset >= inlineCapacity) {
Modified: trunk/Source/_javascript_Core/runtime/Structure.cpp (139480 => 139481)
--- trunk/Source/_javascript_Core/runtime/Structure.cpp 2013-01-11 20:06:20 UTC (rev 139480)
+++ trunk/Source/_javascript_Core/runtime/Structure.cpp 2013-01-11 20:13:21 UTC (rev 139481)
@@ -635,12 +635,12 @@
PropertyTable::iterator end = m_propertyTable->end();
for (PropertyTable::iterator iter = m_propertyTable->begin(); iter != end; ++iter, ++i) {
values[i] = object->getDirectOffset(iter->offset);
- iter->offset = propertyOffsetFor(i, m_inlineCapacity);
+ iter->offset = offsetForPropertyNumber(i, m_inlineCapacity);
}
// Copies in our values to their compacted locations.
for (unsigned i = 0; i < propertyCount; i++)
- object->putDirectOffset(globalData, propertyOffsetFor(i, m_inlineCapacity), values[i]);
+ object->putDirectOffset(globalData, offsetForPropertyNumber(i, m_inlineCapacity), values[i]);
m_propertyTable->clearDeletedOffsets();
}
Modified: trunk/Source/_javascript_Core/runtime/Structure.h (139480 => 139481)
--- trunk/Source/_javascript_Core/runtime/Structure.h 2013-01-11 20:06:20 UTC (rev 139480)
+++ trunk/Source/_javascript_Core/runtime/Structure.h 2013-01-11 20:13:21 UTC (rev 139481)
@@ -238,7 +238,7 @@
PropertyOffset lastValidOffset() const
{
if (m_propertyTable)
- return propertyOffsetFor(m_propertyTable->propertyStorageSize() - 1, m_inlineCapacity);
+ return offsetForPropertyNumber(m_propertyTable->propertyStorageSize() - 1, m_inlineCapacity);
return m_offset;
}
bool isValidOffset(PropertyOffset offset) const