LibJS: Remove JS_BYTECODE_DEBUG

Remove the stale bytecode execution debug hook from Interpreter.cpp now
that bytecode dispatch always enters AsmInt directly. The remaining
bytecode dump flag is separate and still used by parser/codegen paths.
This commit is contained in:
Andreas Kling 2026-06-14 14:17:38 +02:00 committed by Andreas Kling
parent 8fee268851
commit 97a6807ffa
3 changed files with 0 additions and 22 deletions

View file

@ -134,10 +134,6 @@
# cmakedefine01 IMAGE_LOADER_DEBUG # cmakedefine01 IMAGE_LOADER_DEBUG
#endif #endif
#ifndef JS_BYTECODE_DEBUG
# cmakedefine01 JS_BYTECODE_DEBUG
#endif
#ifndef JS_MODULE_DEBUG #ifndef JS_MODULE_DEBUG
# cmakedefine01 JS_MODULE_DEBUG # cmakedefine01 JS_MODULE_DEBUG
#endif #endif

View file

@ -5,7 +5,6 @@
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
#include <AK/Debug.h>
#include <AK/TemporaryChange.h> #include <AK/TemporaryChange.h>
#include <LibJS/Bytecode/Debug.h> #include <LibJS/Bytecode/Debug.h>
#include <LibJS/Bytecode/FormatOperand.h> #include <LibJS/Bytecode/FormatOperand.h>
@ -277,8 +276,6 @@ DeclarativeEnvironment& VM::global_declarative_environment()
ThrowCompletionOr<Value> VM::run_executable(ExecutionContext& context, Executable& executable, u32 entry_point) ThrowCompletionOr<Value> VM::run_executable(ExecutionContext& context, Executable& executable, u32 entry_point)
{ {
dbgln_if(JS_BYTECODE_DEBUG, "VM will run bytecode unit {}", &executable);
auto const is_outermost_bytecode_execution = m_run_executable_depth == 0; auto const is_outermost_bytecode_execution = m_run_executable_depth == 0;
TemporaryChange restore_run_executable_depth { m_run_executable_depth, m_run_executable_depth + 1 }; TemporaryChange restore_run_executable_depth { m_run_executable_depth, m_run_executable_depth + 1 };
@ -309,20 +306,6 @@ ThrowCompletionOr<Value> VM::run_executable(ExecutionContext& context, Executabl
asm_interpreter_entry(bytecode, entry_point, values, this); asm_interpreter_entry(bytecode, entry_point, values, this);
} }
dbgln_if(JS_BYTECODE_DEBUG, "VM did run bytecode unit {}", context.executable);
if constexpr (JS_BYTECODE_DEBUG) {
auto* values = context.registers_and_constants_and_locals_and_arguments();
for (size_t i = 0; i < executable.number_of_registers; ++i) {
String value_string;
if (values[i].is_special_empty_value())
value_string = "(empty)"_string;
else
value_string = values[i].to_string_without_side_effects();
dbgln("[{:3}] {}", i, value_string);
}
}
if (is_outermost_bytecode_execution && !vm().is_executing_module()) if (is_outermost_bytecode_execution && !vm().is_executing_module())
vm().run_queued_promise_jobs(); vm().run_queued_promise_jobs();
vm().finish_execution_generation(); vm().finish_execution_generation();

View file

@ -30,7 +30,6 @@ set(IDB_DEBUG ON)
set(IDL_DEBUG ON) set(IDL_DEBUG ON)
set(IMAGE_DECODER_DEBUG ON) set(IMAGE_DECODER_DEBUG ON)
set(IMAGE_LOADER_DEBUG ON) set(IMAGE_LOADER_DEBUG ON)
set(JS_BYTECODE_DEBUG ON)
set(JS_MODULE_DEBUG ON) set(JS_MODULE_DEBUG ON)
set(LADYBIRD_SESSION_HISTORY_DEBUG ON) set(LADYBIRD_SESSION_HISTORY_DEBUG ON)
set(LEXER_DEBUG ON) set(LEXER_DEBUG ON)