From a4e969f4965059196ca948db781e52f7cfebf19e Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 24 May 2016 08:28:08 +0000 Subject: webkitgtk-2.12.3 --- Source/JavaScriptCore/runtime/ArrayStorage.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source/JavaScriptCore/runtime/ArrayStorage.h') diff --git a/Source/JavaScriptCore/runtime/ArrayStorage.h b/Source/JavaScriptCore/runtime/ArrayStorage.h index a0287c921..c93dc3bfd 100644 --- a/Source/JavaScriptCore/runtime/ArrayStorage.h +++ b/Source/JavaScriptCore/runtime/ArrayStorage.h @@ -32,7 +32,6 @@ #include "SparseArrayValueMap.h" #include "WriteBarrier.h" #include -#include namespace JSC { @@ -54,9 +53,10 @@ public: Butterfly* butterfly() { return reinterpret_cast(this); } IndexingHeader* indexingHeader() { return IndexingHeader::from(this); } + const IndexingHeader* indexingHeader() const { return IndexingHeader::from(this); } // We steal two fields from the indexing header: vectorLength and length. - unsigned length() { return indexingHeader()->publicLength(); } + unsigned length() const { return indexingHeader()->publicLength(); } void setLength(unsigned length) { indexingHeader()->setPublicLength(length); } unsigned vectorLength() { return indexingHeader()->vectorLength(); } void setVectorLength(unsigned length) { indexingHeader()->setVectorLength(length); } @@ -68,6 +68,11 @@ public: m_numValuesInVector = other.m_numValuesInVector; } + bool hasHoles() const + { + return m_numValuesInVector != length(); + } + bool inSparseMode() { return m_sparseMap && m_sparseMap->sparseMode(); -- cgit v1.2.1