/* * Copyright (c) 2021, Idan Horowitz * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace JS { class Set : public Object { JS_OBJECT(Set, Object); public: static Set* create(GlobalObject&); explicit Set(Object& prototype); virtual ~Set() override; HashTable const& values() const { return m_values; }; HashTable& values() { return m_values; }; private: virtual void visit_edges(Visitor& visitor) override; HashTable m_values; // FIXME: Replace with a HashTable that maintains a linked list of insertion order for correct iteration order }; }