From 83e256472ab4017dcc1bec8daf8a5d699e21449c Mon Sep 17 00:00:00 2001 From: python273 Date: Fri, 4 Oct 2024 23:47:39 +0400 Subject: [PATCH] wasm-decompile: add function index comments --- src/decompiler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/decompiler.cc b/src/decompiler.cc index 257de8362..26a2ce5e9 100644 --- a/src/decompiler.cc +++ b/src/decompiler.cc @@ -826,9 +826,9 @@ struct Decompiler { } } if (is_import) { - s += ";"; + s += cat("; // f", std::to_string(func_index)); } else { - s += " {\n"; + s += cat(" { // f", std::to_string(func_index), "\n"); auto val = DecompileExpr(ast.exp_stack[0], nullptr); IndentValue(val, indent_amount, {}); for (auto& stat : val.v) {