diff --git a/Tests/LibJS/test-js.cpp b/Tests/LibJS/test-js.cpp index 39753f4946a..1c4e4d7213a 100644 --- a/Tests/LibJS/test-js.cpp +++ b/Tests/LibJS/test-js.cpp @@ -14,7 +14,8 @@ TESTJS_PROGRAM_FLAG(test262_parser_tests, "Run test262 parser tests", "test262-p TESTJS_GLOBAL_FUNCTION(is_bytecode_interpreter_enabled, isBytecodeInterpreterEnabled, 0) { - return JS::Value(JS::Bytecode::Interpreter::enabled()); + // FIXME: Remove this function after updating the tests. + return JS::Value(true); } TESTJS_GLOBAL_FUNCTION(is_strict_mode, isStrictMode, 0) diff --git a/Tests/LibJS/test262-runner.cpp b/Tests/LibJS/test262-runner.cpp index 56a63d45ff7..003f7d9a0e1 100644 --- a/Tests/LibJS/test262-runner.cpp +++ b/Tests/LibJS/test262-runner.cpp @@ -575,8 +575,6 @@ int main(int argc, char** argv) args_parser.add_option(disable_core_dumping, "Disable core dumping", "disable-core-dump", 0); args_parser.parse(arguments); - JS::Bytecode::Interpreter::set_enabled(true); - #if !defined(AK_OS_MACOS) && !defined(AK_OS_EMSCRIPTEN) if (disable_core_dumping && prctl(PR_SET_DUMPABLE, 0, 0) < 0) { perror("prctl(PR_SET_DUMPABLE)"); diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index edf597041b1..34baa333ccb 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -19,18 +19,6 @@ namespace JS::Bytecode { -static bool s_bytecode_interpreter_enabled = false; - -bool Interpreter::enabled() -{ - return s_bytecode_interpreter_enabled; -} - -void Interpreter::set_enabled(bool enabled) -{ - s_bytecode_interpreter_enabled = enabled; -} - bool g_dump_bytecode = false; Interpreter::Interpreter(VM& vm) diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.h b/Userland/Libraries/LibJS/Bytecode/Interpreter.h index 6696ce46c77..f1995716b42 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.h +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.h @@ -36,9 +36,6 @@ struct CallFrame { class Interpreter { public: - [[nodiscard]] static bool enabled(); - static void set_enabled(bool); - explicit Interpreter(VM&); ~Interpreter(); diff --git a/Userland/Libraries/LibJS/Runtime/VM.cpp b/Userland/Libraries/LibJS/Runtime/VM.cpp index 43b26dc6099..2ca6f2c6073 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.cpp +++ b/Userland/Libraries/LibJS/Runtime/VM.cpp @@ -208,8 +208,6 @@ Bytecode::Interpreter& VM::bytecode_interpreter() Bytecode::Interpreter* VM::bytecode_interpreter_if_exists() { - if (!Bytecode::Interpreter::enabled()) - return nullptr; return m_bytecode_interpreter; } diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp b/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp index 510e4d16730..314576847f7 100644 --- a/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp +++ b/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp @@ -134,8 +134,6 @@ int main(int argc, char** argv) AK::set_debug_enabled(false); } - JS::Bytecode::Interpreter::set_enabled(true); - DeprecatedString test_root; if (!specified_test_root.is_empty()) { diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 95cdbca9881..29525c21c02 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -576,8 +576,6 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_positional_argument(script_paths, "Path to script files", "scripts", Core::ArgsParser::Required::No); args_parser.parse(arguments); - JS::Bytecode::Interpreter::set_enabled(true); - bool syntax_highlight = !disable_syntax_highlight; AK::set_debug_enabled(!disable_debug_printing);