瀏覽代碼

LibJS/JIT: Only try JIT compilation when LIBJS_JIT is set in environment

Instead of adding a flag to everything everywhere, let's try using an
environment variable this time.
Andreas Kling 1 年之前
父節點
當前提交
8eba60d015
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibJS/JIT/Compiler.cpp

+ 1 - 1
Userland/Libraries/LibJS/JIT/Compiler.cpp

@@ -820,7 +820,7 @@ void Compiler::compile_set_variable(Bytecode::Op::SetVariable const& op)
 
 
 OwnPtr<NativeExecutable> Compiler::compile(Bytecode::Executable& bytecode_executable)
 OwnPtr<NativeExecutable> Compiler::compile(Bytecode::Executable& bytecode_executable)
 {
 {
-    if (getenv("LIBJS_NO_JIT"))
+    if (!getenv("LIBJS_JIT"))
         return nullptr;
         return nullptr;
 
 
     Compiler compiler { bytecode_executable };
     Compiler compiler { bytecode_executable };