We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 539e0b7 commit 85e0d86Copy full SHA for 85e0d86
1 file changed
include/bytecode.h
@@ -12,6 +12,10 @@
12
13
#define AM_CONST 1
14
15
+#ifndef OP_PUSH_CONST
16
+#define OP_PUSH_CONST OP_CONSTANT
17
+#endif
18
+
19
// OpCodes
20
typedef enum {
21
OP_CONSTANT,
@@ -103,4 +107,12 @@ int read_chunk_from_file(const char *path, Chunk *out);
103
107
uint64_t read_uleb128_from(const uint8_t *buf, size_t buf_len, size_t *out_read);
104
108
int64_t read_sleb128_from(const uint8_t *buf, size_t buf_len, size_t *out_read);
105
109
110
+// Emission helpers
111
+void emit_opcode(Chunk *chunk, OpCode op);
112
+void emit_u8(Chunk *chunk, uint8_t x);
113
+void emit_u16_le(Chunk *chunk, uint16_t x);
114
+void emit_u32_le(Chunk *chunk, uint32_t x);
115
+void emit_uleb128(Chunk *chunk, uint64_t value);
116
+void emit_sleb128(Chunk *chunk, int64_t value);
117
106
118
#endif // PROX_BYTECODE_H
0 commit comments