mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
LibJS: Make MarkedValueList copyable and move assignable
This is required to store a MarkedValueList as the value of a HashMap.
This commit is contained in:
parent
c97244d3a5
commit
4a14455dff
3 changed files with 29 additions and 16 deletions
|
@ -15,26 +15,18 @@
|
|||
namespace JS {
|
||||
|
||||
class MarkedValueList : public Vector<Value, 32> {
|
||||
AK_MAKE_NONCOPYABLE(MarkedValueList);
|
||||
|
||||
public:
|
||||
explicit MarkedValueList(Heap&);
|
||||
MarkedValueList(MarkedValueList const&);
|
||||
MarkedValueList(MarkedValueList&&);
|
||||
~MarkedValueList();
|
||||
|
||||
MarkedValueList& operator=(MarkedValueList&&) = delete;
|
||||
|
||||
Vector<Value, 32>& values() { return *this; }
|
||||
|
||||
MarkedValueList copy() const
|
||||
{
|
||||
MarkedValueList copy { m_heap };
|
||||
copy.extend(*this);
|
||||
return copy;
|
||||
}
|
||||
MarkedValueList& operator=(JS::MarkedValueList const& other);
|
||||
|
||||
private:
|
||||
Heap& m_heap;
|
||||
Heap* m_heap;
|
||||
|
||||
IntrusiveListNode<MarkedValueList> m_list_node;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue