ladybird/Userland/Libraries/LibJS/Bytecode/Executable.cpp
Andreas Kling da77e2aa4f LibJS: Add Bytecode::Executable::dump()
Let's have a helper for producing a consistent executable dump instead
of repeating the logic in multiple places.
2021-10-24 17:18:05 +02:00

21 lines
369 B
C++

/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Bytecode/Executable.h>
namespace JS::Bytecode {
void Executable::dump() const
{
for (auto& block : basic_blocks)
block.dump(*this);
if (!string_table->is_empty()) {
outln();
string_table->dump();
}
}
}