diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/PropertyOffset.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/PropertyOffset.h | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/runtime/PropertyOffset.h b/Source/JavaScriptCore/runtime/PropertyOffset.h index 1a2bba446..dc0297bf7 100644 --- a/Source/JavaScriptCore/runtime/PropertyOffset.h +++ b/Source/JavaScriptCore/runtime/PropertyOffset.h @@ -28,16 +28,9 @@ #include <wtf/Platform.h> #include <wtf/StdLibExtras.h> -#include <wtf/UnusedParam.h> namespace JSC { -#if USE(JSVALUE32_64) -#define INLINE_STORAGE_CAPACITY 7 -#else -#define INLINE_STORAGE_CAPACITY 6 -#endif - typedef int PropertyOffset; static const PropertyOffset invalidOffset = -1; @@ -45,9 +38,9 @@ static const PropertyOffset firstOutOfLineOffset = 100; // 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 +48,7 @@ inline size_t offsetInInlineStorage(PropertyOffset); 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 +56,7 @@ inline void checkOffset(PropertyOffset offset) 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 +72,7 @@ inline void validateOffset(PropertyOffset offset) 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 +125,7 @@ inline size_t numberOfOutOfLineSlotsForLastOffset(PropertyOffset offset) 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 +133,7 @@ inline size_t numberOfSlotsForLastOffset(PropertyOffset offset, PropertyOffset i return inlineCapacity + numberOfOutOfLineSlotsForLastOffset(offset); } -inline PropertyOffset propertyOffsetFor(PropertyOffset propertyNumber, PropertyOffset inlineCapacity) +inline PropertyOffset offsetForPropertyNumber(int propertyNumber, int inlineCapacity) { PropertyOffset offset = propertyNumber; if (offset >= inlineCapacity) { |