From a14bf1188c4cee23db44a590ada52aa8778a2a3f Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 25 Jun 2024 16:24:29 +0100 Subject: add setting locals --- dis.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dis.c') diff --git a/dis.c b/dis.c index 6827be0..193f410 100644 --- a/dis.c +++ b/dis.c @@ -44,6 +44,11 @@ static size_t disasm_instr_h(Chunk *ch, size_t ip, int depth) { printf("getlocal #%d\n",ix); break; } + case OP_SETLOCAL: { + uint8_t ix = ch->bc.d[ip++]; + printf("setlocal #%d\n",ix); + break; + } case OP_SETGLOBAL: { uint8_t ix = ch->bc.d[ip++]; printf("setglobal #%d\t; ",ix); -- cgit v1.2.3