diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index d5934759d9..492fa85874 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -217,7 +217,9 @@ Bytecode::PassManager& Interpreter::optimization_pipeline(Interpreter::Optimizat return *entry; auto pm = make(); - if (level == OptimizationLevel::Default) { + if (level == OptimizationLevel::None) { + // No optimization. + } else if (level == OptimizationLevel::Optimize) { pm->add(); pm->add(); pm->add(); diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.h b/Userland/Libraries/LibJS/Bytecode/Interpreter.h index eafa76e6db..82883ced7f 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.h +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.h @@ -66,8 +66,10 @@ public: Executable const& current_executable() { return *m_current_executable; } enum class OptimizationLevel { - Default, + None, + Optimize, __Count, + Default = None, }; static Bytecode::PassManager& optimization_pipeline(OptimizationLevel = OptimizationLevel::Default);