mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:07:35 +00:00
LibJS: Add missing length() method for NewArray
This commit is contained in:
parent
633f604c47
commit
6a78b44c22
1 changed files with 2 additions and 0 deletions
|
@ -184,6 +184,8 @@ public:
|
||||||
void execute(Bytecode::Interpreter&) const;
|
void execute(Bytecode::Interpreter&) const;
|
||||||
String to_string(Bytecode::Executable const&) const;
|
String to_string(Bytecode::Executable const&) const;
|
||||||
|
|
||||||
|
size_t length() const { return sizeof(*this) + sizeof(Register) * m_element_count; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t m_element_count { 0 };
|
size_t m_element_count { 0 };
|
||||||
Register m_elements[];
|
Register m_elements[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue