aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode/vm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytecode/vm.h')
-rwxr-xr-xsrc/bytecode/vm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bytecode/vm.h b/src/bytecode/vm.h
index 63eedfa..d654e2c 100755
--- a/src/bytecode/vm.h
+++ b/src/bytecode/vm.h
@@ -64,7 +64,8 @@ vm_reset(VM *vm) {
64 .value = ERR_WRONG_ARG_TYPE, \ 64 .value = ERR_WRONG_ARG_TYPE, \
65 .line = frame->chunk->lines[vm->pc - frame->chunk->code - 1].line, \ 65 .line = frame->chunk->lines[vm->pc - frame->chunk->code - 1].line, \
66 .col = frame->chunk->lines[vm->pc - frame->chunk->code - 1].col, \ 66 .col = frame->chunk->lines[vm->pc - frame->chunk->code - 1].col, \
67 }) 67 }); \
68 return
68 69
69#define SYMBOL_NOT_FOUND_ERR() \ 70#define SYMBOL_NOT_FOUND_ERR() \
70 error_push((Error){ \ 71 error_push((Error){ \
@@ -268,6 +269,9 @@ vm_interpret(VM *vm) {
268 array_head(vm->frames)->size--; 269 array_head(vm->frames)->size--;
269 frame = &vm->frames[array_size(vm->frames) - 1]; 270 frame = &vm->frames[array_size(vm->frames) - 1];
270 } break; 271 } break;
272 case OP_DROP: {
273 array_head(vm->stack)->size = 0;
274 } break;
271 default: { 275 default: {
272 error_push((Error){ 276 error_push((Error){
273 .type = ERR_TYPE_RUNTIME, 277 .type = ERR_TYPE_RUNTIME,