summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Bytecode/Interpreter.h
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-02-11 22:38:21 +0330
committerLinus Groh <mail@linusgroh.de>2022-02-13 14:41:33 +0000
commitd7c207beb98e8ef27576bf3375beb483fdac7c6e (patch)
treec25f4836aa2b670d8a99f97452e9047fd2453b68 /Userland/Libraries/LibJS/Bytecode/Interpreter.h
parent8b279176034b76b40a4c00739fb68fd2c566afa1 (diff)
downloadserenity-d7c207beb98e8ef27576bf3375beb483fdac7c6e.zip
LibJS: Implement the NewClass opcode
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode/Interpreter.h')
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Interpreter.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.h b/Userland/Libraries/LibJS/Bytecode/Interpreter.h
index 7d5fcfd0c7..026a747df9 100644
--- a/Userland/Libraries/LibJS/Bytecode/Interpreter.h
+++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.h
@@ -13,6 +13,7 @@
#include <LibJS/Forward.h>
#include <LibJS/Heap/Cell.h>
#include <LibJS/Heap/Handle.h>
+#include <LibJS/Runtime/VM.h>
#include <LibJS/Runtime/Value.h>
namespace JS::Bytecode {
@@ -34,7 +35,7 @@ public:
ThrowCompletionOr<Value> run(Bytecode::Executable const& executable, Bytecode::BasicBlock const* entry_point = nullptr)
{
auto value_and_frame = run_and_return_frame(executable, entry_point);
- return value_and_frame.value;
+ return move(value_and_frame.value);
}
struct ValueAndFrame {
@@ -78,6 +79,8 @@ public:
};
static Bytecode::PassManager& optimization_pipeline(OptimizationLevel = OptimizationLevel::Default);
+ VM::InterpreterExecutionScope ast_interpreter_scope();
+
private:
RegisterWindow& registers() { return m_register_windows.last(); }
@@ -93,6 +96,7 @@ private:
Executable const* m_current_executable { nullptr };
Vector<UnwindInfo> m_unwind_contexts;
Handle<Value> m_saved_exception;
+ OwnPtr<JS::Interpreter> m_ast_interpreter;
};
extern bool g_dump_bytecode;