summaryrefslogtreecommitdiff
path: root/Userland/Utilities/js.cpp
diff options
context:
space:
mode:
authorHendiadyoin1 <leon.a@serenityos.org>2022-11-02 14:27:43 +0100
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-12-03 17:07:30 +0330
commit35db0c5e18ddb5057dc13be632c78bddc4aecfb2 (patch)
tree4b18069c9b6deadd806299e4fa35896846a82516 /Userland/Utilities/js.cpp
parent0fc673e759e7bbb1b0918c8e245eaa835dd280c5 (diff)
downloadserenity-35db0c5e18ddb5057dc13be632c78bddc4aecfb2.zip
js: Force optimizations when setting the -p flag
Diffstat (limited to 'Userland/Utilities/js.cpp')
-rw-r--r--Userland/Utilities/js.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp
index 692dae17aa..81db1da132 100644
--- a/Userland/Utilities/js.cpp
+++ b/Userland/Utilities/js.cpp
@@ -234,7 +234,7 @@ static ErrorOr<bool> parse_and_run(JS::Interpreter& interpreter, StringView sour
auto executable = executable_result.release_value();
executable->name = source_name;
if (s_opt_bytecode) {
- auto& passes = JS::Bytecode::Interpreter::optimization_pipeline();
+ auto& passes = JS::Bytecode::Interpreter::optimization_pipeline(JS::Bytecode::Interpreter::OptimizationLevel::Optimize);
passes.perform(*executable);
dbgln("Optimisation passes took {}us", passes.elapsed());
}