From a3ee8ff3778c5f0f076d437dfebfa5e18be96abb Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 5 Oct 2023 08:59:59 +0200 Subject: [PATCH] LibJS: Add IndexedProperties::storage() to access the underlying storage This will be used in GetByValue and PutByValue fast paths. --- Userland/Libraries/LibJS/Runtime/IndexedProperties.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibJS/Runtime/IndexedProperties.h b/Userland/Libraries/LibJS/Runtime/IndexedProperties.h index b0a923a85e..a6bd758fab 100644 --- a/Userland/Libraries/LibJS/Runtime/IndexedProperties.h +++ b/Userland/Libraries/LibJS/Runtime/IndexedProperties.h @@ -138,6 +138,9 @@ public: size_t array_like_size() const { return m_storage ? m_storage->array_like_size() : 0; } bool set_array_like_size(size_t); + IndexedPropertyStorage* storage() { return m_storage; } + IndexedPropertyStorage const* storage() const { return m_storage; } + size_t real_size() const; Vector indices() const;