From 4d9dcf37fe9be82de8ed4359833f080e6dafb930 Mon Sep 17 00:00:00 2001 From: ancavar Date: Thu, 22 Oct 2026 19:02:16 +0300 Subject: [PATCH] add missing `disasm.h` --- virtual_machine/disasm.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 virtual_machine/disasm.h diff --git a/virtual_machine/disasm.h b/virtual_machine/disasm.h new file mode 100644 index 000000000..f963bee18 --- /dev/null +++ b/virtual_machine/disasm.h @@ -0,0 +1,16 @@ +#ifndef DISASM_H +#define DISASM_H + +#include "bytecode.h" +#include + +/* Disassemble all public symbols in bc, writing output to f. + Returns 0 on success, -1 on error. */ +int disasm(const bytecode *bc, FILE *f); + +/* Disassemble a single function starting at code_offset within bc->code, + writing output to f. name may be NULL. */ +int disasm_func(const bytecode *bc, size_t code_offset, const char *name, + uint8_t flag, FILE *f); + +#endif /* DISASM_H */