mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
LibWasm: Print the block type for structured arguments
This commit is contained in:
parent
76ed7f2b20
commit
d471405caf
1 changed files with 7 additions and 1 deletions
|
@ -434,7 +434,13 @@ void Printer::print(Wasm::Instruction const& instruction)
|
||||||
[&](TableIndex const& index) { print("(table index {})", index.value()); },
|
[&](TableIndex const& index) { print("(table index {})", index.value()); },
|
||||||
[&](Instruction::IndirectCallArgs const& args) { print("(indirect (type index {}) (table index {}))", args.type.value(), args.table.value()); },
|
[&](Instruction::IndirectCallArgs const& args) { print("(indirect (type index {}) (table index {}))", args.type.value(), args.table.value()); },
|
||||||
[&](Instruction::MemoryArgument const& args) { print("(memory (align {}) (offset {}))", args.align, args.offset); },
|
[&](Instruction::MemoryArgument const& args) { print("(memory (align {}) (offset {}))", args.align, args.offset); },
|
||||||
[&](Instruction::StructuredInstructionArgs const& args) { print("(structured (else {}) (end {}))", args.else_ip.has_value() ? String::number(args.else_ip->value()) : "(none)", args.end_ip.value()); },
|
[&](Instruction::StructuredInstructionArgs const& args) {
|
||||||
|
print("(structured\n");
|
||||||
|
TemporaryChange change { m_indent, m_indent + 1 };
|
||||||
|
print(args.block_type);
|
||||||
|
print_indent();
|
||||||
|
print("(else {}) (end {}))", args.else_ip.has_value() ? String::number(args.else_ip->value()) : "(none)", args.end_ip.value());
|
||||||
|
},
|
||||||
[&](Instruction::TableBranchArgs const& args) {
|
[&](Instruction::TableBranchArgs const& args) {
|
||||||
print("(table_branch");
|
print("(table_branch");
|
||||||
for (auto& label : args.labels)
|
for (auto& label : args.labels)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue