diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-24 19:30:09 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-24 19:30:09 +0100 |
commit | bc47478d855b08023409dbfc8550958991265c14 (patch) | |
tree | 804e45dd6b57917ccaf4d64832909061738b41e4 /dis.c | |
parent | bea93dc98b602472bb36635dfdf425d14d826673 (diff) |
keep track of stack position while compiling
Diffstat (limited to 'dis.c')
-rw-r--r-- | dis.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: { |