From 213b835b570411de372cc58012555c45f073b1e9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 26 Sep 2023 15:36:45 +0200 Subject: [PATCH] LibJS: Remove Bytecode::Interpreter::debug_position() This was only used in one place, and that place is already covered by a VERIFY anyway. --- Userland/Libraries/LibJS/Bytecode/Interpreter.cpp | 6 ------ Userland/Libraries/LibJS/Bytecode/Interpreter.h | 1 - Userland/Libraries/LibJS/Bytecode/Op.cpp | 5 ----- 3 files changed, 12 deletions(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index f531bb5258..2001d556e6 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -339,12 +339,6 @@ ThrowCompletionOr Interpreter::continue_pending_unwind(Label const& resume return {}; } -DeprecatedString Interpreter::debug_position() const -{ - auto offset = m_pc.has_value() ? m_pc->offset() : 0; - return DeprecatedString::formatted("{}:{:2}:{:4x}", m_current_executable->name, m_current_block->name(), offset); -} - ThrowCompletionOr> compile(VM& vm, ASTNode const& node, FunctionKind kind, DeprecatedFlyString const& name) { auto executable_result = Bytecode::Generator::generate(node, kind); diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.h b/Userland/Libraries/LibJS/Bytecode/Interpreter.h index 4729a2d8e7..fe9843494d 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.h +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.h @@ -88,7 +88,6 @@ public: Executable const& current_executable() const { return *m_current_executable; } BasicBlock const& current_block() const { return *m_current_block; } auto& instruction_stream_iterator() const { return m_pc; } - DeprecatedString debug_position() const; void visit_edges(Cell::Visitor&); diff --git a/Userland/Libraries/LibJS/Bytecode/Op.cpp b/Userland/Libraries/LibJS/Bytecode/Op.cpp index bafe87a65a..09e7b011be 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Op.cpp @@ -855,11 +855,6 @@ static MarkedVector argument_list_evaluation(Bytecode::Interpreter& inter MarkedVector argument_values { vm.heap() }; auto arguments = interpreter.accumulator(); - if (!(arguments.is_object() && is(arguments.as_object()))) { - dbgln("[{}] Call arguments are not an array, but: {}", interpreter.debug_position(), arguments.to_string_without_side_effects()); - interpreter.current_executable().dump(); - VERIFY_NOT_REACHED(); - } auto& argument_array = arguments.as_array(); auto array_length = argument_array.indexed_properties().array_like_size();