srctree

Robin Linden parent 75b966e6 c08bd96b
wasm: Dump function idx -> type idx mapping in example

inlinesplit
wasm/wasm_example.cpp added: 8, removed: 1, total 7
@@ -90,6 +90,13 @@ int main(int argc, char **argv) {
}
}
 
if (auto const &function_section = module->function_section()) {
std::cout << "\n# Function idx -> type idx\n";
for (std::size_t i = 0; i < function_section->type_indices.size(); ++i) {
std::cout << i << " -> " << function_section->type_indices[i] << '\n';
}
}
 
if (auto const &export_section = module->export_section()) {
std::cout << "\n# Exports\n";
for (auto const &e : export_section->exports) {