summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-12-04 17:59:59 +0330
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-12-21 05:03:44 +0330
commitd471405caf3cce74d9ca5b30e425e996cb0cd8eb (patch)
treeda0b2ef61e74932e9a5a6fd42b8f37e35a17de87 /Userland/Libraries
parent76ed7f2b20637e3194a11113f284dc7b36a9725b (diff)
downloadserenity-d471405caf3cce74d9ca5b30e425e996cb0cd8eb.zip
LibWasm: Print the block type for structured arguments
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWasm/Printer/Printer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWasm/Printer/Printer.cpp b/Userland/Libraries/LibWasm/Printer/Printer.cpp
index 43411456f8..e9214ac953 100644
--- a/Userland/Libraries/LibWasm/Printer/Printer.cpp
+++ b/Userland/Libraries/LibWasm/Printer/Printer.cpp
@@ -434,7 +434,13 @@ void Printer::print(Wasm::Instruction const& instruction)
[&](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::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) {
print("(table_branch");
for (auto& label : args.labels)