diff options
Diffstat (limited to 'dis.c')
-rw-r--r-- | dis.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -30,7 +30,16 @@ void disasm_chunk(Chunk *ch) { println_val(k); break; } + case OP_SETGLOBAL: { + uint8_t ix = ch->bc.d[ip++]; + printf("setglobal #%d\t; ",ix); + Val k = ch->consts.d[ix]; + printf("%-4s : ",typename_str(k)); + println_val(k); + break; + } SIMPLE_INSTR(OP_PRINT, "print") + SIMPLE_INSTR(OP_DROP, "drop") SIMPLE_INSTR(OP_ADD, "add") SIMPLE_INSTR(OP_SUB, "sub") SIMPLE_INSTR(OP_MUL, "mul") |