summaryrefslogtreecommitdiff
path: root/dis.c
diff options
context:
space:
mode:
Diffstat (limited to 'dis.c')
-rw-r--r--dis.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/dis.c b/dis.c
index 0b1d322..6827be0 100644
--- a/dis.c
+++ b/dis.c
@@ -39,6 +39,11 @@ static size_t disasm_instr_h(Chunk *ch, size_t ip, int depth) {
print_const(ch, ix);
break;
}
+ case OP_GETLOCAL: {
+ uint8_t ix = ch->bc.d[ip++];
+ printf("getlocal #%d\n",ix);
+ break;
+ }
case OP_SETGLOBAL: {
uint8_t ix = ch->bc.d[ip++];
printf("setglobal #%d\t; ",ix);
@@ -50,6 +55,11 @@ static size_t disasm_instr_h(Chunk *ch, size_t ip, int depth) {
printf("call #%hhu\n",nargs);
break;
}
+ case OP_ENDSCOPE: {
+ uint8_t nlocals = ch->bc.d[ip++];
+ printf("endscope #%hhu\n",nlocals);
+ break;
+ }
#define RSHORT() (uint16_t)( ch->bc.d[ip-2] | ch->bc.d[ip-1] << 8 )
case OP_SKIP: {
ip += 2;