summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Bytecode/Op.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode/Op.h')
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Op.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Op.h b/Userland/Libraries/LibJS/Bytecode/Op.h
index 73e792c1df..e270003ee9 100644
--- a/Userland/Libraries/LibJS/Bytecode/Op.h
+++ b/Userland/Libraries/LibJS/Bytecode/Op.h
@@ -14,6 +14,7 @@
#include <LibJS/Bytecode/Register.h>
#include <LibJS/Bytecode/StringTable.h>
#include <LibJS/Heap/Cell.h>
+#include <LibJS/Runtime/ScopeObject.h>
#include <LibJS/Runtime/Value.h>
namespace JS::Bytecode::Op {
@@ -453,6 +454,19 @@ public:
private:
Label m_resume_target;
};
+
+class PushLexicalEnvironment final : public Instruction {
+public:
+ PushLexicalEnvironment(HashMap<u32, Variable> variables)
+ : Instruction(Type::PushLexicalEnvironment)
+ , m_variables(move(variables))
+ {
+ }
+ void execute(Bytecode::Interpreter&) const;
+ String to_string(Bytecode::Executable const&) const;
+
+ HashMap<u32, Variable> m_variables;
+};
}
namespace JS::Bytecode {