summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Op.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Op.h b/Userland/Libraries/LibJS/Bytecode/Op.h
index 79212526ea..c3bb8eff8b 100644
--- a/Userland/Libraries/LibJS/Bytecode/Op.h
+++ b/Userland/Libraries/LibJS/Bytecode/Op.h
@@ -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[];