mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
wasm gc: fix issue with function numbering in disassembler
This commit is contained in:
parent
cb1f3c6dfc
commit
8ba4f9c30b
|
@ -85,15 +85,18 @@ public final class Disassembler {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public Consumer<byte[]> getSectionConsumer(int code, int pos, NameProvider nameProvider) {
|
ImportListenerImpl importListener = new ImportListenerImpl();
|
||||||
var importListener = new ImportSectionListener() {
|
|
||||||
int count;
|
|
||||||
|
|
||||||
@Override
|
static class ImportListenerImpl implements ImportSectionListener {
|
||||||
public void function(int typeIndex) {
|
int count;
|
||||||
++count;
|
|
||||||
}
|
@Override
|
||||||
};
|
public void function(int typeIndex) {
|
||||||
|
++count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Consumer<byte[]> getSectionConsumer(int code, int pos, NameProvider nameProvider) {
|
||||||
if (code == 1) {
|
if (code == 1) {
|
||||||
return bytes -> {
|
return bytes -> {
|
||||||
writer.write("(; type section size: " + bytes.length + " ;)").eol();
|
writer.write("(; type section size: " + bytes.length + " ;)").eol();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user