Explorar o código

LibJS: Add IndexedProperties::storage() to access the underlying storage

This will be used in GetByValue and PutByValue fast paths.
Andreas Kling hai 1 ano
pai
achega
a3ee8ff377
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Userland/Libraries/LibJS/Runtime/IndexedProperties.h

+ 3 - 0
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<u32> indices() const;