summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Bytecode/Interpreter.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode/Interpreter.h')
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Interpreter.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.h b/Userland/Libraries/LibJS/Bytecode/Interpreter.h
index 26b2dc9078..0dda59a99b 100644
--- a/Userland/Libraries/LibJS/Bytecode/Interpreter.h
+++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.h
@@ -7,6 +7,7 @@
#pragma once
#include "Generator.h"
+#include "PassManager.h"
#include <LibJS/Bytecode/Label.h>
#include <LibJS/Bytecode/Register.h>
#include <LibJS/Forward.h>
@@ -60,9 +61,17 @@ public:
Executable const& current_executable() { return *m_current_executable; }
+ enum class OptimizationLevel {
+ Default,
+ __Count,
+ };
+ static Bytecode::PassManager& optimization_pipeline(OptimizationLevel = OptimizationLevel::Default);
+
private:
RegisterWindow& registers() { return m_register_windows.last(); }
+ static AK::Array<OwnPtr<PassManager>, static_cast<UnderlyingType<Interpreter::OptimizationLevel>>(Interpreter::OptimizationLevel::__Count)> s_optimization_pipelines;
+
VM& m_vm;
GlobalObject& m_global_object;
NonnullOwnPtrVector<RegisterWindow> m_register_windows;