mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05: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;
|
||||
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[];
|
||||
|
|
Loading…
Add table
Reference in a new issue