1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibJS: Include executable name in bytecode dumps

This commit is contained in:
Andreas Kling 2021-10-24 14:33:56 +02:00
parent c95dde971b
commit f75d78f56a
6 changed files with 16 additions and 6 deletions

View file

@ -337,6 +337,7 @@ inline JSFileResult TestRunner::run_file_test(const String& test_path)
if (g_run_bytecode) {
auto executable = JS::Bytecode::Generator::generate(m_test_script->parse_node());
executable.name = test_path;
if (JS::Bytecode::g_dump_bytecode)
executable.dump();
JS::Bytecode::Interpreter bytecode_interpreter(interpreter->global_object(), interpreter->realm());
@ -352,6 +353,7 @@ inline JSFileResult TestRunner::run_file_test(const String& test_path)
return { test_path, file_script.error() };
if (g_run_bytecode) {
auto executable = JS::Bytecode::Generator::generate(file_script.value()->parse_node());
executable.name = test_path;
if (JS::Bytecode::g_dump_bytecode)
executable.dump();
JS::Bytecode::Interpreter bytecode_interpreter(interpreter->global_object(), interpreter->realm());