diff options
Diffstat (limited to 'src/bytecode/ops.h')
-rwxr-xr-x | src/bytecode/ops.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bytecode/ops.h b/src/bytecode/ops.h index b59d65a..348df84 100755 --- a/src/bytecode/ops.h +++ b/src/bytecode/ops.h | |||
@@ -2,20 +2,29 @@ | |||
2 | #define BDL_OPS_H | 2 | #define BDL_OPS_H |
3 | 3 | ||
4 | typedef enum Ops { | 4 | typedef enum Ops { |
5 | // Load/store ops. | ||
5 | OP_CONSTANT, | 6 | OP_CONSTANT, |
7 | // Arithmetic ops. | ||
6 | OP_SUM, | 8 | OP_SUM, |
7 | OP_SUB, | 9 | OP_SUB, |
8 | OP_MUL, | 10 | OP_MUL, |
9 | OP_DIV, | 11 | OP_DIV, |
10 | OP_MOD, | 12 | OP_MOD, |
13 | // Logic ops. | ||
11 | OP_NOT, | 14 | OP_NOT, |
12 | OP_AND, | 15 | OP_AND, |
13 | OP_OR, | 16 | OP_OR, |
17 | // Numerical comparison ops. | ||
14 | OP_EQUAL, | 18 | OP_EQUAL, |
15 | OP_LESS, | 19 | OP_LESS, |
16 | OP_GREATER, | 20 | OP_GREATER, |
17 | OP_LESS_EQUAL, | 21 | OP_LESS_EQUAL, |
18 | OP_GREATER_EQUAL, | 22 | OP_GREATER_EQUAL, |
23 | // Display ops. | ||
24 | OP_DISPLAY, | ||
25 | OP_PRINT, | ||
26 | OP_NEWLINE, | ||
27 | // Return. | ||
19 | OP_RETURN, | 28 | OP_RETURN, |
20 | } Ops; | 29 | } Ops; |
21 | 30 | ||