mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
LibJS: Create static unwind mappings for BasicBlock
s
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:
parent
647f0ccd3f
commit
73f347b75c
Notes:
sideshowbarker
2024-07-17 14:36:19 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 73f347b75c
Pull-request: https://github.com/SerenityOS/serenity/pull/21653
6 changed files with 92 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue