summaryrefslogtreecommitdiff
path: root/dis.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-24 19:30:09 +0100
committerubq323 <ubq323@ubq323.website>2024-06-24 19:30:09 +0100
commitbc47478d855b08023409dbfc8550958991265c14 (patch)
tree804e45dd6b57917ccaf4d64832909061738b41e4 /dis.c
parentbea93dc98b602472bb36635dfdf425d14d826673 (diff)
keep track of stack position while compiling
Diffstat (limited to 'dis.c')
-rw-r--r--dis.c2
1 files changed, 1 insertions, 1 deletions
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: {