Procházet zdrojové kódy

js: Force optimizations when setting the -p flag

Hendiadyoin1 před 2 roky
rodič
revize
35db0c5e18
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Userland/Utilities/js.cpp

+ 1 - 1
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());
             }