LibJS: Add missing length() method for NewArray

This commit is contained in:
Gunnar Beutner 2021-06-12 05:49:09 +02:00 committed by Andreas Kling
parent 633f604c47
commit 6a78b44c22

View file

@ -184,6 +184,8 @@ public:
void execute(Bytecode::Interpreter&) const;
String to_string(Bytecode::Executable const&) const;
size_t length() const { return sizeof(*this) + sizeof(Register) * m_element_count; }
private:
size_t m_element_count { 0 };
Register m_elements[];