Skip to content

Commit 32eacaf

Browse files
committed
Add more specific io ops. Change gotos to jumps
1 parent 23ff91b commit 32eacaf

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

include/Quad.h

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,24 @@ typedef enum Quad_Op_type {
3232
QUAD_OP_COPY_DEREFED_L,
3333

3434

35-
// Jump
36-
QUAD_OP_JUMP,
37-
QUAD_OP_JUMP_TRUE,
38-
QUAD_OP_JUMP_FALSE,
39-
QUAD_OP_JUMP_LT,
40-
QUAD_OP_JUMP_LE,
41-
QUAD_OP_JUMP_GT,
42-
QUAD_OP_JUMP_GE,
43-
QUAD_OP_JUMP_EQ,
44-
QUAD_OP_JUMP_NE,
35+
// Labels and jumps
36+
QUAD_OP_LABEL,
37+
QUAD_OP_GOTO,
38+
QUAD_OP_GOTO_LT,
39+
QUAD_OP_GOTO_LE,
40+
QUAD_OP_GOTO_GT,
41+
QUAD_OP_GOTO_GE,
42+
QUAD_OP_GOTO_EQ,
43+
QUAD_OP_GOTO_NE,
4544

4645
// Calls
4746
QUAD_OP_CALL,
4847

49-
// Labels
50-
QUAD_OP_LABEL,
51-
QUAD_OP_GOTO,
52-
5348
// IO
54-
QUAD_OP_READ,
55-
QUAD_OP_WRITE,
49+
QUAD_OP_READ_INT,
50+
QUAD_OP_READ_CHAR,
51+
QUAD_OP_WRITE_INT,
52+
QUAD_OP_WRITE_CHAR,
5653

5754
QUAD_OP_UNKNOWN = -1,
5855

0 commit comments

Comments
 (0)