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) {
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user