1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

LibJS: Move bytecode debug spam behind JS_BYTECODE_DEBUG :^)

This commit is contained in:
Andreas Kling 2021-06-07 15:17:37 +02:00
parent e7d69c5d3c
commit 7cbe4daa7c
4 changed files with 23 additions and 11 deletions

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Debug.h>
#include <AK/Function.h>
#include <LibJS/AST.h>
#include <LibJS/Bytecode/Block.h>
@ -152,8 +153,10 @@ Value ScriptFunction::execute_function_body()
prepare_arguments();
auto block = Bytecode::Generator::generate(m_body);
VERIFY(block);
dbgln("Compiled Bytecode::Block for function '{}':", m_name);
block->dump();
if constexpr (JS_BYTECODE_DEBUG) {
dbgln("Compiled Bytecode::Block for function '{}':", m_name);
block->dump();
}
return bytecode_interpreter->run(*block);
} else {
OwnPtr<Interpreter> local_interpreter;