wasm gc: fix issue with function numbering in disassembler

This commit is contained in:
Alexey Andreev 2024-08-29 21:24:14 +02:00
parent cb1f3c6dfc
commit 8ba4f9c30b

View File

@ -85,15 +85,18 @@ public final class Disassembler {
};
}
public Consumer<byte[]> getSectionConsumer(int code, int pos, NameProvider nameProvider) {
var importListener = new ImportSectionListener() {
ImportListenerImpl importListener = new ImportListenerImpl();
static class ImportListenerImpl implements ImportSectionListener {
int count;
@Override
public void function(int typeIndex) {
++count;
}
};
}
public Consumer<byte[]> getSectionConsumer(int code, int pos, NameProvider nameProvider) {
if (code == 1) {
return bytes -> {
writer.write("(; type section size: " + bytes.length + " ;)").eol();