Refactored all OP_ functions to vm/CATEGORY/ and renamed the files.
This commit is contained in:
parent
108be8c41e
commit
50a91d0b6f
67 changed files with 91 additions and 92 deletions
|
|
@ -1,11 +0,0 @@
|
|||
case OP_SWAP: {
|
||||
if (vm->sp < 1) {
|
||||
fprintf(stderr, "Runtime error: stack underflow for SWAP\n");
|
||||
exit(1);
|
||||
}
|
||||
Value a = vm->stack[vm->sp];
|
||||
Value b = vm->stack[vm->sp - 1];
|
||||
vm->stack[vm->sp] = b;
|
||||
vm->stack[vm->sp - 1] = a;
|
||||
break;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue