blob: 4265f0785e322a5130bd1ee1957ff37efb6097ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#ifndef FVM_AS_CODEGEN_H_
#define FVM_AS_CODEGEN_H_
#include "as_analyzer.h"
#include <stdlib.h>
struct bytearray {
size_t cap;
size_t len;
char* buf;
allocator *alct;
};
typedef struct bytearray bytearray;
void bytearray_emit8(bytearray *self, int8_t data);
void bytearray_emit64(bytearray *self, int64_t data);
// return: result<bytearray*>
struct result codegen(struct allocator *alct, struct prog *prog, struct sym_table tbl);
#endif // FVM_AS_CODEGEN_H_
|