mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibJS: Create static unwind mappings for BasicBlocks
This is currently only used in the bytecode dump to annotate to where unwinds lead per block, but will be hooked up to the virtual machine in the next commit.
This commit is contained in:
committed by
Andreas Kling
parent
647f0ccd3f
commit
73f347b75c
@@ -33,8 +33,18 @@ BasicBlock::~BasicBlock()
|
||||
void BasicBlock::dump(Bytecode::Executable const& executable) const
|
||||
{
|
||||
Bytecode::InstructionStreamIterator it(instruction_stream());
|
||||
|
||||
if (!m_name.is_empty())
|
||||
warnln("{}:", m_name);
|
||||
warn("{}", m_name);
|
||||
if (m_handler || m_finalizer) {
|
||||
warn(" [");
|
||||
if (m_handler)
|
||||
warn(" Handler: {}", Label { *m_handler });
|
||||
if (m_finalizer)
|
||||
warn(" Finalizer: {}", Label { *m_finalizer });
|
||||
warn(" ]");
|
||||
}
|
||||
warnln(":");
|
||||
while (!it.at_end()) {
|
||||
warnln("[{:4x}] {}", it.offset(), (*it).to_deprecated_string(executable));
|
||||
++it;
|
||||
|
||||
Reference in New Issue
Block a user