summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/Object.h
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Runtime/Object.h')
-rw-r--r--Libraries/LibJS/Runtime/Object.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Libraries/LibJS/Runtime/Object.h b/Libraries/LibJS/Runtime/Object.h
index f47b35ac72..529fdb92cc 100644
--- a/Libraries/LibJS/Runtime/Object.h
+++ b/Libraries/LibJS/Runtime/Object.h
@@ -43,7 +43,10 @@ public:
Shape& shape() { return *m_shape; }
const Shape& shape() const { return *m_shape; }
+ Optional<Value> get_by_index(i32 property_index) const;
Optional<Value> get(const FlyString& property_name) const;
+
+ void put_by_index(i32 property_index, Value);
void put(const FlyString& property_name, Value);
virtual Optional<Value> get_own_property(const Object& this_object, const FlyString& property_name) const;
@@ -81,11 +84,15 @@ public:
Value get_direct(size_t index) const { return m_storage[index]; }
+ const Vector<Value>& elements() const { return m_elements; }
+ Vector<Value>& elements() { return m_elements; }
+
private:
void set_shape(Shape&);
Shape* m_shape { nullptr };
Vector<Value> m_storage;
+ Vector<Value> m_elements;
};
}