1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:47:44 +00:00

test262-runner+js: Respect the bytecode optimizations enabled flag

This commit is contained in:
Daniel Bertalan 2023-06-26 19:50:33 +02:00 committed by Ali Mohammad Pur
parent aa0ed4ab4e
commit e012565898
4 changed files with 15 additions and 14 deletions

View file

@ -32,7 +32,6 @@
#endif
static DeprecatedString s_current_test = "";
static bool s_enable_bytecode_optimizations = false;
static bool s_parse_only = false;
static DeprecatedString s_harness_file_directory;
static bool s_automatic_harness_detection_mode = false;
@ -565,12 +564,13 @@ int main(int argc, char** argv)
bool enable_debug_printing = false;
bool disable_core_dumping = false;
bool use_bytecode = false;
bool enable_bytecode_optimizations = false;
Core::ArgsParser args_parser;
args_parser.set_general_help("LibJS test262 runner for streaming tests");
args_parser.add_option(s_harness_file_directory, "Directory containing the harness files", "harness-location", 'l', "harness-files");
args_parser.add_option(use_bytecode, "Use the bytecode interpreter", "use-bytecode", 'b');
args_parser.add_option(s_enable_bytecode_optimizations, "Enable the bytecode optimization passes", "enable-bytecode-optimizations", 'e');
args_parser.add_option(enable_bytecode_optimizations, "Enable the bytecode optimization passes", "enable-bytecode-optimizations", 'e');
args_parser.add_option(s_parse_only, "Only parse the files", "parse-only", 'p');
args_parser.add_option(timeout, "Seconds before test should timeout", "timeout", 't', "seconds");
args_parser.add_option(enable_debug_printing, "Enable debug printing", "debug", 'd');
@ -578,6 +578,7 @@ int main(int argc, char** argv)
args_parser.parse(arguments);
JS::Bytecode::Interpreter::set_enabled(use_bytecode);
JS::Bytecode::Interpreter::set_optimizations_enabled(enable_bytecode_optimizations);
#if !defined(AK_OS_MACOS) && !defined(AK_OS_EMSCRIPTEN)
if (disable_core_dumping && prctl(PR_SET_DUMPABLE, 0, 0) < 0) {