summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h')
-rw-r--r--Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h b/Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h
index 22785ce24..e1d893b0b 100644
--- a/Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h
+++ b/Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h
@@ -42,17 +42,10 @@ inline size_t IndexingHeader::preCapacity(Structure* structure)
inline size_t IndexingHeader::indexingPayloadSizeInBytes(Structure* structure)
{
- switch (structure->indexingType()) {
- case ALL_CONTIGUOUS_INDEXING_TYPES:
- return vectorLength() * sizeof(EncodedJSValue);
-
- case ALL_ARRAY_STORAGE_INDEXING_TYPES:
- return ArrayStorage::sizeFor(arrayStorage()->vectorLength());
-
- default:
- ASSERT(!hasIndexedProperties(structure->indexingType()));
+ if (LIKELY(!hasArrayStorage(structure->indexingType())))
return 0;
- }
+
+ return ArrayStorage::sizeFor(arrayStorage()->vectorLength());
}
} // namespace JSC