File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1212
1313#define AM_CONST 1
1414
15+ #ifndef OP_PUSH_CONST
16+ #define OP_PUSH_CONST OP_CONSTANT
17+ #endif
18+
1519// OpCodes
1620typedef enum {
1721 OP_CONSTANT ,
@@ -103,4 +107,12 @@ int read_chunk_from_file(const char *path, Chunk *out);
103107uint64_t read_uleb128_from (const uint8_t * buf , size_t buf_len , size_t * out_read );
104108int64_t read_sleb128_from (const uint8_t * buf , size_t buf_len , size_t * out_read );
105109
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+
106118#endif // PROX_BYTECODE_H
You can’t perform that action at this time.
0 commit comments