From bc47478d855b08023409dbfc8550958991265c14 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Mon, 24 Jun 2024 19:30:09 +0100 Subject: keep track of stack position while compiling --- dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dis.c') diff --git a/dis.c b/dis.c index 0b22ac3..0b1d322 100644 --- a/dis.c +++ b/dis.c @@ -24,7 +24,7 @@ size_t disasm_instr(Chunk *ch, size_t ip) { static size_t disasm_instr_h(Chunk *ch, size_t ip, int depth) { size_t orig_ip = ip; uint8_t instr = ch->bc.d[ip]; - printf("%*s%04zd\t",depth,"",ip); + printf("%*s%04zd\t%3d ",depth,"",ip,instr); ip ++; switch (instr) { case OP_LOADK: { -- cgit v1.2.3